Class RR::SyncHelper
In: lib/rubyrep/sync_helper.rb
Parent: Object

Provides helper functionality for the table syncers. The methods exposed by this class are intended to provide a stable interface for third party syncers.

Methods

Included Modules

LogHelper

Attributes

table_sync  [RW]  The current TableSync instance

Public Class methods

Creates a new SyncHelper for the given TableSync instance.

Public Instance methods

Delegates to Committers::BufferedCommitter#delete_record

Checks if the event log table already exists and creates it if necessary

Given a column_name => value hash of a full row, returns a column_name => value hash of the primary key columns.

  • row: the full row

Returns

Asks the committer (if it exists) to finalize any open transactions success should be true if there were no problems, false otherwise.

Delegates to Committers::BufferedCommitter#insert_record

Name of the left table

Logs the outcome of a replication into the replication log table.

  • row: a column_name => value hash for at least the primary keys of the record
  • type: string describing the type of the sync
  • outcome: string describing what‘s done about the sync
  • details: string with further details regarding the sync

Name of the right table

The active Session

Sync options for the current table sync

A hash with :left: name of the table in the left database :right: name of the table in the right database

Delegates to Committers::BufferedCommitter#update_record

[Validate]