Was this page helpful?
Caution
You're viewing documentation for an unstable version of ScyllaDB Node.js Driver. Switch to the latest stable version.
Tuple¶
types~Tuple()
Represents a sequence of immutable objects.
Tuples are sequences, just like Arrays. The only difference is that tuples are read only.
As tuples can be used as Map keys, the toString method calls toString for each element, trying to get a unique string key.
Constructor¶
Members¶
(readonly) elements
Returns elements of the tuple.
Source
(readonly) length
Returns the number of the elements.
Source
Methods¶
get(index)
Returns value located at the given index.
Parameters:
| Name | Type | Description |
|---|---|---|
index |
Element index |
Source
toJSON()
Returns an Array representation of the sequence.
Source
toString()
Returns a string representation of the sequence, surrounded by parenthesis, ie: (1, 2).
The returned value attempts to be a unique string representation of its values.
Source
values()
Gets the elements as an Array.
Source
(static) fromArray()
Creates a new instance of Tuple from an Array.
Source