Class: BatchStatement
- Inherits:
-
Object
- Object
- BatchStatement
- Defined in:
- lib/cassandra_migrations/cql-rb-wrapper.rb
Instance Method Summary collapse
- #add(*args) ⇒ Object
- #execute(options = {}) ⇒ Object
-
#initialize(client, batch) ⇒ BatchStatement
constructor
A new instance of BatchStatement.
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( = {}) @client.execute(@batch, ) end |