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