Class | RR::ProxiedTableScan |
In: |
lib/rubyrep/proxied_table_scan.rb
|
Parent: | TableScan |
Scans two tables for differences. Goes through a RubyRep Proxy to minimize network load. Doesn‘t have any reporting functionality by itself. Instead ProxiedTableScan#run yields all the differences for the caller to do with as it pleases. Usage:
1. Create a new ProxiedTableScan object and hand it all necessary information 2. Call ProxiedTableScan#run to do the actual comparison 3. The block handed to ProxiedTableScan#run receives all differences
Creates a new ProxiedTableScan 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
Compares the specified left and right rows. left_cursor and right_cursor represent the according ProxyBlockCursor objects. Yields all identified differences with
run described the yield parameters in detail.
Runs the table scan. Calls the block for every found difference. Differences are yielded with 2 parameters
* type: describes the difference, either :left (row only in left table), :right (row only in right table) or :conflict * row: for :left or :right cases a hash describing the row; for :conflict an array of left and right row