Class: Gamma::Importer::Replace
- Inherits:
-
Gamma::Importer
- Object
- Gamma::Importer
- Gamma::Importer::Replace
- Defined in:
- lib/gamma/importer/replace.rb
Constant Summary collapse
- BATCH_SIZE =
1000
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(in_client, out_client, table, apply: false) ⇒ Replace
constructor
A new instance of Replace.
Methods inherited from Gamma::Importer
#logger, #set_foreign_key_off, #set_foreign_key_on
Constructor Details
#initialize(in_client, out_client, table, apply: false) ⇒ Replace
Returns a new instance of Replace.
4 5 6 7 8 9 |
# File 'lib/gamma/importer/replace.rb', line 4 def initialize(in_client, out_client, table, apply: false) @in_client = in_client @out_client = out_client @table = table @apply = apply end |
Instance Method Details
#execute ⇒ Object
11 12 13 14 15 16 |
# File 'lib/gamma/importer/replace.rb', line 11 def execute set_foreign_key_off(@out_client) batch_sync ensure set_foreign_key_on(@out_client) end |