• 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 CqlCommand

    Represents a Linq query (UPDATE/INSERT/DELETE) that gets evaluated as a CQL statement.

    Inheritance
    System.Object
    Statement
    RegularStatement
    SimpleStatement
    CqlCommand
    CqlConditionalCommand<TEntity>
    CqlDelete
    CqlInsert<TEntity>
    CqlUpdate
    Implements
    IStatement
    Inherited Members
    SimpleStatement.RoutingKey
    SimpleStatement.Keyspace
    SimpleStatement.SetRoutingKey(RoutingKey[])
    SimpleStatement.SetRoutingValues(Object[])
    SimpleStatement.SetQueryString(String)
    SimpleStatement.Bind(Object[])
    SimpleStatement.BindObjects(Object[])
    SimpleStatement.SetKeyspace(String)
    RegularStatement.ToString()
    Statement.ProxyExecuteKey
    Statement.SkipMetadata
    Statement.ConsistencyLevel
    Statement.SerialConsistencyLevel
    Statement.PageSize
    Statement.IsTracing
    Statement.ReadTimeoutMillis
    Statement.RetryPolicy
    Statement.PagingState
    Statement.Timestamp
    Statement.AutoPage
    Statement.OutgoingPayload
    Statement.IsIdempotent
    Statement.Host
    Statement.ExecutingAs(String)
    Statement.SetAutoPage(Boolean)
    Statement.SetPagingState(Byte[])
    Statement.SetReadTimeoutMillis(Int32)
    Statement.EnableTracing(Boolean)
    Statement.DisableTracing()
    Statement.SetRetryPolicy(IRetryPolicy)
    Statement.SetIdempotence(Boolean)
    Statement.SetPageSize(Int32)
    Statement.SetOutgoingPayload(IDictionary<String, Byte[]>)
    Statement.SetHost(Host)
    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)
    Namespace: Dse.Data.Linq
    Assembly: Dse.dll
    Syntax
    public abstract class CqlCommand : SimpleStatement, IInternalStatement, IStatement

    Fields

    _timestamp

    Declaration
    protected DateTimeOffset? _timestamp
    Field Value
    Type Description
    System.Nullable<System.DateTimeOffset>

    _ttl

    Declaration
    protected int? _ttl
    Field Value
    Type Description
    System.Nullable<System.Int32>

    Properties

    Expression

    Declaration
    public Expression Expression { get; }
    Property Value
    Type Description
    System.Linq.Expressions.Expression

    QueryAbortTimeout

    Declaration
    protected int QueryAbortTimeout { get; }
    Property Value
    Type Description
    System.Int32

    QueryString

    Declaration
    public override string QueryString { get; }
    Property Value
    Type Description
    System.String
    Overrides
    SimpleStatement.QueryString

    QueryTrace

    After being executed, it retrieves the trace of the CQL query.

    Use EnableTracing(Boolean) to enable tracing.

    Note that enabling query trace introduces server-side overhead by storing request information, so it's recommended that you only enable query tracing when trying to identify possible issues / debugging.

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

    QueryValues

    Declaration
    public override object[] QueryValues { get; }
    Property Value
    Type Description
    System.Object[]
    Overrides
    Statement.QueryValues

    Methods

    BeginExecute(AsyncCallback, Object)

    Starts executing the statement async

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

    EndExecute(IAsyncResult)

    Starts the async executing of the statement

    Declaration
    public virtual void EndExecute(IAsyncResult ar)
    Parameters
    Type Name Description
    System.IAsyncResult ar

    Execute()

    Executes the command using the ISession.

    Declaration
    public void Execute()

    Execute(String)

    Executes the command using the ISession with the provided execution profile.

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

    ExecuteAsync()

    Evaluates the Linq command and executes asynchronously the cql statement.

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

    ExecuteAsync(String)

    Evaluates the Linq command and executes asynchronously the cql statement with the provided execution profile.

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

    GetCql(out Object[])

    Declaration
    protected abstract string GetCql(out object[] values)
    Parameters
    Type Name Description
    System.Object[] values
    Returns
    Type Description
    System.String

    GetTable()

    Declaration
    public ITable GetTable()
    Returns
    Type Description
    ITable

    InitializeStatement()

    Declaration
    protected void InitializeStatement()

    SetConsistencyLevel(Nullable<ConsistencyLevel>)

    Declaration
    public CqlCommand SetConsistencyLevel(ConsistencyLevel? consistencyLevel)
    Parameters
    Type Name Description
    System.Nullable<ConsistencyLevel> consistencyLevel
    Returns
    Type Description
    CqlCommand

    SetQueryTrace(QueryTrace)

    Declaration
    public void SetQueryTrace(QueryTrace trace)
    Parameters
    Type Name Description
    QueryTrace trace

    SetSerialConsistencyLevel(ConsistencyLevel)

    Declaration
    public CqlCommand SetSerialConsistencyLevel(ConsistencyLevel consistencyLevel)
    Parameters
    Type Name Description
    ConsistencyLevel consistencyLevel
    Returns
    Type Description
    CqlCommand

    SetTimestamp(DateTimeOffset)

    Sets the timestamp associated with this statement execution.

    Declaration
    public CqlCommand SetTimestamp(DateTimeOffset timestamp)
    Parameters
    Type Name Description
    System.DateTimeOffset timestamp
    Returns
    Type Description
    CqlCommand

    This instance.

    SetTTL(Int32)

    Sets the time for data in a column to expire (TTL) for INSERT and UPDATE commands .

    Declaration
    public CqlCommand SetTTL(int seconds)
    Parameters
    Type Name Description
    System.Int32 seconds

    Amount of seconds

    Returns
    Type Description
    CqlCommand

    Implements

    IStatement
    Back to top © DataStax, All rights reserved.