Class CqlConnection
Represents a CQL connection.
Inheritance
CqlConnection
Assembly: Cassandra.dll
Syntax
public class CqlConnection : DbConnection, IComponent, IDbConnection, IDisposable, ICloneable
Constructors
CqlConnection()
Declaration
CqlConnection(string)
Declaration
public CqlConnection(string connectionString)
Parameters
Type |
Name |
Description |
string |
connectionString |
The connection string.
|
Fields
ManagedConnection
Declaration
protected ISession ManagedConnection
Field Value
Properties
ConnectionString
Declaration
public override string ConnectionString { get; set; }
Property Value
Overrides
DataSource
Declaration
public override string DataSource { get; }
Property Value
Overrides
Database
Declaration
public override string Database { get; }
Property Value
Overrides
DbProviderFactory
Declaration
protected override DbProviderFactory DbProviderFactory { get; }
Property Value
Overrides
ServerVersion
Declaration
public override string ServerVersion { get; }
Property Value
Overrides
State
Declaration
public override ConnectionState State { get; }
Property Value
Overrides
Methods
BeginDbTransaction(IsolationLevel)
Declaration
protected override DbTransaction BeginDbTransaction(IsolationLevel isolationLevel)
Parameters
Returns
Overrides
ChangeDatabase(string)
Declaration
public override void ChangeDatabase(string databaseName)
Parameters
Type |
Name |
Description |
string |
databaseName |
|
Overrides
Clone()
Declaration
Returns
Close()
Declaration
public override void Close()
Overrides
CreateCluster(CassandraConnectionStringBuilder)
Creates a Cluster. By default Clusters are created and cached
by cluster name specified in connection string.
To be overridden in child classes to change the default creation and caching behavior.
Declaration
protected virtual Cluster CreateCluster(CassandraConnectionStringBuilder connectionStringBuilder)
Parameters
Returns
CreateDbCommand()
Declaration
protected override DbCommand CreateDbCommand()
Returns
Overrides
CreatePreparedStatement(string)
Declaration
protected virtual PreparedStatement CreatePreparedStatement(string cqlQuery)
Parameters
Type |
Name |
Description |
string |
cqlQuery |
The CQL query string.
|
Returns
CreatedSession(string)
Creates a ISession.
To be overridden in child classes if want to cache the ISession created.
Declaration
protected virtual ISession CreatedSession(string keyspace)
Parameters
Type |
Name |
Description |
string |
keyspace |
The keyspace.
|
Returns
Dispose(bool)
Declaration
protected override void Dispose(bool disposing)
Parameters
Type |
Name |
Description |
bool |
disposing |
|
Overrides
OnBuildingCluster(Builder)
To be overridden in child classes to change the default Builder settings
for building a Cluster.
For example, some clients might want to specify the DCAwareRoundRobinPolicy
when building the Cluster so that the clients could talk to only the hosts
in specified datacenter for better performance.
Declaration
protected virtual void OnBuildingCluster(Builder builder)
Parameters
Open()
Declaration
public override void Open()
Overrides
Implements