Class: ActiveRecordSpannerAdapter::ForeignKey
- Inherits:
-
Object
- Object
- ActiveRecordSpannerAdapter::ForeignKey
- Defined in:
- lib/activerecord_spanner_adapter/foreign_key.rb
Instance Attribute Summary collapse
-
#columns ⇒ Object
Returns the value of attribute columns.
-
#name ⇒ Object
Returns the value of attribute name.
-
#on_delete ⇒ Object
Returns the value of attribute on_delete.
-
#on_update ⇒ Object
Returns the value of attribute on_update.
-
#ref_columns ⇒ Object
Returns the value of attribute ref_columns.
-
#ref_schema ⇒ Object
Returns the value of attribute ref_schema.
-
#ref_table ⇒ Object
Returns the value of attribute ref_table.
-
#table_name ⇒ Object
Returns the value of attribute table_name.
-
#table_schema ⇒ Object
Returns the value of attribute table_schema.
Instance Method Summary collapse
-
#initialize(table_name, name, columns, ref_table, ref_columns, on_delete: nil, on_update: nil, table_schema: "", ref_schema: "") ⇒ ForeignKey
constructor
A new instance of ForeignKey.
Constructor Details
#initialize(table_name, name, columns, ref_table, ref_columns, on_delete: nil, on_update: nil, table_schema: "", ref_schema: "") ⇒ ForeignKey
Returns a new instance of ForeignKey.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/activerecord_spanner_adapter/foreign_key.rb', line 12 def initialize \ table_name, name, columns, ref_table, ref_columns, on_delete: nil, on_update: nil, table_schema: "", ref_schema: "" @table_schema = table_schema @table_name = table_name @name = name @columns = Array(columns) @ref_schema = ref_schema @ref_table = ref_table @ref_columns = Array(ref_columns) @on_delete = on_delete unless on_delete == "NO ACTION" @on_update = on_update unless on_update == "NO ACTION" end |
Instance Attribute Details
#columns ⇒ Object
Returns the value of attribute columns.
9 10 11 |
# File 'lib/activerecord_spanner_adapter/foreign_key.rb', line 9 def columns @columns end |
#name ⇒ Object
Returns the value of attribute name.
9 10 11 |
# File 'lib/activerecord_spanner_adapter/foreign_key.rb', line 9 def name @name end |
#on_delete ⇒ Object
Returns the value of attribute on_delete.
9 10 11 |
# File 'lib/activerecord_spanner_adapter/foreign_key.rb', line 9 def on_delete @on_delete end |
#on_update ⇒ Object
Returns the value of attribute on_update.
9 10 11 |
# File 'lib/activerecord_spanner_adapter/foreign_key.rb', line 9 def on_update @on_update end |
#ref_columns ⇒ Object
Returns the value of attribute ref_columns.
9 10 11 |
# File 'lib/activerecord_spanner_adapter/foreign_key.rb', line 9 def ref_columns @ref_columns end |
#ref_schema ⇒ Object
Returns the value of attribute ref_schema.
9 10 11 |
# File 'lib/activerecord_spanner_adapter/foreign_key.rb', line 9 def ref_schema @ref_schema end |
#ref_table ⇒ Object
Returns the value of attribute ref_table.
9 10 11 |
# File 'lib/activerecord_spanner_adapter/foreign_key.rb', line 9 def ref_table @ref_table end |
#table_name ⇒ Object
Returns the value of attribute table_name.
9 10 11 |
# File 'lib/activerecord_spanner_adapter/foreign_key.rb', line 9 def table_name @table_name end |
#table_schema ⇒ Object
Returns the value of attribute table_schema.
9 10 11 |
# File 'lib/activerecord_spanner_adapter/foreign_key.rb', line 9 def table_schema @table_schema end |