Module: Rapids::Batch
- Defined in:
- lib/rapids/batch.rb,
lib/rapids/batch/update.rb,
lib/rapids/batch/insert_into.rb,
lib/rapids/batch/create_table.rb,
lib/rapids/batch/columns_helper.rb,
lib/rapids/batch/create_trigger.rb,
lib/rapids/batch/find_or_create.rb,
lib/rapids/batch/model_extensions.rb
Defined Under Namespace
Modules: ModelExtensions Classes: ColumnsHelper, CreateTable, CreateTrigger, DefineBatch, FindOrCreate, InsertInto, Update
Instance Method Summary collapse
Instance Method Details
#batch(&block) ⇒ Object
36 37 38 39 |
# File 'lib/rapids/batch.rb', line 36 def batch(&block) @batch = DefineBatch.new @batch.instance_exec(&block) if block_given? end |
#batch_create(collection, options = {}) ⇒ Object
26 27 28 29 30 31 32 33 34 |
# File 'lib/rapids/batch.rb', line 26 def batch_create(collection, = {}) drop_batch_table_if_exists create_batch_table create_batch_trigger() batch_insert(collection,) end |