Class: Auger::Cql

Inherits:
Connection show all
Defined in:
lib/plugins/cql.rb

Instance Attribute Summary

Attributes inherited from Connection

#connection, #options, #requests, #response, #roles

Instance Method Summary collapse

Methods inherited from Connection

#do_open, #initialize, load, #method_missing, #timeout

Constructor Details

This class inherits a constructor from Auger::Connection

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Auger::Connection

Instance Method Details

#close(db) ⇒ Object



16
17
18
# File 'lib/plugins/cql.rb', line 16

def close(db)
  db.disconnect!
end

#execute(statement, &block) ⇒ Object



20
21
22
# File 'lib/plugins/cql.rb', line 20

def execute(statement, &block)
  @requests << CqlRequest.load(statement, &block)
end

#open(host, options) ⇒ Object



12
13
14
# File 'lib/plugins/cql.rb', line 12

def open(host, options)
  CassandraCQL::Database.new "#{host}:#{options[:port]}", options
end