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.
Assembly: Cassandra.dll
Syntax
public class Map<TPoco> : ITypeDefinition
Type Parameters
Constructors
Map()
Creates a new fluent mapping definition for POCOs of Type TPoco.
Declaration
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
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
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
Returns
Type |
Description |
Map<TPoco> |
|
Type Parameters
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
Returns
Type |
Description |
Map<TPoco> |
|
Type Parameters
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
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