Class: InstDataShipper::BasicDumper
- Inherits:
-
Dumper
- Object
- Dumper
- InstDataShipper::BasicDumper
show all
- Defined in:
- lib/inst_data_shipper/basic_dumper.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Dumper
#begin_dump, current, define, #export_genre, #for_specs!, #incremental_since, #last_successful_tracker, #lookup_table_schema, #lookup_table_schema!, #origin_class, #schema_digest, #table_is_incremental?, #table_schema_compatible?, #table_schema_hash, #table_schema_metadata, #tracker
Methods included from Hooks
#run_hook, #run_hook_safe
Class Method Details
3
4
5
6
7
8
9
10
11
12
|
# File 'lib/inst_data_shipper/basic_dumper.rb', line 3
def self.perform_dump(destinations:, schema:, force_full_tables: nil, &block)
raise "Schema must be a constantizable string" unless schema.is_a?(String)
dumper = new(destinations)
dumper.instance_variable_set(:@schema_pointer, schema)
dumper.instance_variable_set(:@body_block, block)
dumper.begin_dump(force_full_tables: force_full_tables)
dumper.tracker
end
|
Instance Method Details
#enqueue_tasks ⇒ Object
18
19
20
|
# File 'lib/inst_data_shipper/basic_dumper.rb', line 18
def enqueue_tasks
instance_exec(&@body_block)
end
|
#schema ⇒ Object
22
23
24
25
|
# File 'lib/inst_data_shipper/basic_dumper.rb', line 22
def schema
pointer = @schema_pointer || batch_context[:schema_pointer]
pointer.constantize
end
|