Was this page helpful?
Encoder¶
Encoder()
Serializes and deserializes to and from a CQL type and a Javascript Type.
Constructor¶
new Encoder()
Source
Methods¶
decode(buffer)
Decodes Cassandra bytes into Javascript values.
Parameters:
| Name | Type | Description |
|---|---|---|
buffer |
Raw buffer to be decoded. |
Source
decodeRows()
Decodes a whole page of results.
Source
encode(value, typeInfo)
Encodes Javascript types into Buffer according to the Cassandra protocol.
Parameters:
| Name | Type | Description |
|---|---|---|
value |
The value to be converted. |
|
typeInfo |
The type information. It can be either a: |
Source
Throws:
-
When there is an encoding error
- Type
- TypeError