Class: Cassie::Modification

Inherits:
Object show all
Includes:
Connection, Statements::Core, Statements::Modification
Defined in:
lib/cassie/modification.rb

Overview

A concrete implementation of a functional base class used to make CQL INSERT, UPDATE, and DELETE queries. Inherit from this class to create application query classes.

See the README for information on usage and examples.

Examples:

Inserting a record into a Table

class InsertUserQuery < Cassie::Modification

  insert_into :users_by_username
  consistency :all

  set :id
  set :username

  map_from :user

  def id
    Cassandra::TimeUuid::Generator.new.now
  end
end

InsertUserQuery.new(user: user).excecute
#=> true

Instance Attribute Summary

Attributes included from Statements::Execution::ClassMethods

#result_class

Attributes included from Statements::Statement

#cql, #params

Method Summary

Methods included from Statements::Core

#initialize

Methods included from Statements::Execution::ClassMethods

#inherited

Methods included from Statements::Execution

#execute, #execute!, #execution_options

Methods included from Statements::Execution::Instrumentation

#execute

Methods included from Statements::Execution::PartitionLinking

#build_partition_linker, #execute, #partition_linker?

Methods included from Statements::Execution::Callbacks

#execute

Methods included from Statements::Execution::Consistency

#consistency

Methods included from Statements::Statement

#logger, #statement, #table, #to_cql

Methods included from Statements::Statement::Preparation::ClassMethods

#prepare, #prepare=, #prepare?

Methods included from Statements::Statement::Idempotency::ClassMethods

#idempotent, #idempotent=, #idempotent?, #non_idempotent

Methods included from Statements::Statement::Idempotency

#idempotent, #idempotent?

Methods included from Statements::Statement::TypeHinting::ClassMethods

#type_hints, #type_hints=

Methods included from Statements::Statement::TypeHinting

#type_hints

Methods included from Statements::Statement::Preparation

cache, init_cache, #statement

Methods included from Connection

#keyspace, #session

Methods included from Connection::ClassMethods

#keyspace, #keyspace=