Class: ActiveRecord::ConnectionAdapters::ColumnDefinition
- Inherits:
-
Object
- Object
- ActiveRecord::ConnectionAdapters::ColumnDefinition
- Defined in:
- lib/activerecord_constraints.rb
Instance Method Summary collapse
-
#add_column_options_with_constraints!(sql, options) ⇒ Object
ColumnDefinition@add_column_options! is called which calls base.add_column_options! by to_sql of ColumnDefinition.
-
#options ⇒ Object
Will contain all the options used on a column definition.
-
#options=(arg) ⇒ Object
Called from TableDefinition#column_with_constraints so we remember the options for each column being defined.
Instance Method Details
#add_column_options_with_constraints!(sql, options) ⇒ Object
ColumnDefinition@add_column_options! is called which calls base.add_column_options! by to_sql of ColumnDefinition. We capture this call so that we can merge in the options we are interested in (namely, all of the original options used in to create the column
278 279 280 281 |
# File 'lib/activerecord_constraints.rb', line 278 def (sql, ) ActiveRecord::Base.logger.debug("IN: ColumnDefinition#add_column_options_with_constraints!") (sql, .merge(@options)) end |
#options ⇒ Object
Will contain all the options used on a column definition
261 262 263 264 |
# File 'lib/activerecord_constraints.rb', line 261 def ActiveRecord::Base.logger.debug("IN: ColumnDefinition#options") @options end |
#options=(arg) ⇒ Object
Called from TableDefinition#column_with_constraints so we remember the options for each column being defined.
268 269 270 271 |
# File 'lib/activerecord_constraints.rb', line 268 def (arg) ActiveRecord::Base.logger.debug("IN: ColumnDefinition#options=") @options = arg end |