• DataStax C# Driver for Apache Cassandra API Documentation
Search Results for

    Show / Hide Table of Contents
    • Cassandra
      • AesColumnEncryptionPolicy
      • AesColumnEncryptionPolicy.AesKeyAndIV
      • AggregateMetadata
      • AlreadyExistsException
      • AtomicMonotonicTimestampGenerator
      • AtomicMonotonicWinApiTimestampGenerator
      • AuthenticationException
      • BaseColumnEncryptionPolicy<TKey>
      • BaseColumnEncryptionPolicy<TKey>.ColMetadataKey
      • BatchStatement
      • BatchType
      • BigIntegerTypeAdapter
      • BoundStatement
      • Builder
      • BusyPoolException
      • CassandraConnectionStringBuilder
      • ClientOptions
      • Cluster
      • ColumnDesc
      • ColumnEncryptionInvalidTypeError
      • ColumnEncryptionMetadata
      • ColumnTypeCode
      • CompressionType
      • Configuration
      • ConsistencyLevel
      • ConstantReconnectionPolicy
      • ConstantSpeculativeExecutionPolicy
      • CqlColumn
      • CqlVector<T>
      • CustomColumnInfo
      • DCAwareRoundRobinPolicy
      • DataCollectionMetadata
      • DataCollectionMetadata.SortOrder
      • DecimalTypeAdapter
      • DefaultLoadBalancingPolicy
      • DefaultRetryPolicy
      • Diagnostics
      • DowngradingConsistencyRetryPolicy
      • DriverException
      • DriverInternalError
      • Duration
      • DynamicCompositeTypeAdapter
      • EC2MultiRegionTranslator
      • EncryptedValue
      • ExecutionException
      • ExecutionInfo
      • ExponentialReconnectionPolicy
      • Extensions
      • FallthroughRetryPolicy
      • FixedReconnectionPolicy
      • FunctionFailureException
      • FunctionMetadata
      • GraphProtocol
      • Host
      • HostDistance
      • HostsEventArgs
      • HostsEventArgs.Kind
      • HostsEventHandler
      • IAddressTranslator
      • IAuthProvider
      • IAuthenticator
      • ICluster
      • IColumnEncryptionPolicy
      • IColumnInfo
      • IExecutionProfile
      • IExecutionProfileBuilder
      • IExecutionProfileOptions
      • IExtendedRetryPolicy
      • IFrameCompressor
      • IInitializer
      • ILoadBalancingPolicy
      • IReconnectionPolicy
      • IReconnectionSchedule
      • IRequestTracker
      • IRetryPolicy
      • ISession
      • ISessionState
      • ISpeculativeExecutionPlan
      • ISpeculativeExecutionPolicy
      • IStatement
      • ITimestampGenerator
      • ITypeAdapter
      • IdempotenceAwareRetryPolicy
      • IndexMetadata
      • IndexMetadata.IndexKind
      • InitFatalErrorException
      • InvalidConfigurationInQueryException
      • InvalidQueryException
      • InvalidTypeException
      • IsBootstrappingException
      • KeyType
      • KeyspaceMetadata
      • ListColumnInfo
      • LocalDate
      • LocalTime
      • Logger
      • LoggingRetryPolicy
      • MapColumnInfo
      • MaterializedViewMetadata
      • Metadata
      • MetadataSyncOptions
      • MetricsExtensions
      • MonitorReportingOptions
      • NoHostAvailableException
      • NoSpeculativeExecutionPolicy
      • NodeRequestInfo
      • NoneAuthProvider
      • NullTypeAdapter
      • OperationTimedOutException
      • OverloadedException
      • PlainTextAuthProvider
      • Policies
      • PoolingOptions
      • PrepareRequest
      • 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
      • SSLOptions
      • SchemaChangedEventArgs
      • SchemaChangedEventArgs.Kind
      • SchemaChangedEventHandler
      • ServerErrorException
      • Session
      • SessionRequestInfo
      • SetColumnInfo
      • SimpleStatement
      • SocketOptions
      • Statement
      • SyntaxError
      • TableColumn
      • TableMetadata
      • TableOptions
      • TimeUuid
      • ToManyConnectionsPerHost
      • TokenAwarePolicy
      • TraceRetrievalException
      • TruncateException
      • TupleColumnInfo
      • TypeAdapters
      • UdtColumnInfo
      • UdtMap
      • UdtMap<T>
      • UdtMappingDefinitions
      • UnauthorizedException
      • UnavailableException
      • Unset
      • VectorColumnInfo
      • WriteFailureException
      • WriteTimeoutException
    • Cassandra.AppMetrics
      • DriverAppMetricsOptions
    • Cassandra.AppMetrics.MetricTypes
      • IAppMetricsCounter
      • IAppMetricsGauge
      • IAppMetricsMeter
      • IAppMetricsMetric
      • IAppMetricsTimer
    • Cassandra.AppMetrics.MetricValues
      • IAppMetricsHistogramValue
      • IAppMetricsMeterValue
      • IAppMetricsMetricWithValue<T>
      • IAppMetricsTimerValue
    • Cassandra.Data
      • CqlBatchTransaction
      • CqlCommand
      • CqlConnection
      • CqlDataAdapter
      • CqlParameter
      • CqlParameterCollection
      • CqlProviderFactory
      • CqlReader
    • Cassandra.Data.Linq
      • AllowFilteringAttribute
      • Batch
      • ClusteringKeyAttribute
      • ColumnAttribute
      • CompactStorageAttribute
      • CounterAttribute
      • CqlArgumentException
      • CqlCommand
      • CqlConditionalCommand<TEntity>
      • CqlDelete
      • CqlFunction
      • CqlInsert<TEntity>
      • CqlLinqNotSupportedException
      • CqlOperator
      • CqlQueryBase<TEntity>
      • CqlQueryExtensions
      • CqlQuerySingleElement<TEntity>
      • CqlQuery<TEntity>
      • CqlScalar<TEntity>
      • CqlToken
      • CqlUpdate
      • ITable
      • IgnoreAttribute
      • PartitionKeyAttribute
      • SecondaryIndexAttribute
      • SessionExtensions
      • StaticColumnAttribute
      • TableAttribute
      • TableType
      • Table<TEntity>
    • Cassandra.DataStax.Auth
      • DseGssapiAuthProvider
      • DsePlainTextAuthProvider
    • Cassandra.DataStax.Auth.Sspi
      • SspiException
    • Cassandra.DataStax.Graph
      • Direction
      • Edge
      • Element
      • ElementMap
      • EnumWrapper
      • FluentGraphStatement
      • GraphNode
      • GraphOptions
      • GraphResultSet
      • GraphStatement
      • IEdge
      • IElement
      • IGraphNode
      • IGraphStatement
      • IPath
      • IProperty
      • IPropertyWithElement
      • IVertex
      • IVertexProperty
      • Path
      • SimpleGraphStatement
      • TEnum
      • Traverser
      • Vertex
    • Cassandra.DataStax.Graph.Internal
      • IGraphSONDeserializer
      • IGraphSONReader
      • IGraphSONSerializer
      • IGraphSONWriter
    • Cassandra.DataStax.Search
      • DateRange
      • DateRangeBound
      • DateRangePrecision
    • Cassandra.Geometry
      • GeometryBase
      • LineString
      • Point
      • Polygon
    • Cassandra.Mapping
      • AppliedInfo<T>
      • ColumnMap
      • Cql
      • CqlQueryOptions
      • IColumnDefinition
      • ICqlBatch
      • ICqlQueryAsyncClient
      • ICqlQueryClient
      • ICqlWriteAsyncClient
      • ICqlWriteClient
      • IMapper
      • IPage<T>
      • ITypeDefinition
      • Map<TPoco>
      • Mapper
      • MappingConfiguration
      • Mappings
      • PrimaryKeyAttribute
      • SortOrder
      • TableNameAttribute
    • Cassandra.Mapping.Attributes
      • ClusteringKeyAttribute
      • ColumnAttribute
      • CounterAttribute
      • FrozenAttribute
      • FrozenKeyAttribute
      • FrozenValueAttribute
      • IgnoreAttribute
      • PartitionKeyAttribute
      • SecondaryIndexAttribute
      • StaticColumnAttribute
      • TableAttribute
    • Cassandra.Mapping.TypeConversion
      • DefaultTypeConverter
      • EnumStringMapper<T>
      • NullableEnumStringMapper<T>
      • TypeConverter
    • Cassandra.Mapping.Utils
      • MemberInfoExtensions
    • Cassandra.Metrics
      • DriverMetricsOptions
      • IDriverMetrics
      • IMetric
      • IMetricsRegistry<TMetric>
      • NodeMetric
      • NodeMetric.Counters
      • NodeMetric.Gauges
      • NodeMetric.Meters
      • NodeMetric.Timers
      • SessionMetric
      • SessionMetric.Counters
      • SessionMetric.Gauges
      • SessionMetric.Meters
      • SessionMetric.Timers
    • Cassandra.Metrics.Abstractions
      • IDriverCounter
      • IDriverGauge
      • IDriverMeter
      • IDriverMetric
      • IDriverMetricsProvider
      • IDriverTimer
    • Cassandra.OpenTelemetry
      • BuilderExtensions
      • CassandraActivitySourceHelper
      • CassandraInstrumentationOptions
      • OpenTelemetryRequestTracker
    • Cassandra.Serialization
      • CustomTypeSerializer<T>
      • TypeSerializer
      • TypeSerializerDefinitions
      • TypeSerializer<T>
      • UdtSerializer
    • Cassandra.Serialization.Primitive
      • DecimalSerializer

    Class CqlQuery<TEntity>

    Represents a Linq query that gets evaluated as a CQL statement.

    Inheritance
    object
    Statement
    CqlQueryBase<TEntity>
    CqlQuery<TEntity>
    Table<TEntity>
    Implements
    IStatement
    IQueryable<TEntity>
    IEnumerable<TEntity>
    IOrderedQueryable
    IQueryable
    IEnumerable
    Inherited Members
    CqlQueryBase<TEntity>.QueryAbortTimeout
    CqlQueryBase<TEntity>.Expression
    CqlQueryBase<TEntity>.ElementType
    CqlQueryBase<TEntity>.QueryTrace
    CqlQueryBase<TEntity>.RoutingKey
    CqlQueryBase<TEntity>.Keyspace
    CqlQueryBase<TEntity>.GetTable()
    CqlQueryBase<TEntity>.InternalExecuteWithProfileAsync(string, string, object[])
    CqlQueryBase<TEntity>.ExecuteAsync()
    CqlQueryBase<TEntity>.Execute()
    CqlQueryBase<TEntity>.ExecuteAsync(string)
    CqlQueryBase<TEntity>.Execute(string)
    CqlQueryBase<TEntity>.BeginExecute(AsyncCallback, object)
    CqlQueryBase<TEntity>.EndExecute(IAsyncResult)
    Statement.ProxyExecuteKey
    Statement.QueryValues
    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(bool)
    Statement.SetReadTimeoutMillis(int)
    Statement.SetTimestamp(DateTimeOffset)
    Statement.EnableTracing(bool)
    Statement.DisableTracing()
    Statement.SetRetryPolicy(IRetryPolicy)
    Statement.SetIdempotence(bool)
    Statement.SetOutgoingPayload(IDictionary<string, byte[]>)
    Statement.SetHost(Host)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Cassandra.Data.Linq
    Assembly: Cassandra.dll
    Syntax
    public class CqlQuery<TEntity> : CqlQueryBase<TEntity>, IStatement, IQueryable<TEntity>, IEnumerable<TEntity>, IOrderedQueryable, IQueryable, IEnumerable
    Type Parameters
    Name Description
    TEntity

    Properties

    Provider

    IQueryable.Provider implementation

    Declaration
    public IQueryProvider Provider { get; }
    Property Value
    Type Description
    IQueryProvider

    Methods

    ExecutePaged()

    Executes the query and returns a page of results

    Declaration
    public IPage<TEntity> ExecutePaged()
    Returns
    Type Description
    IPage<TEntity>

    ExecutePaged(string)

    Executes the query with the provided execution profile and returns a page of results

    Declaration
    public IPage<TEntity> ExecutePaged(string executionProfile)
    Parameters
    Type Name Description
    string executionProfile
    Returns
    Type Description
    IPage<TEntity>

    ExecutePagedAsync()

    Asynchronously executes the query and returns a task of a page of results

    Declaration
    public Task<IPage<TEntity>> ExecutePagedAsync()
    Returns
    Type Description
    Task<IPage<TEntity>>

    ExecutePagedAsync(string)

    Asynchronously executes the query with the provided execution profile and returns a task of a page of results

    Declaration
    public Task<IPage<TEntity>> ExecutePagedAsync(string executionProfile)
    Parameters
    Type Name Description
    string executionProfile
    Returns
    Type Description
    Task<IPage<TEntity>>

    GetCql(out object[])

    Declaration
    protected override string GetCql(out object[] values)
    Parameters
    Type Name Description
    object[] values
    Returns
    Type Description
    string
    Overrides
    CqlQueryBase<TEntity>.GetCql(out object[])

    GetEnumerator()

    Declaration
    public IEnumerator<TEntity> GetEnumerator()
    Returns
    Type Description
    IEnumerator<TEntity>

    SetConsistencyLevel(ConsistencyLevel?)

    Declaration
    public CqlQuery<TEntity> SetConsistencyLevel(ConsistencyLevel? consistencyLevel)
    Parameters
    Type Name Description
    ConsistencyLevel? consistencyLevel
    Returns
    Type Description
    CqlQuery<TEntity>

    SetPageSize(int)

    Sets the page size for this query. The page size controls how much resulting rows will be retrieved simultaneously (the goal being to avoid loading too much results in memory for queries yielding large results). Please note that while value as low as 1 can be used, it is highly discouraged to use such a low value in practice as it will yield very poor performance. If in doubt, leaving the default is probably a good idea.

    Declaration
    public CqlQuery<TEntity> SetPageSize(int pageSize)
    Parameters
    Type Name Description
    int pageSize
    Returns
    Type Description
    CqlQuery<TEntity>

    This instance

    SetPagingState(byte[])

    Sets the paging state, a token representing the current page state of query used to continue paging by retrieving the following result page. Setting the paging state will disable automatic paging.

    Declaration
    public CqlQuery<TEntity> SetPagingState(byte[] pagingState)
    Parameters
    Type Name Description
    byte[] pagingState
    Returns
    Type Description
    CqlQuery<TEntity>

    This instance

    SetSerialConsistencyLevel(ConsistencyLevel)

    Declaration
    public CqlQuery<TEntity> SetSerialConsistencyLevel(ConsistencyLevel consistencyLevel)
    Parameters
    Type Name Description
    ConsistencyLevel consistencyLevel
    Returns
    Type Description
    CqlQuery<TEntity>

    ToString()

    Generates and returns cql query for this instance

    Declaration
    public override string ToString()
    Returns
    Type Description
    string
    Overrides
    object.ToString()

    Implements

    IStatement
    IQueryable<T>
    IEnumerable<T>
    IOrderedQueryable
    IQueryable
    IEnumerable

    Extension Methods

    CqlQueryExtensions.AllowFiltering<TSource>(CqlQuery<TSource>)
    CqlQueryExtensions.Count<TSource>(CqlQuery<TSource>)
    CqlQueryExtensions.DeleteIf<TSource>(CqlQuery<TSource>, Expression<Func<TSource, bool>>)
    CqlQueryExtensions.Delete<TSource>(CqlQuery<TSource>)
    CqlQueryExtensions.FirstOrDefault<TSource>(CqlQuery<TSource>)
    CqlQueryExtensions.First<TSource>(CqlQuery<TSource>)
    CqlQueryExtensions.GroupBy<TKey, TSource>(CqlQuery<TSource>, Expression<Func<TSource, TKey>>)
    CqlQueryExtensions.OrderByDescending<TSource, TKey>(CqlQuery<TSource>, Expression<Func<TSource, TKey>>)
    CqlQueryExtensions.OrderBy<TSource, TKey>(CqlQuery<TSource>, Expression<Func<TSource, TKey>>)
    CqlQueryExtensions.Select<TSource, TResult>(CqlQuery<TSource>, Expression<Func<TSource, TResult>>)
    CqlQueryExtensions.Take<TSource>(CqlQuery<TSource>, int)
    CqlQueryExtensions.ThenByDescending<TSource, TKey>(CqlQuery<TSource>, Expression<Func<TSource, TKey>>)
    CqlQueryExtensions.ThenBy<TSource, TKey>(CqlQuery<TSource>, Expression<Func<TSource, TKey>>)
    CqlQueryExtensions.UpdateIfExists<TSource>(CqlQuery<TSource>)
    CqlQueryExtensions.UpdateIf<TSource>(CqlQuery<TSource>, Expression<Func<TSource, bool>>)
    CqlQueryExtensions.Update<TSource>(CqlQuery<TSource>)
    CqlQueryExtensions.Where<TSource>(CqlQuery<TSource>, Expression<Func<TSource, bool>>)
    Back to top © DataStax, All rights reserved.