• DataStax Enterprise C# Driver API Documentation

    Show / Hide Table of Contents
    • Dse
      • AggregateMetadata
      • AlreadyExistsException
      • AtomicMonotonicTimestampGenerator
      • AtomicMonotonicWinApiTimestampGenerator
      • AuthenticationException
      • BatchStatement
      • BatchType
      • BigIntegerTypeAdapter
      • BoundStatement
      • Builder
      • BusyPoolException
      • CassandraConnectionStringBuilder
      • ClientOptions
      • Cluster
      • ColumnDesc
      • ColumnTypeCode
      • CompressionType
      • Configuration
      • ConsistencyLevel
      • ConstantReconnectionPolicy
      • ConstantSpeculativeExecutionPolicy
      • CqlColumn
      • CustomColumnInfo
      • DataCollectionMetadata
      • DataCollectionMetadata.SortOrder
      • DCAwareRoundRobinPolicy
      • DecimalTypeAdapter
      • DefaultRetryPolicy
      • Diagnostics
      • DowngradingConsistencyRetryPolicy
      • DriverException
      • DriverInternalError
      • DseCluster
      • DseClusterBuilder
      • DseConfiguration
      • DseLoadBalancingPolicy
      • Duration
      • DynamicCompositeTypeAdapter
      • EC2MultiRegionTranslator
      • ExecutionException
      • ExecutionInfo
      • ExponentialReconnectionPolicy
      • Extensions
      • FallthroughRetryPolicy
      • FixedReconnectionPolicy
      • FunctionFailureException
      • FunctionMetadata
      • Host
      • HostDistance
      • HostsEventArgs
      • HostsEventArgs.Kind
      • HostsEventHandler
      • IAddressTranslator
      • IAuthenticator
      • IAuthProvider
      • IAuthProviderNamed
      • ICluster
      • IColumnInfo
      • IdempotenceAwareRetryPolicy
      • IDseCluster
      • IDseSession
      • IExecutionProfile
      • IExecutionProfileBuilder
      • IExecutionProfileOptions
      • IExtendedRetryPolicy
      • IFrameCompressor
      • IInitializer
      • ILoadBalancingPolicy
      • IndexMetadata
      • IndexMetadata.IndexKind
      • InvalidConfigurationInQueryException
      • InvalidQueryException
      • InvalidTypeException
      • IReconnectionPolicy
      • IReconnectionSchedule
      • IRetryPolicy
      • IsBootstrappingException
      • ISession
      • ISessionState
      • ISpeculativeExecutionPlan
      • ISpeculativeExecutionPolicy
      • IStatement
      • ITimestampGenerator
      • ITypeAdapter
      • KeyspaceMetadata
      • KeyType
      • ListColumnInfo
      • LocalDate
      • LocalTime
      • Logger
      • LoggingRetryPolicy
      • MapColumnInfo
      • MaterializedViewMetadata
      • Metadata
      • MetadataSyncOptions
      • MetricsExtensions
      • MonitorReportingOptions
      • NoHostAvailableException
      • NoneAuthProvider
      • NoSpeculativeExecutionPolicy
      • NullTypeAdapter
      • OperationTimedOutException
      • OverloadedException
      • PlainTextAuthProvider
      • Policies
      • PoolingOptions
      • PreparedQueryNotFoundException
      • PreparedStatement
      • PreparedStatementIdMismatchException
      • ProtocolErrorException
      • ProtocolOptions
      • ProtocolVersion
      • QueryExecutionException
      • QueryOptions
      • QueryProtocolOptions
      • QueryProtocolOptions.QueryFlags
      • QueryTimeoutException
      • QueryTrace
      • QueryTrace.Event
      • QueryValidationException
      • ReadFailureException
      • ReadTimeoutException
      • RegularStatement
      • ReplicationStrategies
      • RequestInvalidException
      • RetryDecision
      • RetryDecision.RetryDecisionType
      • RetryLoadBalancingPolicy
      • RetryLoadBalancingPolicyEventArgs
      • RoundRobinPolicy
      • RoutingKey
      • Row
      • RowSet
      • RowSetMetadata
      • SchemaChangedEventArgs
      • SchemaChangedEventArgs.Kind
      • SchemaChangedEventHandler
      • ServerErrorException
      • Session
      • SetColumnInfo
      • SimpleStatement
      • SocketOptions
      • SSLOptions
      • Statement
      • SyntaxError
      • TableColumn
      • TableMetadata
      • TableOptions
      • TimeUuid
      • TokenAwarePolicy
      • ToManyConnectionsPerHost
      • TraceRetrievalException
      • TruncateException
      • TupleColumnInfo
      • TypeAdapters
      • UdtColumnInfo
      • UdtMap
      • UdtMap<T>
      • UdtMappingDefinitions
      • UnauthorizedException
      • UnavailableException
      • Unset
      • WriteFailureException
      • WriteTimeoutException
    • Dse.AppMetrics
      • DriverAppMetricsOptions
    • Dse.AppMetrics.MetricTypes
      • IAppMetricsCounter
      • IAppMetricsGauge
      • IAppMetricsMeter
      • IAppMetricsMetric
      • IAppMetricsTimer
    • Dse.AppMetrics.MetricValues
      • IAppMetricsHistogramValue
      • IAppMetricsMeterValue
      • IAppMetricsMetricWithValue<T>
      • IAppMetricsTimerValue
    • Dse.Auth
      • DseGssapiAuthProvider
      • DsePlainTextAuthProvider
    • Dse.Auth.Sspi
      • SspiException
    • Dse.Data
      • CqlBatchTransaction
      • CqlCommand
      • CqlConnection
      • CqlDataAdapter
      • CqlParameter
      • CqlParameterCollection
      • CqlProviderFactory
      • CqlReader
    • Dse.Data.Linq
      • AllowFilteringAttribute
      • Batch
      • ClusteringKeyAttribute
      • ColumnAttribute
      • CompactStorageAttribute
      • CounterAttribute
      • CqlArgumentException
      • CqlCommand
      • CqlConditionalCommand<TEntity>
      • CqlDelete
      • CqlFunction
      • CqlInsert<TEntity>
      • CqlLinqNotSupportedException
      • CqlOperator
      • CqlQuery<TEntity>
      • CqlQueryBase<TEntity>
      • CqlQueryExtensions
      • CqlQuerySingleElement<TEntity>
      • CqlScalar<TEntity>
      • CqlToken
      • CqlUpdate
      • IgnoreAttribute
      • ITable
      • PartitionKeyAttribute
      • SecondaryIndexAttribute
      • SessionExtensions
      • StaticColumnAttribute
      • Table<TEntity>
      • TableAttribute
      • TableType
    • Dse.Geometry
      • GeometryBase
      • LineString
      • Point
      • Polygon
    • Dse.Graph
      • Edge
      • Element
      • GraphNode
      • GraphOptions
      • GraphResultSet
      • GraphStatement
      • IEdge
      • IElement
      • IGraphNode
      • IGraphStatement
      • IPath
      • IProperty
      • IVertex
      • IVertexProperty
      • Path
      • SimpleGraphStatement
      • Vertex
    • Dse.Mapping
      • AppliedInfo<T>
      • ColumnMap
      • Cql
      • CqlQueryOptions
      • IColumnDefinition
      • ICqlBatch
      • ICqlQueryAsyncClient
      • ICqlQueryClient
      • ICqlWriteAsyncClient
      • ICqlWriteClient
      • IMapper
      • IPage<T>
      • ITypeDefinition
      • Map<TPoco>
      • Mapper
      • MappingConfiguration
      • Mappings
      • SortOrder
    • Dse.Mapping.Attributes
      • ClusteringKeyAttribute
      • ColumnAttribute
      • CounterAttribute
      • FrozenAttribute
      • FrozenKeyAttribute
      • FrozenValueAttribute
      • IgnoreAttribute
      • PartitionKeyAttribute
      • SecondaryIndexAttribute
      • StaticColumnAttribute
      • TableAttribute
    • Dse.Mapping.TypeConversion
      • DefaultTypeConverter
      • EnumStringMapper<T>
      • NullableEnumStringMapper<T>
      • TypeConverter
    • Dse.Mapping.Utils
      • MemberInfoExtensions
    • Dse.Metrics
      • DriverMetricsOptions
      • IDriverMetrics
      • IMetric
      • IMetricsRegistry<TMetric>
      • NodeMetric
      • NodeMetric.Counters
      • NodeMetric.Gauges
      • NodeMetric.Meters
      • NodeMetric.Timers
      • SessionMetric
      • SessionMetric.Counters
      • SessionMetric.Gauges
      • SessionMetric.Meters
      • SessionMetric.Timers
    • Dse.Metrics.Abstractions
      • IDriverCounter
      • IDriverGauge
      • IDriverMeter
      • IDriverMetric
      • IDriverMetricsProvider
      • IDriverTimer
    • Dse.Search
      • DateRange
      • DateRangeBound
      • DateRangePrecision
    • Dse.Serialization
      • CustomTypeSerializer<T>
      • TypeSerializer
      • TypeSerializer<T>
      • TypeSerializerDefinitions
      • UdtSerializer

    Class Session

    Inheritance
    System.Object
    Session
    Implements
    ISession
    System.IDisposable
    Inherited Members
    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)
    System.Object.ToString()
    Namespace: Dse
    Assembly: Dse.dll
    Syntax
    public class Session : IInternalSession, ISession, IDisposable

    Properties

    BinaryProtocolVersion

    Declaration
    public int BinaryProtocolVersion { get; }
    Property Value
    Type Description
    System.Int32

    Cluster

    Declaration
    public ICluster Cluster { get; }
    Property Value
    Type Description
    ICluster

    Configuration

    Gets the cluster configuration

    Declaration
    public Configuration Configuration { get; protected set; }
    Property Value
    Type Description
    Configuration

    IsDisposed

    Determines if the session is already disposed

    Declaration
    public bool IsDisposed { get; }
    Property Value
    Type Description
    System.Boolean

    Keyspace

    Gets or sets the keyspace

    Declaration
    public string Keyspace { get; }
    Property Value
    Type Description
    System.String

    Policies

    Declaration
    public Policies Policies { get; }
    Property Value
    Type Description
    Policies

    SessionName

    Declaration
    public string SessionName { get; }
    Property Value
    Type Description
    System.String

    UserDefinedTypes

    Declaration
    public UdtMappingDefinitions UserDefinedTypes { get; }
    Property Value
    Type Description
    UdtMappingDefinitions

    Methods

    BeginExecute(IStatement, AsyncCallback, Object)

    Declaration
    public IAsyncResult BeginExecute(IStatement statement, AsyncCallback callback, object state)
    Parameters
    Type Name Description
    IStatement statement
    System.AsyncCallback callback
    System.Object state
    Returns
    Type Description
    System.IAsyncResult

    BeginExecute(String, ConsistencyLevel, AsyncCallback, Object)

    Declaration
    public IAsyncResult BeginExecute(string cqlQuery, ConsistencyLevel consistency, AsyncCallback callback, object state)
    Parameters
    Type Name Description
    System.String cqlQuery
    ConsistencyLevel consistency
    System.AsyncCallback callback
    System.Object state
    Returns
    Type Description
    System.IAsyncResult

    BeginPrepare(String, AsyncCallback, Object)

    Declaration
    public IAsyncResult BeginPrepare(string cqlQuery, AsyncCallback callback, object state)
    Parameters
    Type Name Description
    System.String cqlQuery
    System.AsyncCallback callback
    System.Object state
    Returns
    Type Description
    System.IAsyncResult

    ChangeKeyspace(String)

    Declaration
    public void ChangeKeyspace(string keyspace)
    Parameters
    Type Name Description
    System.String keyspace

    CreateKeyspace(String, Dictionary<String, String>, Boolean)

    Declaration
    public void CreateKeyspace(string keyspace, Dictionary<string, string> replication = null, bool durableWrites = true)
    Parameters
    Type Name Description
    System.String keyspace
    System.Collections.Generic.Dictionary<System.String, System.String> replication
    System.Boolean durableWrites

    CreateKeyspaceIfNotExists(String, Dictionary<String, String>, Boolean)

    Declaration
    public void CreateKeyspaceIfNotExists(string keyspaceName, Dictionary<string, string> replication = null, bool durableWrites = true)
    Parameters
    Type Name Description
    System.String keyspaceName
    System.Collections.Generic.Dictionary<System.String, System.String> replication
    System.Boolean durableWrites

    DeleteKeyspace(String)

    Declaration
    public void DeleteKeyspace(string keyspaceName)
    Parameters
    Type Name Description
    System.String keyspaceName

    DeleteKeyspaceIfExists(String)

    Declaration
    public void DeleteKeyspaceIfExists(string keyspaceName)
    Parameters
    Type Name Description
    System.String keyspaceName

    Dispose()

    Declaration
    public void Dispose()

    EndExecute(IAsyncResult)

    Declaration
    public RowSet EndExecute(IAsyncResult ar)
    Parameters
    Type Name Description
    System.IAsyncResult ar
    Returns
    Type Description
    RowSet

    EndPrepare(IAsyncResult)

    Declaration
    public PreparedStatement EndPrepare(IAsyncResult ar)
    Parameters
    Type Name Description
    System.IAsyncResult ar
    Returns
    Type Description
    PreparedStatement

    Execute(IStatement)

    Declaration
    public RowSet Execute(IStatement statement)
    Parameters
    Type Name Description
    IStatement statement
    Returns
    Type Description
    RowSet

    Execute(IStatement, String)

    Declaration
    public RowSet Execute(IStatement statement, string executionProfileName)
    Parameters
    Type Name Description
    IStatement statement
    System.String executionProfileName
    Returns
    Type Description
    RowSet

    Execute(String)

    Declaration
    public RowSet Execute(string cqlQuery)
    Parameters
    Type Name Description
    System.String cqlQuery
    Returns
    Type Description
    RowSet

    Execute(String, ConsistencyLevel)

    Declaration
    public RowSet Execute(string cqlQuery, ConsistencyLevel consistency)
    Parameters
    Type Name Description
    System.String cqlQuery
    ConsistencyLevel consistency
    Returns
    Type Description
    RowSet

    Execute(String, Int32)

    Declaration
    public RowSet Execute(string cqlQuery, int pageSize)
    Parameters
    Type Name Description
    System.String cqlQuery
    System.Int32 pageSize
    Returns
    Type Description
    RowSet

    Execute(String, String)

    Declaration
    public RowSet Execute(string cqlQuery, string executionProfileName)
    Parameters
    Type Name Description
    System.String cqlQuery
    System.String executionProfileName
    Returns
    Type Description
    RowSet

    ExecuteAsync(IStatement)

    Declaration
    public Task<RowSet> ExecuteAsync(IStatement statement)
    Parameters
    Type Name Description
    IStatement statement
    Returns
    Type Description
    System.Threading.Tasks.Task<RowSet>

    ExecuteAsync(IStatement, String)

    Declaration
    public Task<RowSet> ExecuteAsync(IStatement statement, string executionProfileName)
    Parameters
    Type Name Description
    IStatement statement
    System.String executionProfileName
    Returns
    Type Description
    System.Threading.Tasks.Task<RowSet>

    GetMetrics()

    Declaration
    public IDriverMetrics GetMetrics()
    Returns
    Type Description
    IDriverMetrics

    Prepare(String)

    Declaration
    public PreparedStatement Prepare(string cqlQuery)
    Parameters
    Type Name Description
    System.String cqlQuery
    Returns
    Type Description
    PreparedStatement

    Prepare(String, IDictionary<String, Byte[]>)

    Declaration
    public PreparedStatement Prepare(string cqlQuery, IDictionary<string, byte[]> customPayload)
    Parameters
    Type Name Description
    System.String cqlQuery
    System.Collections.Generic.IDictionary<System.String, System.Byte[]> customPayload
    Returns
    Type Description
    PreparedStatement

    Prepare(String, String)

    Declaration
    public PreparedStatement Prepare(string cqlQuery, string keyspace)
    Parameters
    Type Name Description
    System.String cqlQuery
    System.String keyspace
    Returns
    Type Description
    PreparedStatement

    Prepare(String, String, IDictionary<String, Byte[]>)

    Declaration
    public PreparedStatement Prepare(string cqlQuery, string keyspace, IDictionary<string, byte[]> customPayload)
    Parameters
    Type Name Description
    System.String cqlQuery
    System.String keyspace
    System.Collections.Generic.IDictionary<System.String, System.Byte[]> customPayload
    Returns
    Type Description
    PreparedStatement

    PrepareAsync(String)

    Declaration
    public Task<PreparedStatement> PrepareAsync(string query)
    Parameters
    Type Name Description
    System.String query
    Returns
    Type Description
    System.Threading.Tasks.Task<PreparedStatement>

    PrepareAsync(String, IDictionary<String, Byte[]>)

    Declaration
    public Task<PreparedStatement> PrepareAsync(string query, IDictionary<string, byte[]> customPayload)
    Parameters
    Type Name Description
    System.String query
    System.Collections.Generic.IDictionary<System.String, System.Byte[]> customPayload
    Returns
    Type Description
    System.Threading.Tasks.Task<PreparedStatement>

    PrepareAsync(String, String)

    Declaration
    public Task<PreparedStatement> PrepareAsync(string cqlQuery, string keyspace)
    Parameters
    Type Name Description
    System.String cqlQuery
    System.String keyspace
    Returns
    Type Description
    System.Threading.Tasks.Task<PreparedStatement>

    PrepareAsync(String, String, IDictionary<String, Byte[]>)

    Declaration
    public Task<PreparedStatement> PrepareAsync(string cqlQuery, string keyspace, IDictionary<string, byte[]> customPayload)
    Parameters
    Type Name Description
    System.String cqlQuery
    System.String keyspace
    System.Collections.Generic.IDictionary<System.String, System.Byte[]> customPayload
    Returns
    Type Description
    System.Threading.Tasks.Task<PreparedStatement>

    WaitForSchemaAgreement(RowSet)

    Declaration
    public void WaitForSchemaAgreement(RowSet rs)
    Parameters
    Type Name Description
    RowSet rs

    WaitForSchemaAgreement(IPEndPoint)

    Declaration
    public bool WaitForSchemaAgreement(IPEndPoint hostAddress)
    Parameters
    Type Name Description
    System.Net.IPEndPoint hostAddress
    Returns
    Type Description
    System.Boolean

    Implements

    ISession
    System.IDisposable

    Extension Methods

    Extensions.GetState(ISession)
    SessionExtensions.GetTable<TEntity>(ISession, String, String)
    SessionExtensions.CreateBatch(ISession)
    SessionExtensions.CreateBatch(ISession, BatchType)
    Back to top © DataStax, All rights reserved.