class

Cassandra::DBApi::Session

Inherits DB::Connection / DB::BeginTransaction / DB::SessionMethods / DB::QueryMethods / DB::Disposable / Reference / Object

Represents a Cassandra session, establishes the actual connection to Cassandra.

Constructors

new(context : DB::ConnectionContext)

Creates a Session object and initiates a Cassandra cluster.

Source

Instance methods

build_prepared_statement(query) : DB::Statement

Creates a prepared statement from a query.

The statement is bound to a session and can be executed.

Source
build_unprepared_statement(query) : DB::Statement

Creates an unprepared (one-off) statement from a query.

The statement is bound to a session and can be executed.

Source
do_close

Close the session.

Closes the Cassandra session and frees memory. Also invokes cluster disposal which will actually happen if this cluster reference is the last one for that cluster. Needs to be called to prevent connection and memory leaks.

Source

Nested types