lib/active_record/connection_adapters/fdbsql/schema_statements.rb
def type_to_sql(type, limit = nil, precision = nil, scale = nil)
          case type
          when :integer
            # NB: Changes here need reflected in FdbSqlColumn.extract_limit()
            case limit
            when nil, 1..4
              type.to_s
            when 5..8
              'bigint'
            else
              raise(ActiveRecordError, "No integer type has byte size #{limit}. Use a decimal with precision 0 instead.")
            end
          when :decimal
            # Maximum supported as of 1.9.2
            precision = 31 if precision.to_i > 31
            super
          when :text
            case limit
            when nil, 0..0xfffffffe
              super
            else
              raise(ActiveRecordError, "Limit #{limit} exceeds max TEXT length")
            end
          else
            super
          end
        end
# Returns a Hash of mappings from the abstract data types to the native
# database types. See TableDefinition#column for details on the recognized
# abstract data types.
Returns a Hash of mappings from the abstract data types to the native
database types. See TableDefinition#column for details on the recognized
abstract data types.
Returns a Hash of mappings from the abstract data types to the native database types . See TableDefinition#column for details on the recognized abstract data types .
def type_to_sql(type, limit = nil, precision = nil, scale = nil)
          case type
          when :integer
            case limit
            when nil, 1..4
              type.to_s
            when 5..8
              'bigint'
            else
              raise(ActiveRecordError, "No integer type has byte size #{limit}. Use a decimal with precision 0 instead.")
            end
          when :decimal
            precision = 31 if precision.to_i > 31
            super
          when :text
            case limit
            when nil, 0..0xfffffffe
              super
            else
              raise(ActiveRecordError, "Limit #{limit} exceeds max TEXT length")
            end
          else
            super
          end
        end
def type_to_sql ( type , limit = nil , precision = nil , scale = nil ) case type when :integer case limit when nil , 1 .. 4 type . to_s when 5 .. 8 'bigint' else raise ( ActiveRecordError , "No integer type has byte size #{limit}. Use a decimal with precision 0 instead." ) end when :decimal precision = 31 if precision . to_i > 31 super when :text case limit when nil , 0 .. 0xfffffffe super else raise ( ActiveRecordError , "Limit #{limit} exceeds max TEXT length" ) end else super end end
Returns a Hash of mappings from the abstract data types to the native
database types.
Returns a Hash of mappings from the abstract data types to the native database types .
# NB: Changes here need reflected in FdbSqlColumn.extract_limit() # Maximum supported as of 1.9.2
type
limit
precision
scale