• 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 Map<TPoco>

    A class for defining how to map a POCO via a fluent-style interface. The mapping for Type T should be defined in the constructor of the sub class.

    Inheritance
    object
    Map<TPoco>
    Implements
    ITypeDefinition
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Cassandra.Mapping
    Assembly: Cassandra.dll
    Syntax
    public class Map<TPoco> : ITypeDefinition
    Type Parameters
    Name Description
    TPoco

    Constructors

    Map()

    Creates a new fluent mapping definition for POCOs of Type TPoco.

    Declaration
    public Map()

    Methods

    CaseSensitive()

    Specifies that when generating queries, the table and column names identifiers must be quoted. Defaults to false.

    Declaration
    public Map<TPoco> CaseSensitive()
    Returns
    Type Description
    Map<TPoco>

    ClusteringKey(Expression<Func<TPoco, object>>)

    Specifies a Clustering key with unspecified order

    Declaration
    public Map<TPoco> ClusteringKey(Expression<Func<TPoco, object>> column)
    Parameters
    Type Name Description
    Expression<Func<TPoco, object>> column

    Expression to select the property or the field

    Returns
    Type Description
    Map<TPoco>

    ClusteringKey(Expression<Func<TPoco, object>>, SortOrder)

    Specifies a Clustering key with its clustering order

    Declaration
    public Map<TPoco> ClusteringKey(Expression<Func<TPoco, object>> column, SortOrder order)
    Parameters
    Type Name Description
    Expression<Func<TPoco, object>> column

    Expression to select the property or the field

    SortOrder order

    Clustering order

    Returns
    Type Description
    Map<TPoco>

    ClusteringKey(params string[])

    Specifies the clustering key column names for the table using the order provided.

    Declaration
    public Map<TPoco> ClusteringKey(params string[] columnNames)
    Parameters
    Type Name Description
    string[] columnNames
    Returns
    Type Description
    Map<TPoco>

    ClusteringKey(params Tuple<string, SortOrder>[])

    Specifies the Clustering keys with the corresponding clustering order

    Declaration
    public Map<TPoco> ClusteringKey(params Tuple<string, SortOrder>[] columnNames)
    Parameters
    Type Name Description
    Tuple<string, SortOrder>[] columnNames
    Returns
    Type Description
    Map<TPoco>

    Column<TProp>(Expression<Func<TPoco, TProp>>)

    Sets the mapping for the expression using the default options.

    Declaration
    public Map<TPoco> Column<TProp>(Expression<Func<TPoco, TProp>> column)
    Parameters
    Type Name Description
    Expression<Func<TPoco, TProp>> column
    Returns
    Type Description
    Map<TPoco>
    Type Parameters
    Name Description
    TProp

    Column<TProp>(Expression<Func<TPoco, TProp>>, Action<ColumnMap>)

    Defines options for mapping the column specified.

    Declaration
    public Map<TPoco> Column<TProp>(Expression<Func<TPoco, TProp>> column, Action<ColumnMap> columnConfig)
    Parameters
    Type Name Description
    Expression<Func<TPoco, TProp>> column
    Action<ColumnMap> columnConfig
    Returns
    Type Description
    Map<TPoco>
    Type Parameters
    Name Description
    TProp

    CompactStorage()

    Specifies that the table is defined as COMPACT STORAGE

    Declaration
    public Map<TPoco> CompactStorage()
    Returns
    Type Description
    Map<TPoco>

    ExplicitColumns()

    Specifies that when mapping, we should only map columns that are explicitly defined here. Use the Column method to define columns.

    Declaration
    public Map<TPoco> ExplicitColumns()
    Returns
    Type Description
    Map<TPoco>

    KeyspaceName(string)

    Specifies that when mapping, the table name should include the keyspace. Use only if the table you are mapping is in a different keyspace than the current ISession.

    Declaration
    public Map<TPoco> KeyspaceName(string name)
    Parameters
    Type Name Description
    string name
    Returns
    Type Description
    Map<TPoco>

    PartitionKey(params Expression<Func<TPoco, object>>[])

    Specifies the properties/fields on the POCO whose column names are the partition key for the table.

    Declaration
    public Map<TPoco> PartitionKey(params Expression<Func<TPoco, object>>[] columns)
    Parameters
    Type Name Description
    Expression<Func<TPoco, object>>[] columns
    Returns
    Type Description
    Map<TPoco>

    PartitionKey(params string[])

    Specifies the partition key column names for the table using the order provided.

    Declaration
    public Map<TPoco> PartitionKey(params string[] columnNames)
    Parameters
    Type Name Description
    string[] columnNames
    Returns
    Type Description
    Map<TPoco>

    TableName(string)

    Specifies what table to map the POCO to.

    Declaration
    public Map<TPoco> TableName(string tableName)
    Parameters
    Type Name Description
    string tableName
    Returns
    Type Description
    Map<TPoco>

    Implements

    ITypeDefinition
    Back to top © DataStax, All rights reserved.