Struct cassandra_cpp::Session

source ·
pub struct Session(pub *mut _Session);
Expand description

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.

Tuple Fields§

§0: *mut _Session

Implementations§

Create a new Cassanda session. It’s recommended to use Cluster.connect() instead

Connects a session.

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.

Execute a 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.

Trait Implementations§

Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more

Frees a session instance. If the session is still connected it will be synchronously closed before being deallocated.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.