Was this page helpful?
EncoderMembers¶
(abstract) EncoderMembers(encodingOptions)
Declares the privileged instance members. Due to historical reasons, it was always separate from Encoder. It's likely because previously Encoder was exposed in the API (it no longer is) and such separation allowed to keep members of this class private (invisible in the public API docs). Currently it's kept separate to easier code reading / editing. This class focuses on encoding/decoding methods for individual types, while Encoder "public" (only for the driver) part of the API. You can only use this class through Encoder, and do not instantiate it directly.
Constructor¶
(abstract) new EncoderMembers(encodingOptions)
Parameters:
| Name | Type | Description |
|---|---|---|
encodingOptions |
* |
Source
Methods¶
_parseUdtName(typeName, startIndex, length) → {UdtColumnInfo}
Parameters:
| Name | Type | Description |
|---|---|---|
typeName |
string | |
startIndex |
number | |
length |
number |
Source
Returns:
- Type
- UdtColumnInfo
encodeCustom(value, columnInfo) → {Buffer}
Parameters:
| Name | Type | Description |
|---|---|---|
value |
any | |
columnInfo |
OtherCustomColumnInfo | VectorColumnInfo |
Source
Returns:
- Type
- Buffer
encodeSet(value, columnInfo) → {Buffer}
Parameters:
| Name | Type | Description |
|---|---|---|
value |
Array:.<any:> | Object | |
columnInfo |
* |
Source
Returns:
- Type
- Buffer
encodeUdt(value, columnInfo) → {Buffer}
Parameters:
| Name | Type | Description |
|---|---|---|
value |
any | |
columnInfo |
UdtColumnInfo |
Source
Returns:
- Type
- Buffer
encodeVector(value, params) → {Buffer}
Parameters:
| Name | Type | Description |
|---|---|---|
value |
Vector | |
params |
VectorColumnInfo |
Source
Returns:
- Type
- Buffer
parseVectorTypeArgs(typeName, stringToExclude, subtypeResolveFn) → {VectorColumnInfo}
Extract the (typed) arguments from a vector type
Parameters:
| Name | Type | Description |
|---|---|---|
typeName |
String | |
stringToExclude |
String | Leading string indicating this is a vector type (to be excluded when eval'ing args) |
subtypeResolveFn |
function | Function used to resolve subtype type; varies depending on type naming convention |
Source
Returns:
- Type
- VectorColumnInfo
serializationSizeIfFixed(cqlType) → {Number}
Parameters:
| Name | Type | Description |
|---|---|---|
cqlType |
ColumnInfo |
Source
Returns:
- Type
- Number