Class: Lhm::Invoker
Overview
Copies an origin table to an altered destination table. Live activity is synchronized into the destination table using triggers.
Once the origin and destination tables have converged, origin is archived and replaced by destination.
Instance Attribute Summary collapse
-
#connection ⇒ Object
readonly
Returns the value of attribute connection.
-
#migrator ⇒ Object
readonly
Returns the value of attribute migrator.
Instance Method Summary collapse
-
#initialize(origin, connection) ⇒ Invoker
constructor
A new instance of Invoker.
- #run(options = {}) ⇒ Object
Methods included from SqlHelper
#annotation, #idx_name, #idx_spec, #version_string
Constructor Details
Instance Attribute Details
#connection ⇒ Object (readonly)
Returns the value of attribute connection.
19 20 21 |
# File 'lib/lhm/invoker.rb', line 19 def connection @connection end |
#migrator ⇒ Object (readonly)
Returns the value of attribute migrator.
19 20 21 |
# File 'lib/lhm/invoker.rb', line 19 def migrator @migrator end |
Instance Method Details
#run(options = {}) ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/lhm/invoker.rb', line 26 def run( = {}) () migration = @migrator.run Entangler.new(migration, @connection).run do Chunker.new(migration, @connection, ).run if [:atomic_switch] AtomicSwitcher.new(migration, @connection).run else LockedSwitcher.new(migration, @connection).run end end end |