Class: BatchStatement

Inherits:
Object
  • Object
show all
Defined in:
lib/cassandra_migrations/cql-rb-wrapper.rb

Instance Method Summary collapse

Constructor Details

#initialize(client, batch) ⇒ BatchStatement

Returns a new instance of BatchStatement.



20
21
22
23
# File 'lib/cassandra_migrations/cql-rb-wrapper.rb', line 20

def initialize(client, batch)
  @client = client
  @batch = batch
end

Instance Method Details

#add(*args) ⇒ Object



29
30
31
32
# File 'lib/cassandra_migrations/cql-rb-wrapper.rb', line 29

def add(*args)
  @batch.add(*args)
  self
end

#execute(options = {}) ⇒ Object



25
26
27
# File 'lib/cassandra_migrations/cql-rb-wrapper.rb', line 25

def execute(options = {})
  @client.execute(@batch, options)
end