Was this page helpful?
Caution
You're viewing documentation for an unstable version of ScyllaDB Node.js Driver. Switch to the latest stable version.
EncoderMembers¶
(abstract) EncoderMembers()
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()
Source
Members¶
decodeCollectionLength
Selected from the protocol version by setProtocolVersion.
Source
decodeLong
Selected from the encoding options, once, in the constructor.
Source
handleBuffer
Selected from the encoding options by the Encoder constructor.
Source
Methods¶
encode()
Implemented by Encoder, which is the only way to reach this class.
Source
serializationSizeIfFixed(cqlType)
Gets the size of each value of a type, when all its values have the same size.
Parameters:
| Name | Type | Description |
|---|---|---|
cqlType |
The type. It can also be a hint: a type name or a type code. |
Source
Throws:
-
When the type information is not valid
- Type
- TypeError
Returns:
The size in bytes, or -1 for a type with values of different sizes.