Class UdtSerializer
Represents a Type
Inherited Members
Namespace: Cassandra.Serialization
Assembly: Cassandra.dll
Syntax
public class UdtSerializer : TypeSerializer<object>
Constructors
UdtSerializer()
Declaration
protected UdtSerializer()
Properties
CqlType
Returns the Cassandra data type for the serializer.
Declaration
public override ColumnTypeCode CqlType { get; }
Property Value
Type | Description |
---|---|
Column |
Overrides
Methods
Deserialize(ushort, byte[], int, int, IColumnInfo)
When overridden from a derived class, it reads the byte buffer and returns the CLR representation of the data type.
Declaration
public override object Deserialize(ushort protocolVersion, byte[] buffer, int offset, int length, IColumnInfo typeInfo)
Parameters
Type | Name | Description |
---|---|---|
ushort | protocolVersion | The Cassandra native protocol version. |
byte[] | buffer | The byte array. |
int | offset | The zero-based byte offset in buffer at which to begin storing data from the current stream. |
int | length | The maximum amount of bytes to read from buffer. |
IColumn |
typeInfo | Additional type information designed for non-primitive types. |
Returns
Type | Description |
---|---|
object |
Overrides
GetClrType(IColumnInfo)
Declaration
protected virtual Type GetClrType(IColumnInfo typeInfo)
Parameters
Type | Name | Description |
---|---|---|
IColumn |
typeInfo |
Returns
Type | Description |
---|---|
Type |
GetUdtMap(string)
Declaration
protected virtual UdtMap GetUdtMap(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name |
Returns
Type | Description |
---|---|
Udt |
GetUdtMap(Type)
Declaration
protected virtual UdtMap GetUdtMap(Type type)
Parameters
Type | Name | Description |
---|---|---|
Type | type |
Returns
Type | Description |
---|---|
Udt |
Serialize(ushort, object)
When overridden from a derived class, it encodes the CLR object into the byte representation according to the Cassandra native protocol.
Declaration
public override byte[] Serialize(ushort protocolVersion, object value)
Parameters
Type | Name | Description |
---|---|---|
ushort | protocolVersion | The Cassandra native protocol version. |
object | value | The object to encode. |
Returns
Type | Description |
---|---|
byte[] |
Overrides
SetUdtMap(string, UdtMap)
Sets a Udt map for a given Udt name
Declaration
public virtual void SetUdtMap(string name, UdtMap map)