Module: types

Classes

BigDecimal
InetAddress
Integer
ResultSet
ResultStream
Row
TimeUuid
Tuple
Uuid

Members

(inner) consistencies :Object

Consistency levels
Type:
  • Object
Properties:
Name Type Description
any Number Writing: A write must be written to at least one node. If all replica nodes for the given row key are down, the write can still succeed after a hinted handoff has been written. If all replica nodes are down at write time, an ANY write is not readable until the replica nodes for that row have recovered.
one Number Returns a response from the closest replica, as determined by the snitch.
two Number Returns the most recent data from two of the closest replicas.
three Number Returns the most recent data from three of the closest replicas.
quorum Number Reading: Returns the record with the most recent timestamp after a quorum of replicas has responded regardless of data center. Writing: A write must be written to the commit log and memory table on a quorum of replica nodes.
all Number Reading: Returns the record with the most recent timestamp after all replicas have responded. The read operation will fail if a replica does not respond. Writing: A write must be written to the commit log and memory table on all replica nodes in the cluster for that row.
localQuorum Number Reading: Returns the record with the most recent timestamp once a quorum of replicas in the current data center as the coordinator node has reported. Writing: A write must be written to the commit log and memory table on a quorum of replica nodes in the same data center as the coordinator node. Avoids latency of inter-data center communication.
eachQuorum Number Reading: Returns the record once a quorum of replicas in each data center of the cluster has responded. Writing: Strong consistency. A write must be written to the commit log and memtable on a quorum of replica nodes in all data centers.
serial Number Achieves linearizable consistency for lightweight transactions by preventing unconditional updates.
localSerial Number Same as serial but confined to the data center. A write must be written conditionally to the commit log and memtable on a quorum of replica nodes in the same data center.
localOne Number Similar to One but only within the DC the coordinator is in.

(inner) dataTypes :Object

CQL data types
Type:
  • Object

(inner) distance

Represents the host distance

(inner) responseErrorCodes

Server error codes returned by Cassandra

Methods

(inner) generateTimestamp(dateopt, microsecondsopt) → {Long}

Generates a value representing the timestamp for the query in microseconds based on the date and the microseconds provided
Parameters:
Name Type Attributes Description
date Date <optional>
The date to generate the value, if not provided it will use the current date.
microseconds Number <optional>
A number from 0 to 999 used to build the microseconds part of the date.
Returns:
Type
Long

(inner) timeuuid(optionsopt, bufferopt, offsetopt)

Backward compatibility only, use TimeUuid instead.

Generates and returns a RFC4122 v1 (timestamp based) UUID in a string representation.
Parameters:
Name Type Attributes Description
options Object <optional>
buffer Buffer <optional>
offset Number <optional>
Deprecated:

(inner) uuid()

Backward compatibility only, use Uuid class instead.

Generate and return a RFC4122 v4 UUID in a string representation.
Deprecated:
  • Use Uuid class instead