Class ColumnMap
A class for defining how a property or field on a POCO is mapped to a column via a fluent-style interface.
Assembly: Cassandra.dll
Syntax
public class ColumnMap : IColumnDefinition
Constructors
ColumnMap(MemberInfo, Type, bool)
Creates a new ColumnMap for the property/field specified by the MemberInfo.
Declaration
public ColumnMap(MemberInfo memberInfo, Type memberInfoType, bool isExplicitlyDefined)
Parameters
Methods
AsCounter()
Tells the mapper that this is a counter column
Declaration
public ColumnMap AsCounter()
Returns
AsFrozen()
Tells the mapper that the column type is frozen.
Only valid for collections, tuples, and user-defined types. For example: frozen<address>
Declaration
public ColumnMap AsFrozen()
Returns
AsStatic()
Tells the mapper that this is a static column
Declaration
public ColumnMap AsStatic()
Returns
Ignore()
Tells the mapper to ignore this property/field when mapping.
Declaration
public ColumnMap Ignore()
Returns
WithDbType(Type)
Tells the mapper to convert the data in the property or field to the Type specified when doing an INSERT or UPDATE (i.e. the
column type in Cassandra). (NOTE: This does NOT affect the Type when fetching/SELECTing data from the database.)
Declaration
public ColumnMap WithDbType(Type type)
Parameters
Type |
Name |
Description |
Type |
type |
|
Returns
WithDbType<T>()
Tells the mapper to convert the data in the property or field to Type T when doing an INSERT or UPDATE (i.e. the
column type in Cassandra). (NOTE: This does NOT affect the Type when fetching/SELECTing data from the database.)
Declaration
public ColumnMap WithDbType<T>()
Returns
Type Parameters
WithFrozenKey()
Tells the mapper that the key of the column type is frozen.
Only valid for maps and sets, for example: map<frozen<tuple<text, text>>, uuid> .
Declaration
public ColumnMap WithFrozenKey()
Returns
WithFrozenValue()
Tells the mapper that the value of the column type is frozen.
Only valid for maps and lists, for example: map<uuid, frozen<tuple<text, text>>> .
Declaration
public ColumnMap WithFrozenValue()
Returns
WithName(string)
Tells the mapper to use the column name specified when mapping the property/field.
Declaration
public ColumnMap WithName(string columnName)
Parameters
Type |
Name |
Description |
string |
columnName |
|
Returns
WithSecondaryIndex()
Tells the mapper that this column is defined also as a secondary index
Declaration
public ColumnMap WithSecondaryIndex()
Returns
Implements