Class RR::TableSpecResolver
In: lib/rubyrep/table_spec_resolver.rb
Parent: Object

Resolves table specifications as provided e. g. in the command line of rrscan

Methods

Attributes

session  [RW]  The Session instance from which the table specifications are resolved.

Public Class methods

Creates a resolver that works based on the given Session instance.

Public Instance methods

Returns all those tables from the given table_pairs that do not exist.

  • table_pairs: same as described at table_pairs_without_excluded

Returns: A hash with keys :left and +:right+, with the value for each key being an array of non-existing tables for the according database. The keys only exist if there are according missing tables.

Resolves the given array of table specificifications. Table specifications are either

  • strings as produced by BaseRunner#get_options or
  • actual regular expressions

If excluded_table_specs is provided, removes all tables that match it (even if otherwise matching included_table_specs).

If verify is true, raises an exception if any non-existing tables are specified.

Returns an array of table name pairs in Hash form. For example something like

  [{:left => 'my_table', :right => 'my_table_backup'}]

Takes care that a table is only returned once.

Returns the array of tables of the specified database. Caches the table array.

  • database: either :left or :right

[Validate]