Class | RR::Syncers::TwoWaySyncer |
In: |
lib/rubyrep/syncers/two_way_syncer.rb
|
Parent: | Object |
This syncer implements a two way sync. Syncer options relevant for this syncer:
Example of using a Proc object:
lambda do |sync_helper, type, row| # delete records existing only in the left database. sync_helper.delete(type, row) if type == :left end
TYPE_DESCRIPTIONS | = | { :left => 'left_record', :right => 'right_record', :conflict => 'conflict' | Sync type descriptions that are written into the event log |
sync_helper | [RW] | The current SyncHelper object |
Initializes the syncer
Raises an ArgumentError if any of the option in sync_helper.sync_options is invalid.
Logs a sync event into the event log table as per configuration options.
Called to sync the provided difference. See DirectTableScan#run for a description of the type and row parameters.
Verifies if the given :sync_conflict_handling option is valid. Raises an ArgumentError if option is invalid
Verifies if the given :left_record_handling / :right_record_handling option is valid. Raises an ArgumentError if option is invalid