• 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

    Interface IMapper

    A client for creating, updating, deleting, and reading POCOs from a Cassandra cluster.

    Inherited Members
    ICqlQueryAsyncClient.FetchAsync<T>(CqlQueryOptions)
    ICqlQueryAsyncClient.FetchAsync<T>(string, params object[])
    ICqlQueryAsyncClient.FetchAsync<T>(Cql)
    ICqlQueryAsyncClient.FetchPageAsync<T>(Cql)
    ICqlQueryAsyncClient.FetchPageAsync<T>(CqlQueryOptions)
    ICqlQueryAsyncClient.FetchPageAsync<T>(int, byte[], string, object[])
    ICqlQueryAsyncClient.SingleAsync<T>(string, params object[])
    ICqlQueryAsyncClient.SingleAsync<T>(Cql)
    ICqlQueryAsyncClient.SingleOrDefaultAsync<T>(string, params object[])
    ICqlQueryAsyncClient.SingleOrDefaultAsync<T>(Cql)
    ICqlQueryAsyncClient.FirstAsync<T>(string, params object[])
    ICqlQueryAsyncClient.FirstAsync<T>(Cql)
    ICqlQueryAsyncClient.FirstOrDefaultAsync<T>(string, params object[])
    ICqlQueryAsyncClient.FirstOrDefaultAsync<T>(Cql)
    ICqlWriteAsyncClient.InsertAsync<T>(T, CqlQueryOptions)
    ICqlWriteAsyncClient.InsertAsync<T>(T, bool, CqlQueryOptions)
    ICqlWriteAsyncClient.InsertAsync<T>(T, bool, int?, CqlQueryOptions)
    ICqlWriteAsyncClient.UpdateAsync<T>(T, CqlQueryOptions)
    ICqlWriteAsyncClient.UpdateAsync<T>(string, params object[])
    ICqlWriteAsyncClient.UpdateAsync<T>(Cql)
    ICqlWriteAsyncClient.DeleteAsync<T>(T, CqlQueryOptions)
    ICqlWriteAsyncClient.DeleteAsync<T>(string, params object[])
    ICqlWriteAsyncClient.DeleteAsync<T>(Cql)
    ICqlWriteAsyncClient.ExecuteAsync(string, params object[])
    ICqlWriteAsyncClient.ExecuteAsync(Cql)
    ICqlQueryClient.Fetch<T>(CqlQueryOptions)
    ICqlQueryClient.Fetch<T>(string, params object[])
    ICqlQueryClient.Fetch<T>(Cql)
    ICqlQueryClient.FetchPage<T>(Cql)
    ICqlQueryClient.FetchPage<T>(CqlQueryOptions)
    ICqlQueryClient.FetchPage<T>(int, byte[], string, object[])
    ICqlQueryClient.Single<T>(string, params object[])
    ICqlQueryClient.Single<T>(Cql)
    ICqlQueryClient.SingleOrDefault<T>(string, params object[])
    ICqlQueryClient.SingleOrDefault<T>(Cql)
    ICqlQueryClient.First<T>(string, params object[])
    ICqlQueryClient.First<T>(Cql)
    ICqlQueryClient.FirstOrDefault<T>(string, params object[])
    ICqlQueryClient.FirstOrDefault<T>(Cql)
    ICqlWriteClient.Insert<T>(T, CqlQueryOptions)
    ICqlWriteClient.Insert<T>(T, bool, CqlQueryOptions)
    ICqlWriteClient.Insert<T>(T, bool, int?, CqlQueryOptions)
    ICqlWriteClient.Update<T>(T, CqlQueryOptions)
    ICqlWriteClient.Update<T>(string, params object[])
    ICqlWriteClient.Update<T>(Cql)
    ICqlWriteClient.Delete<T>(T, CqlQueryOptions)
    ICqlWriteClient.Delete<T>(string, params object[])
    ICqlWriteClient.Delete<T>(Cql)
    ICqlWriteClient.Execute(string, params object[])
    ICqlWriteClient.Execute(Cql)
    Namespace: Cassandra.Mapping
    Assembly: Cassandra.dll
    Syntax
    public interface IMapper : ICqlQueryAsyncClient, ICqlWriteAsyncClient, ICqlQueryClient, ICqlWriteClient

    Methods

    ConvertCqlArgument<TValue, TDatabase>(TValue)

    Allows you to convert an argument/bind variable value being used in a CQL statement using the same converters that are being used by the client internally, including any user-defined conversions if you configured them. Will convert a value of Type TValue to a value of Type TDatabase or throw an InvalidOperationException if no converter is available.

    Declaration
    TDatabase ConvertCqlArgument<TValue, TDatabase>(TValue value)
    Parameters
    Type Name Description
    TValue value

    The value to convert.

    Returns
    Type Description
    TDatabase

    The converted value.

    Type Parameters
    Name Description
    TValue

    The original Type of the value.

    TDatabase

    The Type expected by Cassandra to convert to.

    CreateBatch()

    Creates a new batch.

    To set the consistency level, timestamp and other batch options, use WithOptions(Action<CqlQueryOptions>). Individual options for each query within the batch will be ignored.

    Declaration
    ICqlBatch CreateBatch()
    Returns
    Type Description
    ICqlBatch

    CreateBatch(BatchType)

    Creates a new batch.

    To set the consistency level, timestamp and other batch options, use WithOptions(Action<CqlQueryOptions>). Individual options for each query within the batch will be ignored.

    Declaration
    ICqlBatch CreateBatch(BatchType batchType)
    Parameters
    Type Name Description
    BatchType batchType
    Returns
    Type Description
    ICqlBatch

    DeleteAsync<T>(T, string, CqlQueryOptions)

    Deletes the specified POCO from Cassandra using the provided execution profile.

    Declaration
    Task DeleteAsync<T>(T poco, string executionProfile, CqlQueryOptions queryOptions = null)
    Parameters
    Type Name Description
    T poco
    string executionProfile
    CqlQueryOptions queryOptions
    Returns
    Type Description
    Task
    Type Parameters
    Name Description
    T

    DeleteIfAsync<T>(Cql)

    Deletes from the table for the POCO type specified (T) using the Cql query specified.
    Prepends "DELETE FROM tablename " to the CQL statement you specify, getting the tablename appropriately from the POCO Type T.

    Returns information whether it was applied or not. If it was not applied, it returns details of the existing values.

    Declaration
    Task<AppliedInfo<T>> DeleteIfAsync<T>(Cql cql)
    Parameters
    Type Name Description
    Cql cql
    Returns
    Type Description
    Task<AppliedInfo<T>>
    Type Parameters
    Name Description
    T

    DeleteIfAsync<T>(string, params object[])

    Deletes from the table for the POCO type specified (T) using the CQL string specified and query parameters specified.
    Prepends "DELETE FROM tablename " to the CQL statement you specify, getting the tablename appropriately from the POCO Type T.

    Returns information whether it was applied or not. If it was not applied, it returns details of the existing values.

    Declaration
    Task<AppliedInfo<T>> DeleteIfAsync<T>(string cql, params object[] args)
    Parameters
    Type Name Description
    string cql
    object[] args
    Returns
    Type Description
    Task<AppliedInfo<T>>
    Type Parameters
    Name Description
    T

    DeleteIf<T>(Cql)

    Deletes from the table for the POCO type specified (T) using the Cql query specified.
    Prepends "DELETE FROM tablename " to the CQL statement you specify, getting the tablename appropriately from the POCO Type T.

    Returns information whether it was applied or not. If it was not applied, it returns details of the existing values.

    Declaration
    AppliedInfo<T> DeleteIf<T>(Cql cql)
    Parameters
    Type Name Description
    Cql cql
    Returns
    Type Description
    AppliedInfo<T>
    Type Parameters
    Name Description
    T

    DeleteIf<T>(string, params object[])

    Deletes from the table for the POCO type specified (T) using the CQL string specified and query parameters specified.
    Prepends "DELETE FROM tablename " to the CQL statement you specify, getting the tablename appropriately from the POCO Type T.

    Returns information whether it was applied or not. If it was not applied, it returns details of the existing values.

    Declaration
    AppliedInfo<T> DeleteIf<T>(string cql, params object[] args)
    Parameters
    Type Name Description
    string cql
    object[] args
    Returns
    Type Description
    AppliedInfo<T>
    Type Parameters
    Name Description
    T

    Delete<T>(T, string, CqlQueryOptions)

    Deletes the specified POCO from Cassandra using the provided execution profile.

    Declaration
    void Delete<T>(T poco, string executionProfile, CqlQueryOptions queryOptions = null)
    Parameters
    Type Name Description
    T poco
    string executionProfile
    CqlQueryOptions queryOptions
    Type Parameters
    Name Description
    T

    Execute(ICqlBatch)

    Executes the batch specfied synchronously.

    Declaration
    void Execute(ICqlBatch batch)
    Parameters
    Type Name Description
    ICqlBatch batch
    Remarks

    To set the consistency level, timestamp and other batch options, use WithOptions(Action<CqlQueryOptions>). Individual options for each query within the batch will be ignored.

    Execute(ICqlBatch, string)

    Executes the batch specified synchronously with the provided execution profile.

    Declaration
    void Execute(ICqlBatch batch, string executionProfile)
    Parameters
    Type Name Description
    ICqlBatch batch
    string executionProfile
    Remarks

    To set the consistency level, timestamp and other batch options, use WithOptions(Action<CqlQueryOptions>). Individual options for each query within the batch will be ignored.

    ExecuteAsync(ICqlBatch)

    Executes the batch specified asynchronously.

    Declaration
    Task ExecuteAsync(ICqlBatch batch)
    Parameters
    Type Name Description
    ICqlBatch batch
    Returns
    Type Description
    Task
    Remarks

    To set the consistency level, timestamp and other batch options, use WithOptions(Action<CqlQueryOptions>). Individual options for each query within the batch will be ignored.

    ExecuteAsync(ICqlBatch, string)

    Executes the batch specified asynchronously with the provided execution profile.

    Declaration
    Task ExecuteAsync(ICqlBatch batch, string executionProfile)
    Parameters
    Type Name Description
    ICqlBatch batch
    string executionProfile
    Returns
    Type Description
    Task
    Remarks

    To set the consistency level, timestamp and other batch options, use WithOptions(Action<CqlQueryOptions>). Individual options for each query within the batch will be ignored.

    ExecuteConditionalAsync<T>(ICqlBatch)

    Executes a batch that contains a Lightweight transaction.

    Declaration
    Task<AppliedInfo<T>> ExecuteConditionalAsync<T>(ICqlBatch batch)
    Parameters
    Type Name Description
    ICqlBatch batch
    Returns
    Type Description
    Task<AppliedInfo<T>>
    Type Parameters
    Name Description
    T
    Remarks

    To set the consistency level, timestamp and other batch options, use WithOptions(Action<CqlQueryOptions>). Individual options for each query within the batch will be ignored.

    ExecuteConditionalAsync<T>(ICqlBatch, string)

    Executes a batch that contains a Lightweight transaction with the provided execution profile.

    Declaration
    Task<AppliedInfo<T>> ExecuteConditionalAsync<T>(ICqlBatch batch, string executionProfile)
    Parameters
    Type Name Description
    ICqlBatch batch
    string executionProfile
    Returns
    Type Description
    Task<AppliedInfo<T>>
    Type Parameters
    Name Description
    T
    Remarks

    To set the consistency level, timestamp and other batch options, use WithOptions(Action<CqlQueryOptions>). Individual options for each query within the batch will be ignored.

    ExecuteConditional<T>(ICqlBatch)

    Executes a batch that contains a Lightweight transaction.

    Declaration
    AppliedInfo<T> ExecuteConditional<T>(ICqlBatch batch)
    Parameters
    Type Name Description
    ICqlBatch batch
    Returns
    Type Description
    AppliedInfo<T>
    Type Parameters
    Name Description
    T
    Remarks

    To set the consistency level, timestamp and other batch options, use WithOptions(Action<CqlQueryOptions>). Individual options for each query within the batch will be ignored.

    ExecuteConditional<T>(ICqlBatch, string)

    Executes a batch that contains a Lightweight transaction.

    Declaration
    AppliedInfo<T> ExecuteConditional<T>(ICqlBatch batch, string executionProfile)
    Parameters
    Type Name Description
    ICqlBatch batch
    string executionProfile
    Returns
    Type Description
    AppliedInfo<T>
    Type Parameters
    Name Description
    T
    Remarks

    To set the consistency level, timestamp and other batch options, use WithOptions(Action<CqlQueryOptions>). Individual options for each query within the batch will be ignored.

    InsertAsync<T>(T, string, CqlQueryOptions)

    Inserts the specified POCO in Cassandra using the provided execution profile.

    Declaration
    Task InsertAsync<T>(T poco, string executionProfile, CqlQueryOptions queryOptions = null)
    Parameters
    Type Name Description
    T poco
    string executionProfile
    CqlQueryOptions queryOptions
    Returns
    Type Description
    Task
    Type Parameters
    Name Description
    T

    InsertAsync<T>(T, string, bool, CqlQueryOptions)

    Inserts the specified POCO in Cassandra using the provided execution profile.

    Declaration
    Task InsertAsync<T>(T poco, string executionProfile, bool insertNulls, CqlQueryOptions queryOptions = null)
    Parameters
    Type Name Description
    T poco

    The POCO instance

    string executionProfile

    The execution profile to use when executing the request.

    bool insertNulls

    Determines if the query must be generated using NULL values for null POCO 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.

    CqlQueryOptions queryOptions

    Optional query options

    Returns
    Type Description
    Task
    Type Parameters
    Name Description
    T

    InsertAsync<T>(T, string, bool, int?, CqlQueryOptions)

    Inserts the specified POCO in Cassandra using the provided execution profile.

    Declaration
    Task InsertAsync<T>(T poco, string executionProfile, bool insertNulls, int? ttl, CqlQueryOptions queryOptions = null)
    Parameters
    Type Name Description
    T poco

    The POCO instance

    string executionProfile

    The execution profile to use when executing the request.

    bool insertNulls

    Determines if the query must be generated using NULL values for null POCO 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.

    int? ttl

    Time to live (in seconds) for the inserted values. If set, the inserted values are automatically removed from the database after the specified time.

    CqlQueryOptions queryOptions

    Optional query options

    Returns
    Type Description
    Task
    Type Parameters
    Name Description
    T

    InsertIfNotExistsAsync<T>(T, CqlQueryOptions)

    Inserts the specified POCO in Cassandra, if not exists.

    Returns information whether it was applied or not. If it was not applied, it returns details of the existing values.

    Declaration
    Task<AppliedInfo<T>> InsertIfNotExistsAsync<T>(T poco, CqlQueryOptions queryOptions = null)
    Parameters
    Type Name Description
    T poco
    CqlQueryOptions queryOptions
    Returns
    Type Description
    Task<AppliedInfo<T>>
    Type Parameters
    Name Description
    T

    InsertIfNotExistsAsync<T>(T, bool, CqlQueryOptions)

    Inserts the specified POCO in Cassandra, if not exists.

    Declaration
    Task<AppliedInfo<T>> InsertIfNotExistsAsync<T>(T poco, bool insertNulls, CqlQueryOptions queryOptions = null)
    Parameters
    Type Name Description
    T poco

    The POCO instance

    bool insertNulls

    Determines if the query must be generated using NULL values for null POCO 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.

    CqlQueryOptions queryOptions

    Optional query options

    Returns
    Type Description
    Task<AppliedInfo<T>>
    Type Parameters
    Name Description
    T

    InsertIfNotExistsAsync<T>(T, bool, int?, CqlQueryOptions)

    Inserts the specified POCO in Cassandra, if not exists.

    Declaration
    Task<AppliedInfo<T>> InsertIfNotExistsAsync<T>(T poco, bool insertNulls, int? ttl, CqlQueryOptions queryOptions = null)
    Parameters
    Type Name Description
    T poco

    The POCO instance

    bool insertNulls

    Determines if the query must be generated using NULL values for null POCO 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.

    int? ttl

    Time to live (in seconds) for the inserted values. If set, the inserted values are automatically removed from the database after the specified time.

    CqlQueryOptions queryOptions

    Optional query options

    Returns
    Type Description
    Task<AppliedInfo<T>>
    Type Parameters
    Name Description
    T

    InsertIfNotExistsAsync<T>(T, string, CqlQueryOptions)

    Inserts the specified POCO in Cassandra, if not exists, with the provided execution profile.

    Returns information whether it was applied or not. If it was not applied, it returns details of the existing values.

    Declaration
    Task<AppliedInfo<T>> InsertIfNotExistsAsync<T>(T poco, string executionProfile, CqlQueryOptions queryOptions = null)
    Parameters
    Type Name Description
    T poco
    string executionProfile
    CqlQueryOptions queryOptions
    Returns
    Type Description
    Task<AppliedInfo<T>>
    Type Parameters
    Name Description
    T

    InsertIfNotExistsAsync<T>(T, string, bool, CqlQueryOptions)

    Inserts the specified POCO in Cassandra, if not exists, with the provided execution profile.

    Declaration
    Task<AppliedInfo<T>> InsertIfNotExistsAsync<T>(T poco, string executionProfile, bool insertNulls, CqlQueryOptions queryOptions = null)
    Parameters
    Type Name Description
    T poco

    The POCO instance

    string executionProfile

    The execution profile to use when executing the request.

    bool insertNulls

    Determines if the query must be generated using NULL values for null POCO 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.

    CqlQueryOptions queryOptions

    Optional query options

    Returns
    Type Description
    Task<AppliedInfo<T>>
    Type Parameters
    Name Description
    T

    InsertIfNotExistsAsync<T>(T, string, bool, int?, CqlQueryOptions)

    Inserts the specified POCO in Cassandra, if not exists, with the provided execution profile.

    Declaration
    Task<AppliedInfo<T>> InsertIfNotExistsAsync<T>(T poco, string executionProfile, bool insertNulls, int? ttl, CqlQueryOptions queryOptions = null)
    Parameters
    Type Name Description
    T poco

    The POCO instance

    string executionProfile

    The execution profile to use when executing the request.

    bool insertNulls

    Determines if the query must be generated using NULL values for null POCO 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.

    int? ttl

    Time to live (in seconds) for the inserted values. If set, the inserted values are automatically removed from the database after the specified time.

    CqlQueryOptions queryOptions

    Optional query options

    Returns
    Type Description
    Task<AppliedInfo<T>>
    Type Parameters
    Name Description
    T

    InsertIfNotExists<T>(T, CqlQueryOptions)

    Inserts the specified POCO in Cassandra, if not exists.

    Returns information whether it was applied or not. If it was not applied, it returns details of the existing values.

    Declaration
    AppliedInfo<T> InsertIfNotExists<T>(T poco, CqlQueryOptions queryOptions = null)
    Parameters
    Type Name Description
    T poco
    CqlQueryOptions queryOptions
    Returns
    Type Description
    AppliedInfo<T>
    Type Parameters
    Name Description
    T

    InsertIfNotExists<T>(T, bool, CqlQueryOptions)

    Inserts the specified POCO in Cassandra, if not exists.

    Declaration
    AppliedInfo<T> InsertIfNotExists<T>(T poco, bool insertNulls, CqlQueryOptions queryOptions = null)
    Parameters
    Type Name Description
    T poco

    The POCO instance

    bool insertNulls

    Determines if the query must be generated using NULL values for null POCO 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.

    CqlQueryOptions queryOptions

    Optional query options

    Returns
    Type Description
    AppliedInfo<T>
    Type Parameters
    Name Description
    T

    InsertIfNotExists<T>(T, bool, int?, CqlQueryOptions)

    Inserts the specified POCO in Cassandra, if not exists.

    Declaration
    AppliedInfo<T> InsertIfNotExists<T>(T poco, bool insertNulls, int? ttl, CqlQueryOptions queryOptions = null)
    Parameters
    Type Name Description
    T poco

    The POCO instance

    bool insertNulls

    Determines if the query must be generated using NULL values for null POCO 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.

    int? ttl

    Time to live (in seconds) for the inserted values. If set, the inserted values are automatically removed from the database after the specified time.

    CqlQueryOptions queryOptions

    Optional query options

    Returns
    Type Description
    AppliedInfo<T>
    Type Parameters
    Name Description
    T

    InsertIfNotExists<T>(T, string, CqlQueryOptions)

    Inserts the specified POCO in Cassandra, if not exists, with the provided execution profile.

    Returns information whether it was applied or not. If it was not applied, it returns details of the existing values.

    Declaration
    AppliedInfo<T> InsertIfNotExists<T>(T poco, string executionProfile, CqlQueryOptions queryOptions = null)
    Parameters
    Type Name Description
    T poco
    string executionProfile
    CqlQueryOptions queryOptions
    Returns
    Type Description
    AppliedInfo<T>
    Type Parameters
    Name Description
    T

    InsertIfNotExists<T>(T, string, bool, CqlQueryOptions)

    Inserts the specified POCO in Cassandra, if not exists, with the provided execution profile.

    Declaration
    AppliedInfo<T> InsertIfNotExists<T>(T poco, string executionProfile, bool insertNulls, CqlQueryOptions queryOptions = null)
    Parameters
    Type Name Description
    T poco

    The POCO instance

    string executionProfile

    The execution profile to use when executing the request.

    bool insertNulls

    Determines if the query must be generated using NULL values for null POCO 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.

    CqlQueryOptions queryOptions

    Optional query options

    Returns
    Type Description
    AppliedInfo<T>
    Type Parameters
    Name Description
    T

    InsertIfNotExists<T>(T, string, bool, int?, CqlQueryOptions)

    Inserts the specified POCO in Cassandra, if not exists, with the provided execution profile.

    Declaration
    AppliedInfo<T> InsertIfNotExists<T>(T poco, string executionProfile, bool insertNulls, int? ttl, CqlQueryOptions queryOptions = null)
    Parameters
    Type Name Description
    T poco

    The POCO instance

    string executionProfile

    The execution profile to use when executing the request.

    bool insertNulls

    Determines if the query must be generated using NULL values for null POCO 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.

    int? ttl

    Time to live (in seconds) for the inserted values. If set, the inserted values are automatically removed from the database after the specified time.

    CqlQueryOptions queryOptions

    Optional query options

    Returns
    Type Description
    AppliedInfo<T>
    Type Parameters
    Name Description
    T

    Insert<T>(T, string, CqlQueryOptions)

    Inserts the specified POCO in Cassandra using the provided execution profile.

    Declaration
    void Insert<T>(T poco, string executionProfile, CqlQueryOptions queryOptions = null)
    Parameters
    Type Name Description
    T poco
    string executionProfile
    CqlQueryOptions queryOptions
    Type Parameters
    Name Description
    T

    Insert<T>(T, string, bool, CqlQueryOptions)

    Inserts the specified POCO in Cassandra using the provided execution profile.

    Declaration
    void Insert<T>(T poco, string executionProfile, bool insertNulls, CqlQueryOptions queryOptions = null)
    Parameters
    Type Name Description
    T poco

    The POCO instance

    string executionProfile

    The execution profile to use when executing the request.

    bool insertNulls

    Determines if the query must be generated using NULL values for null POCO 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.

    CqlQueryOptions queryOptions

    Optional query options

    Type Parameters
    Name Description
    T

    Insert<T>(T, string, bool, int?, CqlQueryOptions)

    Inserts the specified POCO in Cassandra using the provided execution profile.

    Declaration
    void Insert<T>(T poco, string executionProfile, bool insertNulls, int? ttl, CqlQueryOptions queryOptions = null)
    Parameters
    Type Name Description
    T poco

    The POCO instance

    string executionProfile

    The execution profile to use when executing the request.

    bool insertNulls

    Determines if the query must be generated using NULL values for null POCO 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.

    int? ttl

    Time to live (in seconds) for the inserted values. If set, the inserted values are automatically removed from the database after the specified time.

    CqlQueryOptions queryOptions

    Optional query options

    Type Parameters
    Name Description
    T

    UpdateAsync<T>(T, string, CqlQueryOptions)

    Updates the POCO specified in Cassandra using the provided execution profile.

    Declaration
    Task UpdateAsync<T>(T poco, string executionProfile, CqlQueryOptions queryOptions = null)
    Parameters
    Type Name Description
    T poco
    string executionProfile
    CqlQueryOptions queryOptions
    Returns
    Type Description
    Task
    Type Parameters
    Name Description
    T

    UpdateIfAsync<T>(Cql)

    Updates the table for the poco type specified (T) using the CQL statement specified, using lightweight transactions. Prepends "UPDATE tablename" to the CQL statement you specify, getting the table name appropriately from the POCO Type T.

    Returns information whether it was applied or not. If it was not applied, it returns details of the existing values.

    Declaration
    Task<AppliedInfo<T>> UpdateIfAsync<T>(Cql cql)
    Parameters
    Type Name Description
    Cql cql
    Returns
    Type Description
    Task<AppliedInfo<T>>
    Type Parameters
    Name Description
    T

    UpdateIfAsync<T>(string, params object[])

    Updates the table for the poco type specified (T) using the CQL statement specified, using lightweight transactions. Prepends "UPDATE tablename" to the CQL statement you specify, getting the table name appropriately from the POCO Type T.

    Returns information whether it was applied or not. If it was not applied, it returns details of the existing values.

    Declaration
    Task<AppliedInfo<T>> UpdateIfAsync<T>(string cql, params object[] args)
    Parameters
    Type Name Description
    string cql
    object[] args
    Returns
    Type Description
    Task<AppliedInfo<T>>
    Type Parameters
    Name Description
    T

    UpdateIf<T>(Cql)

    Updates the table for the poco type specified (T) using the CQL statement specified, using lightweight transactions. Prepends "UPDATE tablename" to the CQL statement you specify, getting the table name appropriately from the POCO Type T.

    Returns information whether it was applied or not. If it was not applied, it returns details of the existing values.

    Declaration
    AppliedInfo<T> UpdateIf<T>(Cql cql)
    Parameters
    Type Name Description
    Cql cql
    Returns
    Type Description
    AppliedInfo<T>
    Type Parameters
    Name Description
    T

    UpdateIf<T>(string, params object[])

    Updates the table for the poco type specified (T) using the CQL statement specified, using lightweight transactions. Prepends "UPDATE tablename" to the CQL statement you specify, getting the table name appropriately from the POCO Type T.

    Returns information whether it was applied or not. If it was not applied, it returns details of the existing values.

    Declaration
    AppliedInfo<T> UpdateIf<T>(string cql, params object[] args)
    Parameters
    Type Name Description
    string cql
    object[] args
    Returns
    Type Description
    AppliedInfo<T>
    Type Parameters
    Name Description
    T

    Update<T>(T, string, CqlQueryOptions)

    Updates the POCO specified in Cassandra using the provided execution profile.

    Declaration
    void Update<T>(T poco, string executionProfile, CqlQueryOptions queryOptions = null)
    Parameters
    Type Name Description
    T poco
    string executionProfile
    CqlQueryOptions queryOptions
    Type Parameters
    Name Description
    T

    See Also

    Mapper
    Back to top © DataStax, All rights reserved.