Creates a Cluster instance, which extends Cassandra::Cluster.
The API is identical, except that it returns a Dse::Session (see below). It takes all of the same
options as Cassandra.cluster and the following extra options.
- Examples:
-
- Connecting to localhost
cluster = Dse.cluster
- Configuring
Cluster
cluster = Dse.cluster(
username: username,
password: password,
hosts: ['10.0.1.1', '10.0.1.2', '10.0.1.3']
)
-
Parameters:
-
| Name |
Type |
Details |
| options |
Hash |
(defaults to: {})
a customizable set of options
|
- Keys for options:
-
| Key |
Type |
Details |
| :graph_options |
Dse::Graph::Options |
options for the DSE graph statement handler. Takes
priority over other :graph_* options specified below.
|
| :graph_name |
String |
name of graph to use in graph statements
|
| :graph_source |
String |
graph traversal source
|
| :graph_language |
String |
language used in graph queries
|
| :graph_read_consistency |
Cassandra::CONSISTENCIES |
read consistency level for graph statements.
Overrides the standard statement consistency level
|
| :graph_write_consistency |
Cassandra::CONSISTENCIES |
write consistency level for graph statements.
Overrides the standard statement consistency level
|
-
Returns:
-