• 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 CqlQuery<TEntity>

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

    Inheritance
    System.Object
    Statement
    CqlQueryBase<TEntity>
    CqlQuery<TEntity>
    Table<TEntity>
    Implements
    IStatement
    System.Linq.IQueryable<TEntity>
    System.Collections.Generic.IEnumerable<TEntity>
    System.Linq.IOrderedQueryable
    System.Linq.IQueryable
    System.Collections.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(Boolean)
    Statement.SetReadTimeoutMillis(Int32)
    Statement.SetTimestamp(DateTimeOffset)
    Statement.EnableTracing(Boolean)
    Statement.DisableTracing()
    Statement.SetRetryPolicy(IRetryPolicy)
    Statement.SetIdempotence(Boolean)
    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 class CqlQuery<TEntity> : CqlQueryBase<TEntity>, IInternalStatement, 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
    System.Linq.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
    System.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
    System.Threading.Tasks.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
    System.String executionProfile
    Returns
    Type Description
    System.Threading.Tasks.Task<IPage<TEntity>>

    GetCql(out Object[])

    Declaration
    protected override string GetCql(out object[] values)
    Parameters
    Type Name Description
    System.Object[] values
    Returns
    Type Description
    System.String
    Overrides
    Dse.Data.Linq.CqlQueryBase<TEntity>.GetCql(System.Object[])

    GetEnumerator()

    Declaration
    public IEnumerator<TEntity> GetEnumerator()
    Returns
    Type Description
    System.Collections.Generic.IEnumerator<TEntity>

    SetConsistencyLevel(Nullable<ConsistencyLevel>)

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

    SetPageSize(Int32)

    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
    System.Int32 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
    System.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
    System.String
    Overrides
    System.Object.ToString()

    Explicit Interface Implementations

    IEnumerable.GetEnumerator()

    Declaration
    IEnumerator IEnumerable.GetEnumerator()
    Returns
    Type Description
    System.Collections.IEnumerator

    Implements

    IStatement
    System.Linq.IQueryable<T>
    System.Collections.Generic.IEnumerable<T>
    System.Linq.IOrderedQueryable
    System.Linq.IQueryable
    System.Collections.IEnumerable

    Extension Methods

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