Class: ActiveRecord::ConnectionAdapters::PostgreSQLColumn
- Defined in:
- lib/active_record/connection_adapters/postgresql_adapter.rb
Overview
PostgreSQL-specific extensions to column definitions in a table.
Constant Summary
Constants inherited from Column
Column::FALSE_VALUES, Column::TRUE_VALUES
Class Attribute Summary collapse
-
.money_precision ⇒ Object
Returns the value of attribute money_precision.
Attributes inherited from Column
#default, #limit, #name, #null, #precision, #primary, #scale, #sql_type, #type
Instance Method Summary collapse
-
#initialize(name, default, sql_type = nil, null = true) ⇒ PostgreSQLColumn
constructor
Instantiates a new PostgreSQL column definition in a table.
Methods inherited from Column
binary_to_string, #extract_default, #has_default?, #human_name, #klass, #number?, string_to_binary, string_to_date, string_to_dummy_time, string_to_time, #text?, #type_cast, #type_cast_code, value_to_boolean, value_to_decimal
Constructor Details
#initialize(name, default, sql_type = nil, null = true) ⇒ PostgreSQLColumn
Instantiates a new PostgreSQL column definition in a table.
39 40 41 |
# File 'lib/active_record/connection_adapters/postgresql_adapter.rb', line 39 def initialize(name, default, sql_type = nil, null = true) super(name, self.class.extract_value_from_default(default), sql_type, null) end |
Class Attribute Details
.money_precision ⇒ Object
Returns the value of attribute money_precision.
45 46 47 |
# File 'lib/active_record/connection_adapters/postgresql_adapter.rb', line 45 def money_precision @money_precision end |