A session object is used to execute queries and maintains cluster state through
the control connection. The control connection is used to auto-discover nodes and
monitor cluster changes (topology and schema). Each session also maintains multiple
/pools of connections to cluster nodes which are used to query the cluster.
Instances of the session object are thread-safe to execute queries.
Create a new Cassanda session.
It's recommended to use Cluster.connect() instead
Connects a session and sets the keyspace.
Closes the session instance, outputs a close future which can
be used to determine when the session has been terminated. This allows
in-flight requests to finish.
Create a prepared statement.
Execute a batch statement.
Gets a snapshot of this session's schema metadata. The returned
snapshot of the schema metadata is not updated. This function
must be called again to retrieve any schema changes since the
previous call.
Gets a copy of this session's performance/diagnostic metrics.
Frees a session instance. If the session is still connected it will be synchronously
closed before being deallocated.
Returns the "default value" for a type. Read more
Formats the value using the given formatter. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static