class Cassandra::Session
Sessions are used for query execution. Each session tracks its current keyspace. A session should be reused as much as possible, however it is ok to create several independent session for interacting with different keyspaces in the same application.
Inherits
ObjectExtends
Forwardable
Methods
keyspace
Returns current keyspace
execute_async
(statement, *args, options = {})Executes a given statement and returns a future result
- Note
- Last argument will be treated as
optionsif it is aHash. Therefore, make sure to pass emptyoptionswhen executing a statement with the last parameter required to be a map datatype. - Note
- Positional arguments are only supported on Apache Cassandra 2.0 and above.
execute
(statement, *args, options = {})A blocking wrapper around #execute_async
prepare_async
(statement, options = nil)Prepares a given statement and returns a future prepared statement
prepare
(*args)A blocking wrapper around #prepare_async
logged_batch
{|batch| … } aliased as: batchReturns a logged Statements::Batch instance and optionally yields it to
a given block
unlogged_batch
{|batch| … }Returns a unlogged Statements::Batch instance and optionally yields it
to a given block
counter_batch
{|batch| … }Returns a counter Statements::Batch instance and optionally yields it
to a given block
close_async
Asynchronously closes current session
close
Synchronously closes current session
inspect
Returns a CLI-friendly session representation
