Class: ActiveRecord::ConnectionAdapters::IBM_DBAdapter::AlterTable
- Inherits:
-
AlterTable
- Object
- AlterTable
- ActiveRecord::ConnectionAdapters::IBM_DBAdapter::AlterTable
- Defined in:
- lib/active_record/connection_adapters/ibm_db_adapter.rb
Instance Attribute Summary collapse
-
#constraint_validations ⇒ Object
readonly
Returns the value of attribute constraint_validations.
-
#exclusion_constraint_adds ⇒ Object
readonly
Returns the value of attribute exclusion_constraint_adds.
-
#exclusion_constraint_drops ⇒ Object
readonly
Returns the value of attribute exclusion_constraint_drops.
-
#unique_constraint_adds ⇒ Object
readonly
Returns the value of attribute unique_constraint_adds.
-
#unique_constraint_drops ⇒ Object
readonly
Returns the value of attribute unique_constraint_drops.
Instance Method Summary collapse
- #add_unique_constraint(column_name, options) ⇒ Object
- #drop_unique_constraint(unique_constraint_name) ⇒ Object
-
#initialize(td) ⇒ AlterTable
constructor
A new instance of AlterTable.
Constructor Details
#initialize(td) ⇒ AlterTable
Returns a new instance of AlterTable.
847 848 849 850 851 852 853 854 |
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 847 def initialize(td) super @constraint_validations = [] @exclusion_constraint_adds = [] @exclusion_constraint_drops = [] @unique_constraint_adds = [] @unique_constraint_drops = [] end |
Instance Attribute Details
#constraint_validations ⇒ Object (readonly)
Returns the value of attribute constraint_validations.
846 847 848 |
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 846 def constraint_validations @constraint_validations end |
#exclusion_constraint_adds ⇒ Object (readonly)
Returns the value of attribute exclusion_constraint_adds.
846 847 848 |
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 846 def exclusion_constraint_adds @exclusion_constraint_adds end |
#exclusion_constraint_drops ⇒ Object (readonly)
Returns the value of attribute exclusion_constraint_drops.
846 847 848 |
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 846 def exclusion_constraint_drops @exclusion_constraint_drops end |
#unique_constraint_adds ⇒ Object (readonly)
Returns the value of attribute unique_constraint_adds.
846 847 848 |
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 846 def unique_constraint_adds @unique_constraint_adds end |
#unique_constraint_drops ⇒ Object (readonly)
Returns the value of attribute unique_constraint_drops.
846 847 848 |
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 846 def unique_constraint_drops @unique_constraint_drops end |
Instance Method Details
#add_unique_constraint(column_name, options) ⇒ Object
856 857 858 |
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 856 def add_unique_constraint(column_name, ) @unique_constraint_adds << @td.new_unique_constraint_definition(column_name, ) end |
#drop_unique_constraint(unique_constraint_name) ⇒ Object
860 861 862 |
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 860 def drop_unique_constraint(unique_constraint_name) @unique_constraint_drops << unique_constraint_name end |