Parent

Class/Module Index [+]

Quicksearch

RR::ProxyRowCursor

This class is used to scan a given table range Can return rows either themselves or only their checksum

Attributes

current_row[RW]

The column_name => value hash of the current row.

Public Class Methods

new(session, table) click to toggle source

Creates a new cursor

* session: the current proxy session
* table: table_name
# File lib/rubyrep/proxy_row_cursor.rb, line 19
def initialize(session, table)
  super
end

Public Instance Methods

next?() click to toggle source

Returns true if there are unprocessed rows in the table range

# File lib/rubyrep/proxy_row_cursor.rb, line 24
def next?
  cursor.next?
end
next_row() click to toggle source

Returns the next row in cursor

# File lib/rubyrep/proxy_row_cursor.rb, line 29
def next_row
  cursor.next_row
end
next_row_keys_and_checksum() click to toggle source

Returns for the next row

* a hash of :column_name => value pairs of the primary keys
* checksum string for that row
# File lib/rubyrep/proxy_row_cursor.rb, line 36
def next_row_keys_and_checksum
  self.current_row = cursor.next_row
  keys = self.current_row.reject {|key, | not primary_key_names.include? key}
  checksum = Digest::SHA1.hexdigest(Marshal.dump(self.current_row))
  return keys, checksum
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.