Class: GammaReplication::Table
- Inherits:
-
Object
- Object
- GammaReplication::Table
- Defined in:
- lib/gamma_replication/table.rb
Constant Summary collapse
- DEFAULT_PRIMARY_KEY =
"id"
Instance Attribute Summary collapse
-
#hooks ⇒ Object
Returns the value of attribute hooks.
-
#in_exist ⇒ Object
Returns the value of attribute in_exist.
-
#in_exist_columns ⇒ Object
Returns the value of attribute in_exist_columns.
-
#out_exist ⇒ Object
Returns the value of attribute out_exist.
-
#out_exist_columns ⇒ Object
Returns the value of attribute out_exist_columns.
-
#table_name ⇒ Object
Returns the value of attribute table_name.
Instance Method Summary collapse
-
#initialize ⇒ Table
constructor
A new instance of Table.
- #primary_key ⇒ Object
- #record_value(record) ⇒ Object
Constructor Details
#initialize ⇒ Table
Returns a new instance of Table.
10 11 12 13 14 |
# File 'lib/gamma_replication/table.rb', line 10 def initialize @hooks = [] @in_exist_columns = [] @out_exist_columns = [] end |
Instance Attribute Details
#hooks ⇒ Object
Returns the value of attribute hooks.
7 8 9 |
# File 'lib/gamma_replication/table.rb', line 7 def hooks @hooks end |
#in_exist ⇒ Object
Returns the value of attribute in_exist.
7 8 9 |
# File 'lib/gamma_replication/table.rb', line 7 def in_exist @in_exist end |
#in_exist_columns ⇒ Object
Returns the value of attribute in_exist_columns.
7 8 9 |
# File 'lib/gamma_replication/table.rb', line 7 def in_exist_columns @in_exist_columns end |
#out_exist ⇒ Object
Returns the value of attribute out_exist.
7 8 9 |
# File 'lib/gamma_replication/table.rb', line 7 def out_exist @out_exist end |
#out_exist_columns ⇒ Object
Returns the value of attribute out_exist_columns.
7 8 9 |
# File 'lib/gamma_replication/table.rb', line 7 def out_exist_columns @out_exist_columns end |
#table_name ⇒ Object
Returns the value of attribute table_name.
7 8 9 |
# File 'lib/gamma_replication/table.rb', line 7 def table_name @table_name end |
Instance Method Details
#primary_key ⇒ Object
24 25 26 |
# File 'lib/gamma_replication/table.rb', line 24 def primary_key DEFAULT_PRIMARY_KEY end |
#record_value(record) ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/gamma_replication/table.rb', line 16 def record_value(record) result = record.dup hooks.each do |hook| result = hook.execute_script(result) end result end |