Class ColumnMap
A class for defining how a property or field on a POCO is mapped to a column via a fluent-style interface.
Inheritance
System.Object
ColumnMap
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: Dse.dll
Syntax
public class ColumnMap : IColumnDefinition
Constructors
ColumnMap(MemberInfo, Type, Boolean)
Creates a new ColumnMap for the property/field specified by the MemberInfo.
Declaration
public ColumnMap(MemberInfo memberInfo, Type memberInfoType, bool isExplicitlyDefined)
Parameters
Type |
Name |
Description |
System.Reflection.MemberInfo |
memberInfo |
|
System.Type |
memberInfoType |
|
System.Boolean |
isExplicitlyDefined |
|
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 |
System.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 |
System.String |
columnName |
|
Returns
WithSecondaryIndex()
Tells the mapper that this column is defined also as a secondary index
Declaration
public ColumnMap WithSecondaryIndex()
Returns
Explicit Interface Implementations
IColumnDefinition.ColumnName
Declaration
string IColumnDefinition.ColumnName { get; }
Returns
Type |
Description |
System.String |
|
IColumnDefinition.ColumnType
Declaration
Type IColumnDefinition.ColumnType { get; }
Returns
Type |
Description |
System.Type |
|
IColumnDefinition.HasFrozenKey
Declaration
bool IColumnDefinition.HasFrozenKey { get; }
Returns
Type |
Description |
System.Boolean |
|
IColumnDefinition.HasFrozenValue
Declaration
bool IColumnDefinition.HasFrozenValue { get; }
Returns
Type |
Description |
System.Boolean |
|
IColumnDefinition.Ignore
Declaration
bool IColumnDefinition.Ignore { get; }
Returns
Type |
Description |
System.Boolean |
|
IColumnDefinition.IsCounter
Declaration
bool IColumnDefinition.IsCounter { get; }
Returns
Type |
Description |
System.Boolean |
|
IColumnDefinition.IsExplicitlyDefined
Declaration
bool IColumnDefinition.IsExplicitlyDefined { get; }
Returns
Type |
Description |
System.Boolean |
|
IColumnDefinition.IsFrozen
Declaration
bool IColumnDefinition.IsFrozen { get; }
Returns
Type |
Description |
System.Boolean |
|
IColumnDefinition.IsStatic
Declaration
bool IColumnDefinition.IsStatic { get; }
Returns
Type |
Description |
System.Boolean |
|
IColumnDefinition.MemberInfo
Declaration
MemberInfo IColumnDefinition.MemberInfo { get; }
Returns
Type |
Description |
System.Reflection.MemberInfo |
|
IColumnDefinition.MemberInfoType
Declaration
Type IColumnDefinition.MemberInfoType { get; }
Returns
Type |
Description |
System.Type |
|
IColumnDefinition.SecondaryIndex
Declaration
bool IColumnDefinition.SecondaryIndex { get; }
Returns
Type |
Description |
System.Boolean |
|
Implements