Class: ActiveRecord::ConnectionAdapters::FirebirdColumn
- Inherits:
-
Column
- Object
- Column
- ActiveRecord::ConnectionAdapters::FirebirdColumn
- Defined in:
- lib/active_record/connection_adapters/rubyfb_adapter.rb
Overview
:nodoc:
Constant Summary collapse
- VARCHAR_MAX_LENGTH =
32_765
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(connection, name, domain, type, sub_type, length, precision, scale, default_source, null_flag) ⇒ FirebirdColumn
constructor
A new instance of FirebirdColumn.
Constructor Details
#initialize(connection, name, domain, type, sub_type, length, precision, scale, default_source, null_flag) ⇒ FirebirdColumn
Returns a new instance of FirebirdColumn.
48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/active_record/connection_adapters/rubyfb_adapter.rb', line 48 def initialize(connection, name, domain, type, sub_type, length, precision, scale, default_source, null_flag) @firebird_type = FireRuby::SQLType.to_base_type(type, sub_type).to_s super(name.downcase, nil, @firebird_type, !null_flag) @limit = decide_limit(length) @domain, @sub_type, @precision, @scale = domain, sub_type, precision, scale.abs @type = simplified_type(@firebird_type) @default = parse_default(default_source) if default_source @default = type_cast(decide_default(connection)) if @default end |
Class Method Details
.value_to_boolean(value) ⇒ Object
60 61 62 |
# File 'lib/active_record/connection_adapters/rubyfb_adapter.rb', line 60 def self.value_to_boolean(value) %W(#{RubyfbAdapter.boolean_domain[:true]} true t 1).include? value.to_s.downcase end |