Class | RR::Session |
In: |
lib/rubyrep/session.rb
|
Parent: | Object |
This class represents a rubyrep session. Creates and holds expensive objects like e. g. database connections.
configuration | [RW] | The Configuration object provided to the initializer |
proxies | [RW] | Hash to hold under either :left or :right the according Drb / direct DatabaseProxy |
Creates a new rubyrep session with the provided Configuration
Returns an array of table pairs of the configured tables. Refer to TableSpecResolver#resolve for a detailed description of the return value. If included_table_specs is provided (that is: not an empty array), it will be used instead of the configured table specs.
Returns the corresponding table in the other database.
If no corresponding table can be found, return the given table. Rationale: Support the case where a table was dropped from the configuration but there were still some unreplicated changes left.
Creates a hash of manual primary key names as can be specified with the Configuration options :primary_key_names or :auto_key_limit.
Returns the identified manual primary keys. This is a hash with
Refreshes both database connections
Orders the array of table pairs as per primary key / foreign key relations of the tables. Returns the result. Only sorts if the configuration has set option :table_ordering. Refer to TableSpecResolver#resolve for a detailed description of the parameter and return value.