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