Class CqlConnection
Represents a CQL connection.
Inheritance
object
MarshalByRefObject
Component
DbConnection
CqlConnection
Implements
IComponent
IDbConnection
IDisposable
ICloneable
Inherited Members
DbConnection.BeginTransaction()
DbConnection.BeginTransaction(IsolationLevel)
DbConnection.CreateCommand()
DbConnection.EnlistTransaction(Transaction)
DbConnection.GetSchema()
DbConnection.GetSchema(string)
DbConnection.GetSchema(string, string[])
DbConnection.OnStateChange(StateChangeEventArgs)
DbConnection.OpenAsync()
DbConnection.OpenAsync(CancellationToken)
DbConnection.ConnectionTimeout
DbConnection.StateChange
Component.Dispose()
Component.GetService(Type)
Component.ToString()
Component.CanRaiseEvents
Component.Container
Component.DesignMode
Component.Events
Component.Site
Component.Disposed
MarshalByRefObject.GetLifetimeService()
MarshalByRefObject.InitializeLifetimeService()
MarshalByRefObject.MemberwiseClone(bool)
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
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
System.Data.Common.DbConnection.ConnectionString
Database
Declaration
public override string Database { get; }
Property Value
Overrides
System.Data.Common.DbConnection.Database
DataSource
Declaration
public override string DataSource { get; }
Property Value
Overrides
System.Data.Common.DbConnection.DataSource
DbProviderFactory
Declaration
protected override DbProviderFactory DbProviderFactory { get; }
Property Value
Type |
Description |
DbProviderFactory |
|
Overrides
System.Data.Common.DbConnection.DbProviderFactory
ServerVersion
Declaration
public override string ServerVersion { get; }
Property Value
Overrides
System.Data.Common.DbConnection.ServerVersion
State
Declaration
public override ConnectionState State { get; }
Property Value
Type |
Description |
ConnectionState |
|
Overrides
System.Data.Common.DbConnection.State
Methods
BeginDbTransaction(IsolationLevel)
Declaration
protected override DbTransaction BeginDbTransaction(IsolationLevel isolationLevel)
Parameters
Type |
Name |
Description |
IsolationLevel |
isolationLevel |
|
Returns
Type |
Description |
DbTransaction |
|
Overrides
System.Data.Common.DbConnection.BeginDbTransaction(System.Data.IsolationLevel)
ChangeDatabase(string)
Declaration
public override void ChangeDatabase(string databaseName)
Parameters
Type |
Name |
Description |
string |
databaseName |
|
Overrides
System.Data.Common.DbConnection.ChangeDatabase(string)
Clone()
Declaration
Returns
Close()
Declaration
public override void Close()
Overrides
System.Data.Common.DbConnection.Close()
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
Type |
Description |
DbCommand |
|
Overrides
System.Data.Common.DbConnection.CreateDbCommand()
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
CreatePreparedStatement(string)
Declaration
protected virtual PreparedStatement CreatePreparedStatement(string cqlQuery)
Parameters
Type |
Name |
Description |
string |
cqlQuery |
The CQL query string.
|
Returns
Dispose(bool)
Declaration
protected override void Dispose(bool disposing)
Parameters
Type |
Name |
Description |
bool |
disposing |
|
Overrides
System.ComponentModel.Component.Dispose(bool)
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
System.Data.Common.DbConnection.Open()
Implements
System.ComponentModel.IComponent
System.Data.IDbConnection
System.IDisposable
System.ICloneable