Module: Cassie::Statements::Core

Includes:
Execution, Execution::ClassMethods, Logging, Statement, Logging::ClassMethods, Statement::ClassMethods
Included in:
Definition, Modification, Query
Defined in:
lib/cassie/statements/core.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#cqlObject (readonly) Originally defined in module Statement

The CQL string portion for the statment

Examples:

statement.cql
#=> "SELECT * FROM table WHERE first=? AND middle=? and last=?"

#paramsObject (readonly) Originally defined in module Statement

The positional values portion for the statment

Examples:

statement.params
#=> ['evan', 'thomas', 'prothro']

#result_classObject Originally defined in module Execution::ClassMethods

The class to use for decorating the Cassandra::Result

Instance Method Details

#build_partition_linkerObject Originally defined in module Execution::PartitionLinking

#consistencyObject Originally defined in module Execution::Consistency

#executeBoolean Originally defined in module Execution

Executes the statment and populates result

#execute!Boolean Originally defined in module Execution

Same as #execute. Raises if not succesfull.

Raises:

#execution_optionsHash{Symbol => Object} Originally defined in module Execution

The session exection options configured for statement execution

#idempotent(val = :get) ⇒ Boolean Originally defined in module Statement::Idempotency::ClassMethods

DSL to set a statement as idempotent

#idempotent=(val) ⇒ Object Originally defined in module Statement::Idempotency::ClassMethods

#idempotent?Boolean Originally defined in module Statement::Idempotency::ClassMethods

Indicates where the statement has no negative side-effect if issued multiple times.

#inherited(subclass) ⇒ Object Originally defined in module Execution::ClassMethods

#initialize(params = {}) ⇒ Object

Create a new statement-based object, sending all options passed as a hash to attribute setters Similar to ActiveModel::Model initialization


26
27
28
29
30
31
32
# File 'lib/cassie/statements/core.rb', line 26

def initialize(params={})
  params.each do |attr, value|
    self.public_send("#{attr}=", value)
  end

  super()
end

#loggerObject Originally defined in module Statement

#non_idempotentBoolean Originally defined in module Statement::Idempotency::ClassMethods

DSL to set a satement as non-idempotent

#partition_linker?Boolean Originally defined in module Execution::PartitionLinking

#statementCassandra::Statement Originally defined in module Statement

A bound statment with type hint and idempotent options, ready for execution ready for execution with a [Cassandra::Session]

#tableObject Originally defined in module Statement

#to_cqlString Originally defined in module Statement

Note:

This CQL string does not include execution options like type hinting, idempotency, consistency level, etc – just the raw CQL instruction and values.

A CQL string with inline parameters, representing the current statement as it would be executed in a CQL shell

Examples:

statement.to_cql
#=> "SELECT * FROM table WHERE first='evan' AND middle='thomas' and last='prothro"

#type_hints(hints = :get) ⇒ Array, Hash Originally defined in module Statement::TypeHinting::ClassMethods

DSL to set the type hints execution option Defaults to nil if none are set

#type_hints=(val) ⇒ Object Originally defined in module Statement::TypeHinting::ClassMethods