Class: ActiveRecord::ConnectionAdapters::HyperTableDefinition
- Inherits:
-
TableDefinition
- Object
- TableDefinition
- ActiveRecord::ConnectionAdapters::HyperTableDefinition
- Defined in:
- lib/active_record/connection_adapters/hyper_table_definition.rb
Instance Method Summary collapse
Instance Method Details
#column(name, type, options = {}) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/active_record/connection_adapters/hyper_table_definition.rb', line 11 def column(name, type, = {}) column = self[name] || HyperColumnDefinition.new(@base, name, type) if [:limit] column.limit = [:limit] elsif native[type.to_sym].is_a?(Hash) column.limit = native[type.to_sym][:limit] end column.max_versions = [:max_versions] column. = @columns << column unless @columns.include? column self end |