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

    A Linq IQueryProvider that represents a table in Cassandra

    Inheritance
    object
    Statement
    CqlQueryBase<TEntity>
    CqlQuery<TEntity>
    Table<TEntity>
    Implements
    IStatement
    IQueryable<TEntity>
    IEnumerable<TEntity>
    IOrderedQueryable
    IQueryable
    IEnumerable
    ITable
    IQueryProvider
    Inherited Members
    CqlQuery<TEntity>.Provider
    CqlQuery<TEntity>.GetEnumerator()
    CqlQuery<TEntity>.SetConsistencyLevel(ConsistencyLevel?)
    CqlQuery<TEntity>.SetSerialConsistencyLevel(ConsistencyLevel)
    CqlQuery<TEntity>.SetPageSize(int)
    CqlQuery<TEntity>.SetPagingState(byte[])
    CqlQuery<TEntity>.GetCql(out object[])
    CqlQuery<TEntity>.ExecutePagedAsync()
    CqlQuery<TEntity>.ExecutePaged()
    CqlQuery<TEntity>.ExecutePagedAsync(string)
    CqlQuery<TEntity>.ExecutePaged(string)
    CqlQuery<TEntity>.ToString()
    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 Table<TEntity> : CqlQuery<TEntity>, IStatement, IQueryable<TEntity>, IEnumerable<TEntity>, IOrderedQueryable, IQueryable, IEnumerable, ITable, IQueryProvider
    Type Parameters
    Name Description
    TEntity

    Constructors

    Table(ISession)

    Creates a new instance of the Linq IQueryProvider that represents a table in Cassandra using Global configuration.

    Declaration
    public Table(ISession session)
    Parameters
    Type Name Description
    ISession session

    Session instance to be used to execute the statements

    Table(ISession, MappingConfiguration)

    Creates a new instance of the Linq IQueryProvider that represents a table in Cassandra using the mapping configuration provided.

    Fluent configuration or attributes can be used to define mapping information.

    Declaration
    public Table(ISession session, MappingConfiguration config)
    Parameters
    Type Name Description
    ISession session

    Session instance to be used to execute the statements

    MappingConfiguration config

    Mapping configuration

    Remarks

    In case no mapping information is defined, case-insensitive class and method names will be used.

    Table(ISession, MappingConfiguration, string)

    Creates a new instance of the Linq IQueryProvider that represents a table in Cassandra using the mapping configuration provided.

    Use this constructor if you want to use a different table name than the one defined in the mapping configuration.

    Fluent configuration or attributes can be used to define mapping information.

    Declaration
    public Table(ISession session, MappingConfiguration config, string tableName)
    Parameters
    Type Name Description
    ISession session

    Session instance to be used to execute the statements

    MappingConfiguration config

    Mapping configuration

    string tableName

    Name of the table

    Remarks

    In case no mapping information is defined, case-insensitive class and method names will be used.

    Table(ISession, MappingConfiguration, string, string)

    Creates a new instance of the Linq IQueryProvider that represents a table in Cassandra using the mapping configuration provided.

    Use this constructor if you want to use a different table and keyspace names than the ones defined in the mapping configuration.

    Fluent configuration or attributes can be used to define mapping information.

    Declaration
    public Table(ISession session, MappingConfiguration config, string tableName, string keyspaceName)
    Parameters
    Type Name Description
    ISession session

    Session instance to be used to execute the statements

    MappingConfiguration config

    Mapping configuration

    string tableName

    Name of the table

    string keyspaceName

    Name of the keyspace were the table was created.

    Remarks

    In case no mapping information is defined, case-insensitive class and method names will be used.

    Properties

    KeyspaceName

    Gets the name of the keyspace used. If null, it uses the active session keyspace.

    Declaration
    public string KeyspaceName { get; }
    Property Value
    Type Description
    string

    Name

    Gets the name of the Table in Cassandra

    Declaration
    public string Name { get; }
    Property Value
    Type Description
    string

    Methods

    Create()

    Declaration
    public void Create()

    CreateAsync()

    Declaration
    public Task CreateAsync()
    Returns
    Type Description
    Task

    CreateIfNotExists()

    Declaration
    public void CreateIfNotExists()

    CreateIfNotExistsAsync()

    Declaration
    public Task CreateIfNotExistsAsync()
    Returns
    Type Description
    Task

    CreateQuery<TElement>(Expression)

    Creates a CqlQuery<TEntity>

    Declaration
    public IQueryable<TElement> CreateQuery<TElement>(Expression expression)
    Parameters
    Type Name Description
    Expression expression
    Returns
    Type Description
    IQueryable<TElement>
    Type Parameters
    Name Description
    TElement

    GetEntityType()

    Declaration
    public Type GetEntityType()
    Returns
    Type Description
    Type

    GetSession()

    Declaration
    public ISession GetSession()
    Returns
    Type Description
    ISession

    GetTableType()

    Declaration
    public TableType GetTableType()
    Returns
    Type Description
    TableType

    Insert(TEntity)

    Returns a new CqlInsert<TEntity> command. Use Execute() method to execute the query.

    Declaration
    public CqlInsert<TEntity> Insert(TEntity entity)
    Parameters
    Type Name Description
    TEntity entity
    Returns
    Type Description
    CqlInsert<TEntity>

    Insert(TEntity, bool)

    Returns a new CqlInsert<TEntity> command. Use Execute() method to execute the query.

    Declaration
    public CqlInsert<TEntity> Insert(TEntity entity, bool insertNulls)
    Parameters
    Type Name Description
    TEntity entity

    The entity to insert

    bool insertNulls

    Determines if the query must be generated using NULL values for null entity members.

    Use false if you don't want to consider null values for the INSERT operation (recommended).

    Use true if you want to override all the values in the table, generating tombstones for null values.

    Returns
    Type Description
    CqlInsert<TEntity>

    Implements

    IStatement
    IQueryable<T>
    IEnumerable<T>
    IOrderedQueryable
    IQueryable
    IEnumerable
    ITable
    IQueryProvider

    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>>)
    CqlQueryExtensions.FirstOrDefault<TSource>(Table<TSource>, Expression<Func<TSource, bool>>)
    CqlQueryExtensions.First<TSource>(Table<TSource>, Expression<Func<TSource, bool>>)
    Back to top © DataStax, All rights reserved.