Was this page helpful?
Caution
You're viewing documentation for an unstable version of ScyllaDB Node.js Driver. Switch to the latest stable version.
types¶
Classes¶
Members¶
(inner) LocalTime
Gets the hour component of the time represented by the current instance, a number from 0 to 23.
(inner) LocalTime
Gets the minute component of the time represented by the current instance, a number from 0 to 59.
(inner) LocalTime
Gets the second component of the time represented by the current instance, a number from 0 to 59.
(inner) LocalTime
Gets the nanoseconds component of the time represented by the current instance, a number from 0 to 999999999.
(inner, constant) 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. |
Source
(inner, constant) consistencyToString :Object<number, string>
Mapping of consistency level codes to their string representation.
Type:
- Object<number, string>
Source
(inner, constant) dataTypes :Object
CQL data types
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
custom |
Number | A custom type. |
ascii |
Number | ASCII character string. |
bigint |
Number | 64-bit signed long. |
blob |
Number | Arbitrary bytes (no validation). |
boolean |
Number | true or false. |
counter |
Number | Counter column (64-bit signed value). |
decimal |
Number | Variable-precision decimal. |
double |
Number | 64-bit IEEE-754 floating point. |
float |
Number | 32-bit IEEE-754 floating point. |
int |
Number | 32-bit signed integer. |
text |
Number | UTF8 encoded string. |
timestamp |
Number | A timestamp. |
uuid |
Number | Type 1 or type 4 UUID. |
varchar |
Number | UTF8 encoded string. |
varint |
Number | Arbitrary-precision integer. |
timeuuid |
Number | Type 1 UUID. |
inet |
Number | An IP address. It can be either 4 bytes long (IPv4) or 16 bytes long (IPv6). |
date |
Number | A date without a time-zone in the ISO-8601 calendar system. |
time |
Number | A value representing the time portion of the day. |
smallint |
Number | 16-bit two's complement integer. |
tinyint |
Number | 8-bit two's complement integer. |
list |
Number | A collection of elements. |
map |
Number | Key/value pairs. |
set |
Number | A collection that contains no duplicate elements. |
udt |
Number | User-defined type. |
tuple |
Number | A sequence of values. |
Source
(inner, constant) dateCenter
2^31 days before unix epoch is -5877641-06-23. This is the first day that can be represented by this class.
(inner, constant) distance :Object
Represents the distance of Cassandra node as assigned by a LoadBalancingPolicy relatively to the driver instance.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
local |
Number | A local node. |
remote |
Number | A remote node. |
ignored |
Number | A node that is meant to be ignored. |
Source
(inner, constant) logLevels :Object
Log level values used for the logLevel client option and emitted in 'log' events.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
trace |
String | Finest-grained diagnostic information (TRACE level events). |
debug |
String | Fine-grained diagnostic information useful during development (DEBUG level events). |
info |
String | High-level informational messages. |
warning |
String | Potentially harmful situations (default when logLevel is not set). |
error |
String | Error conditions. |
off |
String | Disables internal driver log forwarding. |
Source
(inner, constant) protocolVersion :Object
Contains information for the different protocol versions supported by the driver.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
v1 |
Number | Cassandra protocol v1, supported in Apache Cassandra 1.2-->2.2. |
v2 |
Number | Cassandra protocol v2, supported in Apache Cassandra 2.0-->2.2. |
v3 |
Number | Cassandra protocol v3, supported in Apache Cassandra 2.1-->3.x. |
v4 |
Number | Cassandra protocol v4, supported in Apache Cassandra 2.2-->3.x. |
v5 |
Number | Cassandra protocol v5, in beta from Apache Cassandra 3.x+. Currently not supported by the driver. |
dseV1 |
Number | DataStax Enterprise protocol v1, DSE 5.1+ |
dseV2 |
Number | DataStax Enterprise protocol v2, DSE 6.0+ |
maxSupported |
Number | Returns the higher protocol version that is supported by this driver. |
minSupported |
Number | Returns the lower protocol version that is supported by this driver. |
isSupported |
function | A function that returns a boolean determining whether a given protocol version is supported. |
(inner, constant) responseErrorCodes :Object
Server error codes returned by Cassandra
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
serverError |
Number | Something unexpected happened. |
protocolError |
Number | Some client message triggered a protocol violation. |
badCredentials |
Number | Authentication was required and failed. |
unavailableException |
Number | Raised when coordinator knows there is not enough replicas alive to perform a query with the requested consistency level. |
overloaded |
Number | The request cannot be processed because the coordinator is overloaded. |
isBootstrapping |
Number | The request was a read request but the coordinator node is bootstrapping. |
truncateError |
Number | Error encountered during a truncate request. |
writeTimeout |
Number | Timeout encountered on write query on coordinator waiting for response(s) from replicas. |
readTimeout |
Number | Timeout encountered on read query on coordinator waitign for response(s) from replicas. |
readFailure |
Number | A non-timeout error encountered during a read request. |
functionFailure |
Number | A (user defined) function encountered during execution. |
writeFailure |
Number | A non-timeout error encountered during a write request. |
syntaxError |
Number | The submitted query has a syntax error. |
unauthorized |
Number | The logged user doesn't have the right to perform the query. |
invalid |
Number | The query is syntactically correct but invalid. |
configError |
Number | The query is invalid because of some configuration issue. |
alreadyExists |
Number | The query attempted to create a schema element (i.e. keyspace, table) that already exists. |
unprepared |
Number | Can be thrown while a prepared statement tries to be executed if the provided statement is not known by the coordinator. |
Source
(inner, constant) unset
Unset representation.
Use this field if you want to set a parameter to unset. Valid for Cassandra 2.2 and above.
Source
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. |
Source
Returns:
- Type
- Long
(inner) isLeapYear(year) → {boolean}
Parameters:
| Name | Type | Description |
|---|---|---|
year |
Number |
Returns:
- Type
- boolean
Classes¶
Members¶
(inner) LocalTime
Gets the hour component of the time represented by the current instance, a number from 0 to 23.
(inner) LocalTime
Gets the minute component of the time represented by the current instance, a number from 0 to 59.
(inner) LocalTime
Gets the second component of the time represented by the current instance, a number from 0 to 59.
(inner) LocalTime
Gets the nanoseconds component of the time represented by the current instance, a number from 0 to 999999999.
(inner, constant) 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. |
Source
(inner, constant) consistencyToString :Object<number, string>
Mapping of consistency level codes to their string representation.
Type:
- Object<number, string>
Source
(inner, constant) dataTypes :Object
CQL data types
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
custom |
Number | A custom type. |
ascii |
Number | ASCII character string. |
bigint |
Number | 64-bit signed long. |
blob |
Number | Arbitrary bytes (no validation). |
boolean |
Number | true or false. |
counter |
Number | Counter column (64-bit signed value). |
decimal |
Number | Variable-precision decimal. |
double |
Number | 64-bit IEEE-754 floating point. |
float |
Number | 32-bit IEEE-754 floating point. |
int |
Number | 32-bit signed integer. |
text |
Number | UTF8 encoded string. |
timestamp |
Number | A timestamp. |
uuid |
Number | Type 1 or type 4 UUID. |
varchar |
Number | UTF8 encoded string. |
varint |
Number | Arbitrary-precision integer. |
timeuuid |
Number | Type 1 UUID. |
inet |
Number | An IP address. It can be either 4 bytes long (IPv4) or 16 bytes long (IPv6). |
date |
Number | A date without a time-zone in the ISO-8601 calendar system. |
time |
Number | A value representing the time portion of the day. |
smallint |
Number | 16-bit two's complement integer. |
tinyint |
Number | 8-bit two's complement integer. |
list |
Number | A collection of elements. |
map |
Number | Key/value pairs. |
set |
Number | A collection that contains no duplicate elements. |
udt |
Number | User-defined type. |
tuple |
Number | A sequence of values. |
Source
(inner, constant) dateCenter
2^31 days before unix epoch is -5877641-06-23. This is the first day that can be represented by this class.
(inner, constant) distance :Object
Represents the distance of Cassandra node as assigned by a LoadBalancingPolicy relatively to the driver instance.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
local |
Number | A local node. |
remote |
Number | A remote node. |
ignored |
Number | A node that is meant to be ignored. |
Source
(inner, constant) logLevels :Object
Log level values used for the logLevel client option and emitted in 'log' events.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
trace |
String | Finest-grained diagnostic information (TRACE level events). |
debug |
String | Fine-grained diagnostic information useful during development (DEBUG level events). |
info |
String | High-level informational messages. |
warning |
String | Potentially harmful situations (default when logLevel is not set). |
error |
String | Error conditions. |
off |
String | Disables internal driver log forwarding. |
Source
(inner, constant) protocolVersion :Object
Contains information for the different protocol versions supported by the driver.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
v1 |
Number | Cassandra protocol v1, supported in Apache Cassandra 1.2-->2.2. |
v2 |
Number | Cassandra protocol v2, supported in Apache Cassandra 2.0-->2.2. |
v3 |
Number | Cassandra protocol v3, supported in Apache Cassandra 2.1-->3.x. |
v4 |
Number | Cassandra protocol v4, supported in Apache Cassandra 2.2-->3.x. |
v5 |
Number | Cassandra protocol v5, in beta from Apache Cassandra 3.x+. Currently not supported by the driver. |
dseV1 |
Number | DataStax Enterprise protocol v1, DSE 5.1+ |
dseV2 |
Number | DataStax Enterprise protocol v2, DSE 6.0+ |
maxSupported |
Number | Returns the higher protocol version that is supported by this driver. |
minSupported |
Number | Returns the lower protocol version that is supported by this driver. |
isSupported |
function | A function that returns a boolean determining whether a given protocol version is supported. |
(inner, constant) responseErrorCodes :Object
Server error codes returned by Cassandra
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
serverError |
Number | Something unexpected happened. |
protocolError |
Number | Some client message triggered a protocol violation. |
badCredentials |
Number | Authentication was required and failed. |
unavailableException |
Number | Raised when coordinator knows there is not enough replicas alive to perform a query with the requested consistency level. |
overloaded |
Number | The request cannot be processed because the coordinator is overloaded. |
isBootstrapping |
Number | The request was a read request but the coordinator node is bootstrapping. |
truncateError |
Number | Error encountered during a truncate request. |
writeTimeout |
Number | Timeout encountered on write query on coordinator waiting for response(s) from replicas. |
readTimeout |
Number | Timeout encountered on read query on coordinator waitign for response(s) from replicas. |
readFailure |
Number | A non-timeout error encountered during a read request. |
functionFailure |
Number | A (user defined) function encountered during execution. |
writeFailure |
Number | A non-timeout error encountered during a write request. |
syntaxError |
Number | The submitted query has a syntax error. |
unauthorized |
Number | The logged user doesn't have the right to perform the query. |
invalid |
Number | The query is syntactically correct but invalid. |
configError |
Number | The query is invalid because of some configuration issue. |
alreadyExists |
Number | The query attempted to create a schema element (i.e. keyspace, table) that already exists. |
unprepared |
Number | Can be thrown while a prepared statement tries to be executed if the provided statement is not known by the coordinator. |
Source
(inner, constant) unset
Unset representation.
Use this field if you want to set a parameter to unset. Valid for Cassandra 2.2 and above.
Source
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. |
Source
Returns:
- Type
- Long
(inner) isLeapYear(year) → {boolean}
Parameters:
| Name | Type | Description |
|---|---|---|
year |
Number |
Returns:
- Type
- boolean
Classes¶
Members¶
(inner) LocalTime
Gets the hour component of the time represented by the current instance, a number from 0 to 23.
(inner) LocalTime
Gets the minute component of the time represented by the current instance, a number from 0 to 59.
(inner) LocalTime
Gets the second component of the time represented by the current instance, a number from 0 to 59.
(inner) LocalTime
Gets the nanoseconds component of the time represented by the current instance, a number from 0 to 999999999.
(inner, constant) 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. |
Source
(inner, constant) consistencyToString :Object<number, string>
Mapping of consistency level codes to their string representation.
Type:
- Object<number, string>
Source
(inner, constant) dataTypes :Object
CQL data types
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
custom |
Number | A custom type. |
ascii |
Number | ASCII character string. |
bigint |
Number | 64-bit signed long. |
blob |
Number | Arbitrary bytes (no validation). |
boolean |
Number | true or false. |
counter |
Number | Counter column (64-bit signed value). |
decimal |
Number | Variable-precision decimal. |
double |
Number | 64-bit IEEE-754 floating point. |
float |
Number | 32-bit IEEE-754 floating point. |
int |
Number | 32-bit signed integer. |
text |
Number | UTF8 encoded string. |
timestamp |
Number | A timestamp. |
uuid |
Number | Type 1 or type 4 UUID. |
varchar |
Number | UTF8 encoded string. |
varint |
Number | Arbitrary-precision integer. |
timeuuid |
Number | Type 1 UUID. |
inet |
Number | An IP address. It can be either 4 bytes long (IPv4) or 16 bytes long (IPv6). |
date |
Number | A date without a time-zone in the ISO-8601 calendar system. |
time |
Number | A value representing the time portion of the day. |
smallint |
Number | 16-bit two's complement integer. |
tinyint |
Number | 8-bit two's complement integer. |
list |
Number | A collection of elements. |
map |
Number | Key/value pairs. |
set |
Number | A collection that contains no duplicate elements. |
udt |
Number | User-defined type. |
tuple |
Number | A sequence of values. |
Source
(inner, constant) dateCenter
2^31 days before unix epoch is -5877641-06-23. This is the first day that can be represented by this class.
(inner, constant) distance :Object
Represents the distance of Cassandra node as assigned by a LoadBalancingPolicy relatively to the driver instance.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
local |
Number | A local node. |
remote |
Number | A remote node. |
ignored |
Number | A node that is meant to be ignored. |
Source
(inner, constant) logLevels :Object
Log level values used for the logLevel client option and emitted in 'log' events.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
trace |
String | Finest-grained diagnostic information (TRACE level events). |
debug |
String | Fine-grained diagnostic information useful during development (DEBUG level events). |
info |
String | High-level informational messages. |
warning |
String | Potentially harmful situations (default when logLevel is not set). |
error |
String | Error conditions. |
off |
String | Disables internal driver log forwarding. |
Source
(inner, constant) protocolVersion :Object
Contains information for the different protocol versions supported by the driver.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
v1 |
Number | Cassandra protocol v1, supported in Apache Cassandra 1.2-->2.2. |
v2 |
Number | Cassandra protocol v2, supported in Apache Cassandra 2.0-->2.2. |
v3 |
Number | Cassandra protocol v3, supported in Apache Cassandra 2.1-->3.x. |
v4 |
Number | Cassandra protocol v4, supported in Apache Cassandra 2.2-->3.x. |
v5 |
Number | Cassandra protocol v5, in beta from Apache Cassandra 3.x+. Currently not supported by the driver. |
dseV1 |
Number | DataStax Enterprise protocol v1, DSE 5.1+ |
dseV2 |
Number | DataStax Enterprise protocol v2, DSE 6.0+ |
maxSupported |
Number | Returns the higher protocol version that is supported by this driver. |
minSupported |
Number | Returns the lower protocol version that is supported by this driver. |
isSupported |
function | A function that returns a boolean determining whether a given protocol version is supported. |
(inner, constant) responseErrorCodes :Object
Server error codes returned by Cassandra
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
serverError |
Number | Something unexpected happened. |
protocolError |
Number | Some client message triggered a protocol violation. |
badCredentials |
Number | Authentication was required and failed. |
unavailableException |
Number | Raised when coordinator knows there is not enough replicas alive to perform a query with the requested consistency level. |
overloaded |
Number | The request cannot be processed because the coordinator is overloaded. |
isBootstrapping |
Number | The request was a read request but the coordinator node is bootstrapping. |
truncateError |
Number | Error encountered during a truncate request. |
writeTimeout |
Number | Timeout encountered on write query on coordinator waiting for response(s) from replicas. |
readTimeout |
Number | Timeout encountered on read query on coordinator waitign for response(s) from replicas. |
readFailure |
Number | A non-timeout error encountered during a read request. |
functionFailure |
Number | A (user defined) function encountered during execution. |
writeFailure |
Number | A non-timeout error encountered during a write request. |
syntaxError |
Number | The submitted query has a syntax error. |
unauthorized |
Number | The logged user doesn't have the right to perform the query. |
invalid |
Number | The query is syntactically correct but invalid. |
configError |
Number | The query is invalid because of some configuration issue. |
alreadyExists |
Number | The query attempted to create a schema element (i.e. keyspace, table) that already exists. |
unprepared |
Number | Can be thrown while a prepared statement tries to be executed if the provided statement is not known by the coordinator. |
Source
(inner, constant) unset
Unset representation.
Use this field if you want to set a parameter to unset. Valid for Cassandra 2.2 and above.
Source
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. |
Source
Returns:
- Type
- Long
(inner) isLeapYear(year) → {boolean}
Parameters:
| Name | Type | Description |
|---|---|---|
year |
Number |
Returns:
- Type
- boolean
Classes¶
Members¶
(inner) LocalTime
Gets the hour component of the time represented by the current instance, a number from 0 to 23.
(inner) LocalTime
Gets the minute component of the time represented by the current instance, a number from 0 to 59.
(inner) LocalTime
Gets the second component of the time represented by the current instance, a number from 0 to 59.
(inner) LocalTime
Gets the nanoseconds component of the time represented by the current instance, a number from 0 to 999999999.
(inner, constant) 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. |
Source
(inner, constant) consistencyToString :Object<number, string>
Mapping of consistency level codes to their string representation.
Type:
- Object<number, string>
Source
(inner, constant) dataTypes :Object
CQL data types
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
custom |
Number | A custom type. |
ascii |
Number | ASCII character string. |
bigint |
Number | 64-bit signed long. |
blob |
Number | Arbitrary bytes (no validation). |
boolean |
Number | true or false. |
counter |
Number | Counter column (64-bit signed value). |
decimal |
Number | Variable-precision decimal. |
double |
Number | 64-bit IEEE-754 floating point. |
float |
Number | 32-bit IEEE-754 floating point. |
int |
Number | 32-bit signed integer. |
text |
Number | UTF8 encoded string. |
timestamp |
Number | A timestamp. |
uuid |
Number | Type 1 or type 4 UUID. |
varchar |
Number | UTF8 encoded string. |
varint |
Number | Arbitrary-precision integer. |
timeuuid |
Number | Type 1 UUID. |
inet |
Number | An IP address. It can be either 4 bytes long (IPv4) or 16 bytes long (IPv6). |
date |
Number | A date without a time-zone in the ISO-8601 calendar system. |
time |
Number | A value representing the time portion of the day. |
smallint |
Number | 16-bit two's complement integer. |
tinyint |
Number | 8-bit two's complement integer. |
list |
Number | A collection of elements. |
map |
Number | Key/value pairs. |
set |
Number | A collection that contains no duplicate elements. |
udt |
Number | User-defined type. |
tuple |
Number | A sequence of values. |
Source
(inner, constant) dateCenter
2^31 days before unix epoch is -5877641-06-23. This is the first day that can be represented by this class.
(inner, constant) distance :Object
Represents the distance of Cassandra node as assigned by a LoadBalancingPolicy relatively to the driver instance.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
local |
Number | A local node. |
remote |
Number | A remote node. |
ignored |
Number | A node that is meant to be ignored. |
Source
(inner, constant) logLevels :Object
Log level values used for the logLevel client option and emitted in 'log' events.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
trace |
String | Finest-grained diagnostic information (TRACE level events). |
debug |
String | Fine-grained diagnostic information useful during development (DEBUG level events). |
info |
String | High-level informational messages. |
warning |
String | Potentially harmful situations (default when logLevel is not set). |
error |
String | Error conditions. |
off |
String | Disables internal driver log forwarding. |
Source
(inner, constant) protocolVersion :Object
Contains information for the different protocol versions supported by the driver.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
v1 |
Number | Cassandra protocol v1, supported in Apache Cassandra 1.2-->2.2. |
v2 |
Number | Cassandra protocol v2, supported in Apache Cassandra 2.0-->2.2. |
v3 |
Number | Cassandra protocol v3, supported in Apache Cassandra 2.1-->3.x. |
v4 |
Number | Cassandra protocol v4, supported in Apache Cassandra 2.2-->3.x. |
v5 |
Number | Cassandra protocol v5, in beta from Apache Cassandra 3.x+. Currently not supported by the driver. |
dseV1 |
Number | DataStax Enterprise protocol v1, DSE 5.1+ |
dseV2 |
Number | DataStax Enterprise protocol v2, DSE 6.0+ |
maxSupported |
Number | Returns the higher protocol version that is supported by this driver. |
minSupported |
Number | Returns the lower protocol version that is supported by this driver. |
isSupported |
function | A function that returns a boolean determining whether a given protocol version is supported. |
(inner, constant) responseErrorCodes :Object
Server error codes returned by Cassandra
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
serverError |
Number | Something unexpected happened. |
protocolError |
Number | Some client message triggered a protocol violation. |
badCredentials |
Number | Authentication was required and failed. |
unavailableException |
Number | Raised when coordinator knows there is not enough replicas alive to perform a query with the requested consistency level. |
overloaded |
Number | The request cannot be processed because the coordinator is overloaded. |
isBootstrapping |
Number | The request was a read request but the coordinator node is bootstrapping. |
truncateError |
Number | Error encountered during a truncate request. |
writeTimeout |
Number | Timeout encountered on write query on coordinator waiting for response(s) from replicas. |
readTimeout |
Number | Timeout encountered on read query on coordinator waitign for response(s) from replicas. |
readFailure |
Number | A non-timeout error encountered during a read request. |
functionFailure |
Number | A (user defined) function encountered during execution. |
writeFailure |
Number | A non-timeout error encountered during a write request. |
syntaxError |
Number | The submitted query has a syntax error. |
unauthorized |
Number | The logged user doesn't have the right to perform the query. |
invalid |
Number | The query is syntactically correct but invalid. |
configError |
Number | The query is invalid because of some configuration issue. |
alreadyExists |
Number | The query attempted to create a schema element (i.e. keyspace, table) that already exists. |
unprepared |
Number | Can be thrown while a prepared statement tries to be executed if the provided statement is not known by the coordinator. |
Source
(inner, constant) unset
Unset representation.
Use this field if you want to set a parameter to unset. Valid for Cassandra 2.2 and above.
Source
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. |
Source
Returns:
- Type
- Long
(inner) isLeapYear(year) → {boolean}
Parameters:
| Name | Type | Description |
|---|---|---|
year |
Number |
Returns:
- Type
- boolean
Classes¶
Members¶
(inner) LocalTime
Gets the hour component of the time represented by the current instance, a number from 0 to 23.
(inner) LocalTime
Gets the minute component of the time represented by the current instance, a number from 0 to 59.
(inner) LocalTime
Gets the second component of the time represented by the current instance, a number from 0 to 59.
(inner) LocalTime
Gets the nanoseconds component of the time represented by the current instance, a number from 0 to 999999999.
(inner, constant) 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. |
Source
(inner, constant) consistencyToString :Object<number, string>
Mapping of consistency level codes to their string representation.
Type:
- Object<number, string>
Source
(inner, constant) dataTypes :Object
CQL data types
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
custom |
Number | A custom type. |
ascii |
Number | ASCII character string. |
bigint |
Number | 64-bit signed long. |
blob |
Number | Arbitrary bytes (no validation). |
boolean |
Number | true or false. |
counter |
Number | Counter column (64-bit signed value). |
decimal |
Number | Variable-precision decimal. |
double |
Number | 64-bit IEEE-754 floating point. |
float |
Number | 32-bit IEEE-754 floating point. |
int |
Number | 32-bit signed integer. |
text |
Number | UTF8 encoded string. |
timestamp |
Number | A timestamp. |
uuid |
Number | Type 1 or type 4 UUID. |
varchar |
Number | UTF8 encoded string. |
varint |
Number | Arbitrary-precision integer. |
timeuuid |
Number | Type 1 UUID. |
inet |
Number | An IP address. It can be either 4 bytes long (IPv4) or 16 bytes long (IPv6). |
date |
Number | A date without a time-zone in the ISO-8601 calendar system. |
time |
Number | A value representing the time portion of the day. |
smallint |
Number | 16-bit two's complement integer. |
tinyint |
Number | 8-bit two's complement integer. |
list |
Number | A collection of elements. |
map |
Number | Key/value pairs. |
set |
Number | A collection that contains no duplicate elements. |
udt |
Number | User-defined type. |
tuple |
Number | A sequence of values. |
Source
(inner, constant) dateCenter
2^31 days before unix epoch is -5877641-06-23. This is the first day that can be represented by this class.
(inner, constant) distance :Object
Represents the distance of Cassandra node as assigned by a LoadBalancingPolicy relatively to the driver instance.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
local |
Number | A local node. |
remote |
Number | A remote node. |
ignored |
Number | A node that is meant to be ignored. |
Source
(inner, constant) logLevels :Object
Log level values used for the logLevel client option and emitted in 'log' events.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
trace |
String | Finest-grained diagnostic information (TRACE level events). |
debug |
String | Fine-grained diagnostic information useful during development (DEBUG level events). |
info |
String | High-level informational messages. |
warning |
String | Potentially harmful situations (default when logLevel is not set). |
error |
String | Error conditions. |
off |
String | Disables internal driver log forwarding. |
Source
(inner, constant) protocolVersion :Object
Contains information for the different protocol versions supported by the driver.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
v1 |
Number | Cassandra protocol v1, supported in Apache Cassandra 1.2-->2.2. |
v2 |
Number | Cassandra protocol v2, supported in Apache Cassandra 2.0-->2.2. |
v3 |
Number | Cassandra protocol v3, supported in Apache Cassandra 2.1-->3.x. |
v4 |
Number | Cassandra protocol v4, supported in Apache Cassandra 2.2-->3.x. |
v5 |
Number | Cassandra protocol v5, in beta from Apache Cassandra 3.x+. Currently not supported by the driver. |
dseV1 |
Number | DataStax Enterprise protocol v1, DSE 5.1+ |
dseV2 |
Number | DataStax Enterprise protocol v2, DSE 6.0+ |
maxSupported |
Number | Returns the higher protocol version that is supported by this driver. |
minSupported |
Number | Returns the lower protocol version that is supported by this driver. |
isSupported |
function | A function that returns a boolean determining whether a given protocol version is supported. |
(inner, constant) responseErrorCodes :Object
Server error codes returned by Cassandra
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
serverError |
Number | Something unexpected happened. |
protocolError |
Number | Some client message triggered a protocol violation. |
badCredentials |
Number | Authentication was required and failed. |
unavailableException |
Number | Raised when coordinator knows there is not enough replicas alive to perform a query with the requested consistency level. |
overloaded |
Number | The request cannot be processed because the coordinator is overloaded. |
isBootstrapping |
Number | The request was a read request but the coordinator node is bootstrapping. |
truncateError |
Number | Error encountered during a truncate request. |
writeTimeout |
Number | Timeout encountered on write query on coordinator waiting for response(s) from replicas. |
readTimeout |
Number | Timeout encountered on read query on coordinator waitign for response(s) from replicas. |
readFailure |
Number | A non-timeout error encountered during a read request. |
functionFailure |
Number | A (user defined) function encountered during execution. |
writeFailure |
Number | A non-timeout error encountered during a write request. |
syntaxError |
Number | The submitted query has a syntax error. |
unauthorized |
Number | The logged user doesn't have the right to perform the query. |
invalid |
Number | The query is syntactically correct but invalid. |
configError |
Number | The query is invalid because of some configuration issue. |
alreadyExists |
Number | The query attempted to create a schema element (i.e. keyspace, table) that already exists. |
unprepared |
Number | Can be thrown while a prepared statement tries to be executed if the provided statement is not known by the coordinator. |
Source
(inner, constant) unset
Unset representation.
Use this field if you want to set a parameter to unset. Valid for Cassandra 2.2 and above.
Source
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. |
Source
Returns:
- Type
- Long
(inner) isLeapYear(year) → {boolean}
Parameters:
| Name | Type | Description |
|---|---|---|
year |
Number |
Returns:
- Type
- boolean
Classes¶
Members¶
(inner) LocalTime
Gets the hour component of the time represented by the current instance, a number from 0 to 23.
(inner) LocalTime
Gets the minute component of the time represented by the current instance, a number from 0 to 59.
(inner) LocalTime
Gets the second component of the time represented by the current instance, a number from 0 to 59.
(inner) LocalTime
Gets the nanoseconds component of the time represented by the current instance, a number from 0 to 999999999.
(inner, constant) 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. |
Source
(inner, constant) consistencyToString :Object<number, string>
Mapping of consistency level codes to their string representation.
Type:
- Object<number, string>
Source
(inner, constant) dataTypes :Object
CQL data types
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
custom |
Number | A custom type. |
ascii |
Number | ASCII character string. |
bigint |
Number | 64-bit signed long. |
blob |
Number | Arbitrary bytes (no validation). |
boolean |
Number | true or false. |
counter |
Number | Counter column (64-bit signed value). |
decimal |
Number | Variable-precision decimal. |
double |
Number | 64-bit IEEE-754 floating point. |
float |
Number | 32-bit IEEE-754 floating point. |
int |
Number | 32-bit signed integer. |
text |
Number | UTF8 encoded string. |
timestamp |
Number | A timestamp. |
uuid |
Number | Type 1 or type 4 UUID. |
varchar |
Number | UTF8 encoded string. |
varint |
Number | Arbitrary-precision integer. |
timeuuid |
Number | Type 1 UUID. |
inet |
Number | An IP address. It can be either 4 bytes long (IPv4) or 16 bytes long (IPv6). |
date |
Number | A date without a time-zone in the ISO-8601 calendar system. |
time |
Number | A value representing the time portion of the day. |
smallint |
Number | 16-bit two's complement integer. |
tinyint |
Number | 8-bit two's complement integer. |
list |
Number | A collection of elements. |
map |
Number | Key/value pairs. |
set |
Number | A collection that contains no duplicate elements. |
udt |
Number | User-defined type. |
tuple |
Number | A sequence of values. |
Source
(inner, constant) dateCenter
2^31 days before unix epoch is -5877641-06-23. This is the first day that can be represented by this class.
(inner, constant) distance :Object
Represents the distance of Cassandra node as assigned by a LoadBalancingPolicy relatively to the driver instance.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
local |
Number | A local node. |
remote |
Number | A remote node. |
ignored |
Number | A node that is meant to be ignored. |
Source
(inner, constant) logLevels :Object
Log level values used for the logLevel client option and emitted in 'log' events.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
trace |
String | Finest-grained diagnostic information (TRACE level events). |
debug |
String | Fine-grained diagnostic information useful during development (DEBUG level events). |
info |
String | High-level informational messages. |
warning |
String | Potentially harmful situations (default when logLevel is not set). |
error |
String | Error conditions. |
off |
String | Disables internal driver log forwarding. |
Source
(inner, constant) protocolVersion :Object
Contains information for the different protocol versions supported by the driver.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
v1 |
Number | Cassandra protocol v1, supported in Apache Cassandra 1.2-->2.2. |
v2 |
Number | Cassandra protocol v2, supported in Apache Cassandra 2.0-->2.2. |
v3 |
Number | Cassandra protocol v3, supported in Apache Cassandra 2.1-->3.x. |
v4 |
Number | Cassandra protocol v4, supported in Apache Cassandra 2.2-->3.x. |
v5 |
Number | Cassandra protocol v5, in beta from Apache Cassandra 3.x+. Currently not supported by the driver. |
dseV1 |
Number | DataStax Enterprise protocol v1, DSE 5.1+ |
dseV2 |
Number | DataStax Enterprise protocol v2, DSE 6.0+ |
maxSupported |
Number | Returns the higher protocol version that is supported by this driver. |
minSupported |
Number | Returns the lower protocol version that is supported by this driver. |
isSupported |
function | A function that returns a boolean determining whether a given protocol version is supported. |
(inner, constant) responseErrorCodes :Object
Server error codes returned by Cassandra
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
serverError |
Number | Something unexpected happened. |
protocolError |
Number | Some client message triggered a protocol violation. |
badCredentials |
Number | Authentication was required and failed. |
unavailableException |
Number | Raised when coordinator knows there is not enough replicas alive to perform a query with the requested consistency level. |
overloaded |
Number | The request cannot be processed because the coordinator is overloaded. |
isBootstrapping |
Number | The request was a read request but the coordinator node is bootstrapping. |
truncateError |
Number | Error encountered during a truncate request. |
writeTimeout |
Number | Timeout encountered on write query on coordinator waiting for response(s) from replicas. |
readTimeout |
Number | Timeout encountered on read query on coordinator waitign for response(s) from replicas. |
readFailure |
Number | A non-timeout error encountered during a read request. |
functionFailure |
Number | A (user defined) function encountered during execution. |
writeFailure |
Number | A non-timeout error encountered during a write request. |
syntaxError |
Number | The submitted query has a syntax error. |
unauthorized |
Number | The logged user doesn't have the right to perform the query. |
invalid |
Number | The query is syntactically correct but invalid. |
configError |
Number | The query is invalid because of some configuration issue. |
alreadyExists |
Number | The query attempted to create a schema element (i.e. keyspace, table) that already exists. |
unprepared |
Number | Can be thrown while a prepared statement tries to be executed if the provided statement is not known by the coordinator. |
Source
(inner, constant) unset
Unset representation.
Use this field if you want to set a parameter to unset. Valid for Cassandra 2.2 and above.
Source
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. |
Source
Returns:
- Type
- Long
(inner) isLeapYear(year) → {boolean}
Parameters:
| Name | Type | Description |
|---|---|---|
year |
Number |
Returns:
- Type
- boolean
Classes¶
Members¶
(inner) LocalTime
Gets the hour component of the time represented by the current instance, a number from 0 to 23.
(inner) LocalTime
Gets the minute component of the time represented by the current instance, a number from 0 to 59.
(inner) LocalTime
Gets the second component of the time represented by the current instance, a number from 0 to 59.
(inner) LocalTime
Gets the nanoseconds component of the time represented by the current instance, a number from 0 to 999999999.
(inner, constant) 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. |
Source
(inner, constant) consistencyToString :Object<number, string>
Mapping of consistency level codes to their string representation.
Type:
- Object<number, string>
Source
(inner, constant) dataTypes :Object
CQL data types
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
custom |
Number | A custom type. |
ascii |
Number | ASCII character string. |
bigint |
Number | 64-bit signed long. |
blob |
Number | Arbitrary bytes (no validation). |
boolean |
Number | true or false. |
counter |
Number | Counter column (64-bit signed value). |
decimal |
Number | Variable-precision decimal. |
double |
Number | 64-bit IEEE-754 floating point. |
float |
Number | 32-bit IEEE-754 floating point. |
int |
Number | 32-bit signed integer. |
text |
Number | UTF8 encoded string. |
timestamp |
Number | A timestamp. |
uuid |
Number | Type 1 or type 4 UUID. |
varchar |
Number | UTF8 encoded string. |
varint |
Number | Arbitrary-precision integer. |
timeuuid |
Number | Type 1 UUID. |
inet |
Number | An IP address. It can be either 4 bytes long (IPv4) or 16 bytes long (IPv6). |
date |
Number | A date without a time-zone in the ISO-8601 calendar system. |
time |
Number | A value representing the time portion of the day. |
smallint |
Number | 16-bit two's complement integer. |
tinyint |
Number | 8-bit two's complement integer. |
list |
Number | A collection of elements. |
map |
Number | Key/value pairs. |
set |
Number | A collection that contains no duplicate elements. |
udt |
Number | User-defined type. |
tuple |
Number | A sequence of values. |
Source
(inner, constant) dateCenter
2^31 days before unix epoch is -5877641-06-23. This is the first day that can be represented by this class.
(inner, constant) distance :Object
Represents the distance of Cassandra node as assigned by a LoadBalancingPolicy relatively to the driver instance.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
local |
Number | A local node. |
remote |
Number | A remote node. |
ignored |
Number | A node that is meant to be ignored. |
Source
(inner, constant) logLevels :Object
Log level values used for the logLevel client option and emitted in 'log' events.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
trace |
String | Finest-grained diagnostic information (TRACE level events). |
debug |
String | Fine-grained diagnostic information useful during development (DEBUG level events). |
info |
String | High-level informational messages. |
warning |
String | Potentially harmful situations (default when logLevel is not set). |
error |
String | Error conditions. |
off |
String | Disables internal driver log forwarding. |
Source
(inner, constant) protocolVersion :Object
Contains information for the different protocol versions supported by the driver.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
v1 |
Number | Cassandra protocol v1, supported in Apache Cassandra 1.2-->2.2. |
v2 |
Number | Cassandra protocol v2, supported in Apache Cassandra 2.0-->2.2. |
v3 |
Number | Cassandra protocol v3, supported in Apache Cassandra 2.1-->3.x. |
v4 |
Number | Cassandra protocol v4, supported in Apache Cassandra 2.2-->3.x. |
v5 |
Number | Cassandra protocol v5, in beta from Apache Cassandra 3.x+. Currently not supported by the driver. |
dseV1 |
Number | DataStax Enterprise protocol v1, DSE 5.1+ |
dseV2 |
Number | DataStax Enterprise protocol v2, DSE 6.0+ |
maxSupported |
Number | Returns the higher protocol version that is supported by this driver. |
minSupported |
Number | Returns the lower protocol version that is supported by this driver. |
isSupported |
function | A function that returns a boolean determining whether a given protocol version is supported. |
(inner, constant) responseErrorCodes :Object
Server error codes returned by Cassandra
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
serverError |
Number | Something unexpected happened. |
protocolError |
Number | Some client message triggered a protocol violation. |
badCredentials |
Number | Authentication was required and failed. |
unavailableException |
Number | Raised when coordinator knows there is not enough replicas alive to perform a query with the requested consistency level. |
overloaded |
Number | The request cannot be processed because the coordinator is overloaded. |
isBootstrapping |
Number | The request was a read request but the coordinator node is bootstrapping. |
truncateError |
Number | Error encountered during a truncate request. |
writeTimeout |
Number | Timeout encountered on write query on coordinator waiting for response(s) from replicas. |
readTimeout |
Number | Timeout encountered on read query on coordinator waitign for response(s) from replicas. |
readFailure |
Number | A non-timeout error encountered during a read request. |
functionFailure |
Number | A (user defined) function encountered during execution. |
writeFailure |
Number | A non-timeout error encountered during a write request. |
syntaxError |
Number | The submitted query has a syntax error. |
unauthorized |
Number | The logged user doesn't have the right to perform the query. |
invalid |
Number | The query is syntactically correct but invalid. |
configError |
Number | The query is invalid because of some configuration issue. |
alreadyExists |
Number | The query attempted to create a schema element (i.e. keyspace, table) that already exists. |
unprepared |
Number | Can be thrown while a prepared statement tries to be executed if the provided statement is not known by the coordinator. |
Source
(inner, constant) unset
Unset representation.
Use this field if you want to set a parameter to unset. Valid for Cassandra 2.2 and above.
Source
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. |
Source
Returns:
- Type
- Long
(inner) isLeapYear(year) → {boolean}
Parameters:
| Name | Type | Description |
|---|---|---|
year |
Number |
Returns:
- Type
- boolean
Classes¶
Members¶
(inner) LocalTime
Gets the hour component of the time represented by the current instance, a number from 0 to 23.
(inner) LocalTime
Gets the minute component of the time represented by the current instance, a number from 0 to 59.
(inner) LocalTime
Gets the second component of the time represented by the current instance, a number from 0 to 59.
(inner) LocalTime
Gets the nanoseconds component of the time represented by the current instance, a number from 0 to 999999999.
(inner, constant) 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. |
Source
(inner, constant) consistencyToString :Object<number, string>
Mapping of consistency level codes to their string representation.
Type:
- Object<number, string>
Source
(inner, constant) dataTypes :Object
CQL data types
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
custom |
Number | A custom type. |
ascii |
Number | ASCII character string. |
bigint |
Number | 64-bit signed long. |
blob |
Number | Arbitrary bytes (no validation). |
boolean |
Number | true or false. |
counter |
Number | Counter column (64-bit signed value). |
decimal |
Number | Variable-precision decimal. |
double |
Number | 64-bit IEEE-754 floating point. |
float |
Number | 32-bit IEEE-754 floating point. |
int |
Number | 32-bit signed integer. |
text |
Number | UTF8 encoded string. |
timestamp |
Number | A timestamp. |
uuid |
Number | Type 1 or type 4 UUID. |
varchar |
Number | UTF8 encoded string. |
varint |
Number | Arbitrary-precision integer. |
timeuuid |
Number | Type 1 UUID. |
inet |
Number | An IP address. It can be either 4 bytes long (IPv4) or 16 bytes long (IPv6). |
date |
Number | A date without a time-zone in the ISO-8601 calendar system. |
time |
Number | A value representing the time portion of the day. |
smallint |
Number | 16-bit two's complement integer. |
tinyint |
Number | 8-bit two's complement integer. |
list |
Number | A collection of elements. |
map |
Number | Key/value pairs. |
set |
Number | A collection that contains no duplicate elements. |
udt |
Number | User-defined type. |
tuple |
Number | A sequence of values. |
Source
(inner, constant) dateCenter
2^31 days before unix epoch is -5877641-06-23. This is the first day that can be represented by this class.
(inner, constant) distance :Object
Represents the distance of Cassandra node as assigned by a LoadBalancingPolicy relatively to the driver instance.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
local |
Number | A local node. |
remote |
Number | A remote node. |
ignored |
Number | A node that is meant to be ignored. |
Source
(inner, constant) logLevels :Object
Log level values used for the logLevel client option and emitted in 'log' events.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
trace |
String | Finest-grained diagnostic information (TRACE level events). |
debug |
String | Fine-grained diagnostic information useful during development (DEBUG level events). |
info |
String | High-level informational messages. |
warning |
String | Potentially harmful situations (default when logLevel is not set). |
error |
String | Error conditions. |
off |
String | Disables internal driver log forwarding. |
Source
(inner, constant) protocolVersion :Object
Contains information for the different protocol versions supported by the driver.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
v1 |
Number | Cassandra protocol v1, supported in Apache Cassandra 1.2-->2.2. |
v2 |
Number | Cassandra protocol v2, supported in Apache Cassandra 2.0-->2.2. |
v3 |
Number | Cassandra protocol v3, supported in Apache Cassandra 2.1-->3.x. |
v4 |
Number | Cassandra protocol v4, supported in Apache Cassandra 2.2-->3.x. |
v5 |
Number | Cassandra protocol v5, in beta from Apache Cassandra 3.x+. Currently not supported by the driver. |
dseV1 |
Number | DataStax Enterprise protocol v1, DSE 5.1+ |
dseV2 |
Number | DataStax Enterprise protocol v2, DSE 6.0+ |
maxSupported |
Number | Returns the higher protocol version that is supported by this driver. |
minSupported |
Number | Returns the lower protocol version that is supported by this driver. |
isSupported |
function | A function that returns a boolean determining whether a given protocol version is supported. |
(inner, constant) responseErrorCodes :Object
Server error codes returned by Cassandra
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
serverError |
Number | Something unexpected happened. |
protocolError |
Number | Some client message triggered a protocol violation. |
badCredentials |
Number | Authentication was required and failed. |
unavailableException |
Number | Raised when coordinator knows there is not enough replicas alive to perform a query with the requested consistency level. |
overloaded |
Number | The request cannot be processed because the coordinator is overloaded. |
isBootstrapping |
Number | The request was a read request but the coordinator node is bootstrapping. |
truncateError |
Number | Error encountered during a truncate request. |
writeTimeout |
Number | Timeout encountered on write query on coordinator waiting for response(s) from replicas. |
readTimeout |
Number | Timeout encountered on read query on coordinator waitign for response(s) from replicas. |
readFailure |
Number | A non-timeout error encountered during a read request. |
functionFailure |
Number | A (user defined) function encountered during execution. |
writeFailure |
Number | A non-timeout error encountered during a write request. |
syntaxError |
Number | The submitted query has a syntax error. |
unauthorized |
Number | The logged user doesn't have the right to perform the query. |
invalid |
Number | The query is syntactically correct but invalid. |
configError |
Number | The query is invalid because of some configuration issue. |
alreadyExists |
Number | The query attempted to create a schema element (i.e. keyspace, table) that already exists. |
unprepared |
Number | Can be thrown while a prepared statement tries to be executed if the provided statement is not known by the coordinator. |
Source
(inner, constant) unset
Unset representation.
Use this field if you want to set a parameter to unset. Valid for Cassandra 2.2 and above.
Source
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. |
Source
Returns:
- Type
- Long
(inner) isLeapYear(year) → {boolean}
Parameters:
| Name | Type | Description |
|---|---|---|
year |
Number |
Returns:
- Type
- boolean
Classes¶
Members¶
(inner) LocalTime
Gets the hour component of the time represented by the current instance, a number from 0 to 23.
(inner) LocalTime
Gets the minute component of the time represented by the current instance, a number from 0 to 59.
(inner) LocalTime
Gets the second component of the time represented by the current instance, a number from 0 to 59.
(inner) LocalTime
Gets the nanoseconds component of the time represented by the current instance, a number from 0 to 999999999.
(inner, constant) 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. |
Source
(inner, constant) consistencyToString :Object<number, string>
Mapping of consistency level codes to their string representation.
Type:
- Object<number, string>
Source
(inner, constant) dataTypes :Object
CQL data types
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
custom |
Number | A custom type. |
ascii |
Number | ASCII character string. |
bigint |
Number | 64-bit signed long. |
blob |
Number | Arbitrary bytes (no validation). |
boolean |
Number | true or false. |
counter |
Number | Counter column (64-bit signed value). |
decimal |
Number | Variable-precision decimal. |
double |
Number | 64-bit IEEE-754 floating point. |
float |
Number | 32-bit IEEE-754 floating point. |
int |
Number | 32-bit signed integer. |
text |
Number | UTF8 encoded string. |
timestamp |
Number | A timestamp. |
uuid |
Number | Type 1 or type 4 UUID. |
varchar |
Number | UTF8 encoded string. |
varint |
Number | Arbitrary-precision integer. |
timeuuid |
Number | Type 1 UUID. |
inet |
Number | An IP address. It can be either 4 bytes long (IPv4) or 16 bytes long (IPv6). |
date |
Number | A date without a time-zone in the ISO-8601 calendar system. |
time |
Number | A value representing the time portion of the day. |
smallint |
Number | 16-bit two's complement integer. |
tinyint |
Number | 8-bit two's complement integer. |
list |
Number | A collection of elements. |
map |
Number | Key/value pairs. |
set |
Number | A collection that contains no duplicate elements. |
udt |
Number | User-defined type. |
tuple |
Number | A sequence of values. |
Source
(inner, constant) dateCenter
2^31 days before unix epoch is -5877641-06-23. This is the first day that can be represented by this class.
(inner, constant) distance :Object
Represents the distance of Cassandra node as assigned by a LoadBalancingPolicy relatively to the driver instance.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
local |
Number | A local node. |
remote |
Number | A remote node. |
ignored |
Number | A node that is meant to be ignored. |
Source
(inner, constant) logLevels :Object
Log level values used for the logLevel client option and emitted in 'log' events.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
trace |
String | Finest-grained diagnostic information (TRACE level events). |
debug |
String | Fine-grained diagnostic information useful during development (DEBUG level events). |
info |
String | High-level informational messages. |
warning |
String | Potentially harmful situations (default when logLevel is not set). |
error |
String | Error conditions. |
off |
String | Disables internal driver log forwarding. |
Source
(inner, constant) protocolVersion :Object
Contains information for the different protocol versions supported by the driver.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
v1 |
Number | Cassandra protocol v1, supported in Apache Cassandra 1.2-->2.2. |
v2 |
Number | Cassandra protocol v2, supported in Apache Cassandra 2.0-->2.2. |
v3 |
Number | Cassandra protocol v3, supported in Apache Cassandra 2.1-->3.x. |
v4 |
Number | Cassandra protocol v4, supported in Apache Cassandra 2.2-->3.x. |
v5 |
Number | Cassandra protocol v5, in beta from Apache Cassandra 3.x+. Currently not supported by the driver. |
dseV1 |
Number | DataStax Enterprise protocol v1, DSE 5.1+ |
dseV2 |
Number | DataStax Enterprise protocol v2, DSE 6.0+ |
maxSupported |
Number | Returns the higher protocol version that is supported by this driver. |
minSupported |
Number | Returns the lower protocol version that is supported by this driver. |
isSupported |
function | A function that returns a boolean determining whether a given protocol version is supported. |
(inner, constant) responseErrorCodes :Object
Server error codes returned by Cassandra
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
serverError |
Number | Something unexpected happened. |
protocolError |
Number | Some client message triggered a protocol violation. |
badCredentials |
Number | Authentication was required and failed. |
unavailableException |
Number | Raised when coordinator knows there is not enough replicas alive to perform a query with the requested consistency level. |
overloaded |
Number | The request cannot be processed because the coordinator is overloaded. |
isBootstrapping |
Number | The request was a read request but the coordinator node is bootstrapping. |
truncateError |
Number | Error encountered during a truncate request. |
writeTimeout |
Number | Timeout encountered on write query on coordinator waiting for response(s) from replicas. |
readTimeout |
Number | Timeout encountered on read query on coordinator waitign for response(s) from replicas. |
readFailure |
Number | A non-timeout error encountered during a read request. |
functionFailure |
Number | A (user defined) function encountered during execution. |
writeFailure |
Number | A non-timeout error encountered during a write request. |
syntaxError |
Number | The submitted query has a syntax error. |
unauthorized |
Number | The logged user doesn't have the right to perform the query. |
invalid |
Number | The query is syntactically correct but invalid. |
configError |
Number | The query is invalid because of some configuration issue. |
alreadyExists |
Number | The query attempted to create a schema element (i.e. keyspace, table) that already exists. |
unprepared |
Number | Can be thrown while a prepared statement tries to be executed if the provided statement is not known by the coordinator. |
Source
(inner, constant) unset
Unset representation.
Use this field if you want to set a parameter to unset. Valid for Cassandra 2.2 and above.
Source
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. |
Source
Returns:
- Type
- Long
(inner) isLeapYear(year) → {boolean}
Parameters:
| Name | Type | Description |
|---|---|---|
year |
Number |
Returns:
- Type
- boolean
Classes¶
Members¶
(inner) LocalTime
Gets the hour component of the time represented by the current instance, a number from 0 to 23.
(inner) LocalTime
Gets the minute component of the time represented by the current instance, a number from 0 to 59.
(inner) LocalTime
Gets the second component of the time represented by the current instance, a number from 0 to 59.
(inner) LocalTime
Gets the nanoseconds component of the time represented by the current instance, a number from 0 to 999999999.
(inner, constant) 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. |
Source
(inner, constant) consistencyToString :Object<number, string>
Mapping of consistency level codes to their string representation.
Type:
- Object<number, string>
Source
(inner, constant) dataTypes :Object
CQL data types
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
custom |
Number | A custom type. |
ascii |
Number | ASCII character string. |
bigint |
Number | 64-bit signed long. |
blob |
Number | Arbitrary bytes (no validation). |
boolean |
Number | true or false. |
counter |
Number | Counter column (64-bit signed value). |
decimal |
Number | Variable-precision decimal. |
double |
Number | 64-bit IEEE-754 floating point. |
float |
Number | 32-bit IEEE-754 floating point. |
int |
Number | 32-bit signed integer. |
text |
Number | UTF8 encoded string. |
timestamp |
Number | A timestamp. |
uuid |
Number | Type 1 or type 4 UUID. |
varchar |
Number | UTF8 encoded string. |
varint |
Number | Arbitrary-precision integer. |
timeuuid |
Number | Type 1 UUID. |
inet |
Number | An IP address. It can be either 4 bytes long (IPv4) or 16 bytes long (IPv6). |
date |
Number | A date without a time-zone in the ISO-8601 calendar system. |
time |
Number | A value representing the time portion of the day. |
smallint |
Number | 16-bit two's complement integer. |
tinyint |
Number | 8-bit two's complement integer. |
list |
Number | A collection of elements. |
map |
Number | Key/value pairs. |
set |
Number | A collection that contains no duplicate elements. |
udt |
Number | User-defined type. |
tuple |
Number | A sequence of values. |
Source
(inner, constant) dateCenter
2^31 days before unix epoch is -5877641-06-23. This is the first day that can be represented by this class.
(inner, constant) distance :Object
Represents the distance of Cassandra node as assigned by a LoadBalancingPolicy relatively to the driver instance.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
local |
Number | A local node. |
remote |
Number | A remote node. |
ignored |
Number | A node that is meant to be ignored. |
Source
(inner, constant) logLevels :Object
Log level values used for the logLevel client option and emitted in 'log' events.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
trace |
String | Finest-grained diagnostic information (TRACE level events). |
debug |
String | Fine-grained diagnostic information useful during development (DEBUG level events). |
info |
String | High-level informational messages. |
warning |
String | Potentially harmful situations (default when logLevel is not set). |
error |
String | Error conditions. |
off |
String | Disables internal driver log forwarding. |
Source
(inner, constant) protocolVersion :Object
Contains information for the different protocol versions supported by the driver.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
v1 |
Number | Cassandra protocol v1, supported in Apache Cassandra 1.2-->2.2. |
v2 |
Number | Cassandra protocol v2, supported in Apache Cassandra 2.0-->2.2. |
v3 |
Number | Cassandra protocol v3, supported in Apache Cassandra 2.1-->3.x. |
v4 |
Number | Cassandra protocol v4, supported in Apache Cassandra 2.2-->3.x. |
v5 |
Number | Cassandra protocol v5, in beta from Apache Cassandra 3.x+. Currently not supported by the driver. |
dseV1 |
Number | DataStax Enterprise protocol v1, DSE 5.1+ |
dseV2 |
Number | DataStax Enterprise protocol v2, DSE 6.0+ |
maxSupported |
Number | Returns the higher protocol version that is supported by this driver. |
minSupported |
Number | Returns the lower protocol version that is supported by this driver. |
isSupported |
function | A function that returns a boolean determining whether a given protocol version is supported. |
(inner, constant) responseErrorCodes :Object
Server error codes returned by Cassandra
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
serverError |
Number | Something unexpected happened. |
protocolError |
Number | Some client message triggered a protocol violation. |
badCredentials |
Number | Authentication was required and failed. |
unavailableException |
Number | Raised when coordinator knows there is not enough replicas alive to perform a query with the requested consistency level. |
overloaded |
Number | The request cannot be processed because the coordinator is overloaded. |
isBootstrapping |
Number | The request was a read request but the coordinator node is bootstrapping. |
truncateError |
Number | Error encountered during a truncate request. |
writeTimeout |
Number | Timeout encountered on write query on coordinator waiting for response(s) from replicas. |
readTimeout |
Number | Timeout encountered on read query on coordinator waitign for response(s) from replicas. |
readFailure |
Number | A non-timeout error encountered during a read request. |
functionFailure |
Number | A (user defined) function encountered during execution. |
writeFailure |
Number | A non-timeout error encountered during a write request. |
syntaxError |
Number | The submitted query has a syntax error. |
unauthorized |
Number | The logged user doesn't have the right to perform the query. |
invalid |
Number | The query is syntactically correct but invalid. |
configError |
Number | The query is invalid because of some configuration issue. |
alreadyExists |
Number | The query attempted to create a schema element (i.e. keyspace, table) that already exists. |
unprepared |
Number | Can be thrown while a prepared statement tries to be executed if the provided statement is not known by the coordinator. |
Source
(inner, constant) unset
Unset representation.
Use this field if you want to set a parameter to unset. Valid for Cassandra 2.2 and above.
Source
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. |
Source
Returns:
- Type
- Long
(inner) isLeapYear(year) → {boolean}
Parameters:
| Name | Type | Description |
|---|---|---|
year |
Number |
Returns:
- Type
- boolean
Classes¶
Members¶
(inner) LocalTime
Gets the hour component of the time represented by the current instance, a number from 0 to 23.
(inner) LocalTime
Gets the minute component of the time represented by the current instance, a number from 0 to 59.
(inner) LocalTime
Gets the second component of the time represented by the current instance, a number from 0 to 59.
(inner) LocalTime
Gets the nanoseconds component of the time represented by the current instance, a number from 0 to 999999999.
(inner, constant) 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. |
Source
(inner, constant) consistencyToString :Object<number, string>
Mapping of consistency level codes to their string representation.
Type:
- Object<number, string>
Source
(inner, constant) dataTypes :Object
CQL data types
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
custom |
Number | A custom type. |
ascii |
Number | ASCII character string. |
bigint |
Number | 64-bit signed long. |
blob |
Number | Arbitrary bytes (no validation). |
boolean |
Number | true or false. |
counter |
Number | Counter column (64-bit signed value). |
decimal |
Number | Variable-precision decimal. |
double |
Number | 64-bit IEEE-754 floating point. |
float |
Number | 32-bit IEEE-754 floating point. |
int |
Number | 32-bit signed integer. |
text |
Number | UTF8 encoded string. |
timestamp |
Number | A timestamp. |
uuid |
Number | Type 1 or type 4 UUID. |
varchar |
Number | UTF8 encoded string. |
varint |
Number | Arbitrary-precision integer. |
timeuuid |
Number | Type 1 UUID. |
inet |
Number | An IP address. It can be either 4 bytes long (IPv4) or 16 bytes long (IPv6). |
date |
Number | A date without a time-zone in the ISO-8601 calendar system. |
time |
Number | A value representing the time portion of the day. |
smallint |
Number | 16-bit two's complement integer. |
tinyint |
Number | 8-bit two's complement integer. |
list |
Number | A collection of elements. |
map |
Number | Key/value pairs. |
set |
Number | A collection that contains no duplicate elements. |
udt |
Number | User-defined type. |
tuple |
Number | A sequence of values. |
Source
(inner, constant) dateCenter
2^31 days before unix epoch is -5877641-06-23. This is the first day that can be represented by this class.
(inner, constant) distance :Object
Represents the distance of Cassandra node as assigned by a LoadBalancingPolicy relatively to the driver instance.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
local |
Number | A local node. |
remote |
Number | A remote node. |
ignored |
Number | A node that is meant to be ignored. |
Source
(inner, constant) logLevels :Object
Log level values used for the logLevel client option and emitted in 'log' events.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
trace |
String | Finest-grained diagnostic information (TRACE level events). |
debug |
String | Fine-grained diagnostic information useful during development (DEBUG level events). |
info |
String | High-level informational messages. |
warning |
String | Potentially harmful situations (default when logLevel is not set). |
error |
String | Error conditions. |
off |
String | Disables internal driver log forwarding. |
Source
(inner, constant) protocolVersion :Object
Contains information for the different protocol versions supported by the driver.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
v1 |
Number | Cassandra protocol v1, supported in Apache Cassandra 1.2-->2.2. |
v2 |
Number | Cassandra protocol v2, supported in Apache Cassandra 2.0-->2.2. |
v3 |
Number | Cassandra protocol v3, supported in Apache Cassandra 2.1-->3.x. |
v4 |
Number | Cassandra protocol v4, supported in Apache Cassandra 2.2-->3.x. |
v5 |
Number | Cassandra protocol v5, in beta from Apache Cassandra 3.x+. Currently not supported by the driver. |
dseV1 |
Number | DataStax Enterprise protocol v1, DSE 5.1+ |
dseV2 |
Number | DataStax Enterprise protocol v2, DSE 6.0+ |
maxSupported |
Number | Returns the higher protocol version that is supported by this driver. |
minSupported |
Number | Returns the lower protocol version that is supported by this driver. |
isSupported |
function | A function that returns a boolean determining whether a given protocol version is supported. |
(inner, constant) responseErrorCodes :Object
Server error codes returned by Cassandra
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
serverError |
Number | Something unexpected happened. |
protocolError |
Number | Some client message triggered a protocol violation. |
badCredentials |
Number | Authentication was required and failed. |
unavailableException |
Number | Raised when coordinator knows there is not enough replicas alive to perform a query with the requested consistency level. |
overloaded |
Number | The request cannot be processed because the coordinator is overloaded. |
isBootstrapping |
Number | The request was a read request but the coordinator node is bootstrapping. |
truncateError |
Number | Error encountered during a truncate request. |
writeTimeout |
Number | Timeout encountered on write query on coordinator waiting for response(s) from replicas. |
readTimeout |
Number | Timeout encountered on read query on coordinator waitign for response(s) from replicas. |
readFailure |
Number | A non-timeout error encountered during a read request. |
functionFailure |
Number | A (user defined) function encountered during execution. |
writeFailure |
Number | A non-timeout error encountered during a write request. |
syntaxError |
Number | The submitted query has a syntax error. |
unauthorized |
Number | The logged user doesn't have the right to perform the query. |
invalid |
Number | The query is syntactically correct but invalid. |
configError |
Number | The query is invalid because of some configuration issue. |
alreadyExists |
Number | The query attempted to create a schema element (i.e. keyspace, table) that already exists. |
unprepared |
Number | Can be thrown while a prepared statement tries to be executed if the provided statement is not known by the coordinator. |
Source
(inner, constant) unset
Unset representation.
Use this field if you want to set a parameter to unset. Valid for Cassandra 2.2 and above.
Source
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. |
Source
Returns:
- Type
- Long
(inner) isLeapYear(year) → {boolean}
Parameters:
| Name | Type | Description |
|---|---|---|
year |
Number |
Returns:
- Type
- boolean
Classes¶
Members¶
(inner) LocalTime
Gets the hour component of the time represented by the current instance, a number from 0 to 23.
(inner) LocalTime
Gets the minute component of the time represented by the current instance, a number from 0 to 59.
(inner) LocalTime
Gets the second component of the time represented by the current instance, a number from 0 to 59.
(inner) LocalTime
Gets the nanoseconds component of the time represented by the current instance, a number from 0 to 999999999.
(inner, constant) 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. |
Source
(inner, constant) consistencyToString :Object<number, string>
Mapping of consistency level codes to their string representation.
Type:
- Object<number, string>
Source
(inner, constant) dataTypes :Object
CQL data types
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
custom |
Number | A custom type. |
ascii |
Number | ASCII character string. |
bigint |
Number | 64-bit signed long. |
blob |
Number | Arbitrary bytes (no validation). |
boolean |
Number | true or false. |
counter |
Number | Counter column (64-bit signed value). |
decimal |
Number | Variable-precision decimal. |
double |
Number | 64-bit IEEE-754 floating point. |
float |
Number | 32-bit IEEE-754 floating point. |
int |
Number | 32-bit signed integer. |
text |
Number | UTF8 encoded string. |
timestamp |
Number | A timestamp. |
uuid |
Number | Type 1 or type 4 UUID. |
varchar |
Number | UTF8 encoded string. |
varint |
Number | Arbitrary-precision integer. |
timeuuid |
Number | Type 1 UUID. |
inet |
Number | An IP address. It can be either 4 bytes long (IPv4) or 16 bytes long (IPv6). |
date |
Number | A date without a time-zone in the ISO-8601 calendar system. |
time |
Number | A value representing the time portion of the day. |
smallint |
Number | 16-bit two's complement integer. |
tinyint |
Number | 8-bit two's complement integer. |
list |
Number | A collection of elements. |
map |
Number | Key/value pairs. |
set |
Number | A collection that contains no duplicate elements. |
udt |
Number | User-defined type. |
tuple |
Number | A sequence of values. |
Source
(inner, constant) dateCenter
2^31 days before unix epoch is -5877641-06-23. This is the first day that can be represented by this class.
(inner, constant) distance :Object
Represents the distance of Cassandra node as assigned by a LoadBalancingPolicy relatively to the driver instance.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
local |
Number | A local node. |
remote |
Number | A remote node. |
ignored |
Number | A node that is meant to be ignored. |
Source
(inner, constant) logLevels :Object
Log level values used for the logLevel client option and emitted in 'log' events.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
trace |
String | Finest-grained diagnostic information (TRACE level events). |
debug |
String | Fine-grained diagnostic information useful during development (DEBUG level events). |
info |
String | High-level informational messages. |
warning |
String | Potentially harmful situations (default when logLevel is not set). |
error |
String | Error conditions. |
off |
String | Disables internal driver log forwarding. |
Source
(inner, constant) protocolVersion :Object
Contains information for the different protocol versions supported by the driver.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
v1 |
Number | Cassandra protocol v1, supported in Apache Cassandra 1.2-->2.2. |
v2 |
Number | Cassandra protocol v2, supported in Apache Cassandra 2.0-->2.2. |
v3 |
Number | Cassandra protocol v3, supported in Apache Cassandra 2.1-->3.x. |
v4 |
Number | Cassandra protocol v4, supported in Apache Cassandra 2.2-->3.x. |
v5 |
Number | Cassandra protocol v5, in beta from Apache Cassandra 3.x+. Currently not supported by the driver. |
dseV1 |
Number | DataStax Enterprise protocol v1, DSE 5.1+ |
dseV2 |
Number | DataStax Enterprise protocol v2, DSE 6.0+ |
maxSupported |
Number | Returns the higher protocol version that is supported by this driver. |
minSupported |
Number | Returns the lower protocol version that is supported by this driver. |
isSupported |
function | A function that returns a boolean determining whether a given protocol version is supported. |
(inner, constant) responseErrorCodes :Object
Server error codes returned by Cassandra
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
serverError |
Number | Something unexpected happened. |
protocolError |
Number | Some client message triggered a protocol violation. |
badCredentials |
Number | Authentication was required and failed. |
unavailableException |
Number | Raised when coordinator knows there is not enough replicas alive to perform a query with the requested consistency level. |
overloaded |
Number | The request cannot be processed because the coordinator is overloaded. |
isBootstrapping |
Number | The request was a read request but the coordinator node is bootstrapping. |
truncateError |
Number | Error encountered during a truncate request. |
writeTimeout |
Number | Timeout encountered on write query on coordinator waiting for response(s) from replicas. |
readTimeout |
Number | Timeout encountered on read query on coordinator waitign for response(s) from replicas. |
readFailure |
Number | A non-timeout error encountered during a read request. |
functionFailure |
Number | A (user defined) function encountered during execution. |
writeFailure |
Number | A non-timeout error encountered during a write request. |
syntaxError |
Number | The submitted query has a syntax error. |
unauthorized |
Number | The logged user doesn't have the right to perform the query. |
invalid |
Number | The query is syntactically correct but invalid. |
configError |
Number | The query is invalid because of some configuration issue. |
alreadyExists |
Number | The query attempted to create a schema element (i.e. keyspace, table) that already exists. |
unprepared |
Number | Can be thrown while a prepared statement tries to be executed if the provided statement is not known by the coordinator. |
Source
(inner, constant) unset
Unset representation.
Use this field if you want to set a parameter to unset. Valid for Cassandra 2.2 and above.
Source
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. |
Source
Returns:
- Type
- Long
(inner) isLeapYear(year) → {boolean}
Parameters:
| Name | Type | Description |
|---|---|---|
year |
Number |
Returns:
- Type
- boolean
Classes¶
Members¶
(inner) LocalTime
Gets the hour component of the time represented by the current instance, a number from 0 to 23.
(inner) LocalTime
Gets the minute component of the time represented by the current instance, a number from 0 to 59.
(inner) LocalTime
Gets the second component of the time represented by the current instance, a number from 0 to 59.
(inner) LocalTime
Gets the nanoseconds component of the time represented by the current instance, a number from 0 to 999999999.
(inner, constant) 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. |
Source
(inner, constant) consistencyToString :Object<number, string>
Mapping of consistency level codes to their string representation.
Type:
- Object<number, string>
Source
(inner, constant) dataTypes :Object
CQL data types
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
custom |
Number | A custom type. |
ascii |
Number | ASCII character string. |
bigint |
Number | 64-bit signed long. |
blob |
Number | Arbitrary bytes (no validation). |
boolean |
Number | true or false. |
counter |
Number | Counter column (64-bit signed value). |
decimal |
Number | Variable-precision decimal. |
double |
Number | 64-bit IEEE-754 floating point. |
float |
Number | 32-bit IEEE-754 floating point. |
int |
Number | 32-bit signed integer. |
text |
Number | UTF8 encoded string. |
timestamp |
Number | A timestamp. |
uuid |
Number | Type 1 or type 4 UUID. |
varchar |
Number | UTF8 encoded string. |
varint |
Number | Arbitrary-precision integer. |
timeuuid |
Number | Type 1 UUID. |
inet |
Number | An IP address. It can be either 4 bytes long (IPv4) or 16 bytes long (IPv6). |
date |
Number | A date without a time-zone in the ISO-8601 calendar system. |
time |
Number | A value representing the time portion of the day. |
smallint |
Number | 16-bit two's complement integer. |
tinyint |
Number | 8-bit two's complement integer. |
list |
Number | A collection of elements. |
map |
Number | Key/value pairs. |
set |
Number | A collection that contains no duplicate elements. |
udt |
Number | User-defined type. |
tuple |
Number | A sequence of values. |
Source
(inner, constant) dateCenter
2^31 days before unix epoch is -5877641-06-23. This is the first day that can be represented by this class.
(inner, constant) distance :Object
Represents the distance of Cassandra node as assigned by a LoadBalancingPolicy relatively to the driver instance.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
local |
Number | A local node. |
remote |
Number | A remote node. |
ignored |
Number | A node that is meant to be ignored. |
Source
(inner, constant) logLevels :Object
Log level values used for the logLevel client option and emitted in 'log' events.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
trace |
String | Finest-grained diagnostic information (TRACE level events). |
debug |
String | Fine-grained diagnostic information useful during development (DEBUG level events). |
info |
String | High-level informational messages. |
warning |
String | Potentially harmful situations (default when logLevel is not set). |
error |
String | Error conditions. |
off |
String | Disables internal driver log forwarding. |
Source
(inner, constant) protocolVersion :Object
Contains information for the different protocol versions supported by the driver.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
v1 |
Number | Cassandra protocol v1, supported in Apache Cassandra 1.2-->2.2. |
v2 |
Number | Cassandra protocol v2, supported in Apache Cassandra 2.0-->2.2. |
v3 |
Number | Cassandra protocol v3, supported in Apache Cassandra 2.1-->3.x. |
v4 |
Number | Cassandra protocol v4, supported in Apache Cassandra 2.2-->3.x. |
v5 |
Number | Cassandra protocol v5, in beta from Apache Cassandra 3.x+. Currently not supported by the driver. |
dseV1 |
Number | DataStax Enterprise protocol v1, DSE 5.1+ |
dseV2 |
Number | DataStax Enterprise protocol v2, DSE 6.0+ |
maxSupported |
Number | Returns the higher protocol version that is supported by this driver. |
minSupported |
Number | Returns the lower protocol version that is supported by this driver. |
isSupported |
function | A function that returns a boolean determining whether a given protocol version is supported. |
(inner, constant) responseErrorCodes :Object
Server error codes returned by Cassandra
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
serverError |
Number | Something unexpected happened. |
protocolError |
Number | Some client message triggered a protocol violation. |
badCredentials |
Number | Authentication was required and failed. |
unavailableException |
Number | Raised when coordinator knows there is not enough replicas alive to perform a query with the requested consistency level. |
overloaded |
Number | The request cannot be processed because the coordinator is overloaded. |
isBootstrapping |
Number | The request was a read request but the coordinator node is bootstrapping. |
truncateError |
Number | Error encountered during a truncate request. |
writeTimeout |
Number | Timeout encountered on write query on coordinator waiting for response(s) from replicas. |
readTimeout |
Number | Timeout encountered on read query on coordinator waitign for response(s) from replicas. |
readFailure |
Number | A non-timeout error encountered during a read request. |
functionFailure |
Number | A (user defined) function encountered during execution. |
writeFailure |
Number | A non-timeout error encountered during a write request. |
syntaxError |
Number | The submitted query has a syntax error. |
unauthorized |
Number | The logged user doesn't have the right to perform the query. |
invalid |
Number | The query is syntactically correct but invalid. |
configError |
Number | The query is invalid because of some configuration issue. |
alreadyExists |
Number | The query attempted to create a schema element (i.e. keyspace, table) that already exists. |
unprepared |
Number | Can be thrown while a prepared statement tries to be executed if the provided statement is not known by the coordinator. |
Source
(inner, constant) unset
Unset representation.
Use this field if you want to set a parameter to unset. Valid for Cassandra 2.2 and above.
Source
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. |
Source
Returns:
- Type
- Long
(inner) isLeapYear(year) → {boolean}
Parameters:
| Name | Type | Description |
|---|---|---|
year |
Number |
Returns:
- Type
- boolean
Classes¶
Members¶
(inner) LocalTime
Gets the hour component of the time represented by the current instance, a number from 0 to 23.
(inner) LocalTime
Gets the minute component of the time represented by the current instance, a number from 0 to 59.
(inner) LocalTime
Gets the second component of the time represented by the current instance, a number from 0 to 59.
(inner) LocalTime
Gets the nanoseconds component of the time represented by the current instance, a number from 0 to 999999999.
(inner, constant) 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. |
Source
(inner, constant) consistencyToString :Object<number, string>
Mapping of consistency level codes to their string representation.
Type:
- Object<number, string>
Source
(inner, constant) dataTypes :Object
CQL data types
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
custom |
Number | A custom type. |
ascii |
Number | ASCII character string. |
bigint |
Number | 64-bit signed long. |
blob |
Number | Arbitrary bytes (no validation). |
boolean |
Number | true or false. |
counter |
Number | Counter column (64-bit signed value). |
decimal |
Number | Variable-precision decimal. |
double |
Number | 64-bit IEEE-754 floating point. |
float |
Number | 32-bit IEEE-754 floating point. |
int |
Number | 32-bit signed integer. |
text |
Number | UTF8 encoded string. |
timestamp |
Number | A timestamp. |
uuid |
Number | Type 1 or type 4 UUID. |
varchar |
Number | UTF8 encoded string. |
varint |
Number | Arbitrary-precision integer. |
timeuuid |
Number | Type 1 UUID. |
inet |
Number | An IP address. It can be either 4 bytes long (IPv4) or 16 bytes long (IPv6). |
date |
Number | A date without a time-zone in the ISO-8601 calendar system. |
time |
Number | A value representing the time portion of the day. |
smallint |
Number | 16-bit two's complement integer. |
tinyint |
Number | 8-bit two's complement integer. |
list |
Number | A collection of elements. |
map |
Number | Key/value pairs. |
set |
Number | A collection that contains no duplicate elements. |
udt |
Number | User-defined type. |
tuple |
Number | A sequence of values. |
Source
(inner, constant) dateCenter
2^31 days before unix epoch is -5877641-06-23. This is the first day that can be represented by this class.
(inner, constant) distance :Object
Represents the distance of Cassandra node as assigned by a LoadBalancingPolicy relatively to the driver instance.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
local |
Number | A local node. |
remote |
Number | A remote node. |
ignored |
Number | A node that is meant to be ignored. |
Source
(inner, constant) logLevels :Object
Log level values used for the logLevel client option and emitted in 'log' events.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
trace |
String | Finest-grained diagnostic information (TRACE level events). |
debug |
String | Fine-grained diagnostic information useful during development (DEBUG level events). |
info |
String | High-level informational messages. |
warning |
String | Potentially harmful situations (default when logLevel is not set). |
error |
String | Error conditions. |
off |
String | Disables internal driver log forwarding. |
Source
(inner, constant) protocolVersion :Object
Contains information for the different protocol versions supported by the driver.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
v1 |
Number | Cassandra protocol v1, supported in Apache Cassandra 1.2-->2.2. |
v2 |
Number | Cassandra protocol v2, supported in Apache Cassandra 2.0-->2.2. |
v3 |
Number | Cassandra protocol v3, supported in Apache Cassandra 2.1-->3.x. |
v4 |
Number | Cassandra protocol v4, supported in Apache Cassandra 2.2-->3.x. |
v5 |
Number | Cassandra protocol v5, in beta from Apache Cassandra 3.x+. Currently not supported by the driver. |
dseV1 |
Number | DataStax Enterprise protocol v1, DSE 5.1+ |
dseV2 |
Number | DataStax Enterprise protocol v2, DSE 6.0+ |
maxSupported |
Number | Returns the higher protocol version that is supported by this driver. |
minSupported |
Number | Returns the lower protocol version that is supported by this driver. |
isSupported |
function | A function that returns a boolean determining whether a given protocol version is supported. |
(inner, constant) responseErrorCodes :Object
Server error codes returned by Cassandra
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
serverError |
Number | Something unexpected happened. |
protocolError |
Number | Some client message triggered a protocol violation. |
badCredentials |
Number | Authentication was required and failed. |
unavailableException |
Number | Raised when coordinator knows there is not enough replicas alive to perform a query with the requested consistency level. |
overloaded |
Number | The request cannot be processed because the coordinator is overloaded. |
isBootstrapping |
Number | The request was a read request but the coordinator node is bootstrapping. |
truncateError |
Number | Error encountered during a truncate request. |
writeTimeout |
Number | Timeout encountered on write query on coordinator waiting for response(s) from replicas. |
readTimeout |
Number | Timeout encountered on read query on coordinator waitign for response(s) from replicas. |
readFailure |
Number | A non-timeout error encountered during a read request. |
functionFailure |
Number | A (user defined) function encountered during execution. |
writeFailure |
Number | A non-timeout error encountered during a write request. |
syntaxError |
Number | The submitted query has a syntax error. |
unauthorized |
Number | The logged user doesn't have the right to perform the query. |
invalid |
Number | The query is syntactically correct but invalid. |
configError |
Number | The query is invalid because of some configuration issue. |
alreadyExists |
Number | The query attempted to create a schema element (i.e. keyspace, table) that already exists. |
unprepared |
Number | Can be thrown while a prepared statement tries to be executed if the provided statement is not known by the coordinator. |
Source
(inner, constant) unset
Unset representation.
Use this field if you want to set a parameter to unset. Valid for Cassandra 2.2 and above.
Source
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. |
Source
Returns:
- Type
- Long
(inner) isLeapYear(year) → {boolean}
Parameters:
| Name | Type | Description |
|---|---|---|
year |
Number |
Returns:
- Type
- boolean