Table of Contents

Class CassandraDataProvider

Namespace
combit.Reporting.DataProviders
Assembly
combit.ListLabel31.CrossPlatform.CassandraDataProvider.dll

Provides a data provider implementation for Apache Cassandra databases.

public sealed class CassandraDataProvider : IDataProvider, ICanHandleUsedIdentifiers, ISupportsLogger
Inheritance
CassandraDataProvider
Implements
Inherited Members

Examples

The following example demonstrates how to use the CassandraDataProvider:

// Create an instance of the CassandraDataProvider with the cluster address and keyspace.
CassandraDataProvider provider = new CassandraDataProvider("127.0.0.1", "my_keyspace");

// Assign the provider as the data source for the List & Label reporting engine.
using ListLabel listLabel = new ListLabel();
listLabel.DataSource = provider;
ExportConfiguration exportConfiguration = new ExportConfiguration(LlExportTarget.Pdf, exportFilePath, projectFilePath);
exportConfiguration.ShowResult = true;
listLabel.Export(exportConfiguration);

Remarks

The CassandraDataProvider class implements IDataProvider, ICanHandleUsedIdentifiers, and ISupportsLogger to allow access to data stored in Apache Cassandra. It uses the Cassandra .NET Driver to connect to a Cassandra cluster and query metadata (such as table names) from the specified keyspace. This provider supports count queries via the SupportCount property.

Constructors

CassandraDataProvider(string, string)

Initializes a new instance of the CassandraDataProvider class for the specified cluster address and keyspace.

public CassandraDataProvider(string address, string keyspace)

Parameters

address string

The address of the Cassandra cluster.

keyspace string

The keyspace to connect to.

Properties

CassandraMetadata

Gets or sets the metadata of the connected Cassandra cluster.

public Metadata CassandraMetadata { get; set; }

Property Value

Metadata

CassandraSession

Gets or sets the Cassandra session used for executing queries.

public ISession CassandraSession { get; set; }

Property Value

ISession

SupportCount

Gets or sets a value indicating whether the provider supports count queries.

public bool SupportCount { get; set; }

Property Value

bool

Tables

Gets a read-only collection of tables available from the Cassandra keyspace.

public ReadOnlyCollection<ITable> Tables { get; }

Property Value

ReadOnlyCollection<ITable>