Class RR::TableSync
In: lib/rubyrep/table_sync.rb
Parent: TableScan

Synchronizes the data of two tables.

Methods

Attributes

helper  [RW]  Instance of SyncHelper

Public Class methods

Creates a new TableSync instance

  * session: a Session object representing the current database session
  * left_table: name of the table in the left database
  * right_table: name of the table in the right database. If not given, same like left_table

Public Instance methods

Calls the event filter for the give table difference.

  • type: type of difference
  • row: the differing row

Refer to DirectTableScan#run for full description of type and row. Returns true if syncing of the difference should not proceed.

Executes the specified sync hook

  • hook_id: either :before_table_sync or :after_table_sync

Executes the table sync. If a block is given, yields each difference with the following 2 parameters

  • type
  • row

Purpose: enable display of progress information. See DirectTableScan#run for full description of yielded parameters.

Returns a hash of sync options for this table sync.

[Validate]