Module: Pakyow::Data::Adapters::Sql::Types::SQLite Private

Defined in:
lib/pakyow/data/adapters/sql/types.rb

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Constant Summary collapse

TYPES =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

{
  bignum: Sql::TYPES[:bignum].meta(native_type: "bigint"),
  decimal: Sql::TYPES[:decimal].meta(column_type: :decimal, native_type: ->(meta) { "numeric(#{meta[:size][0]}, #{meta[:size][1]})" }),
  integer: Sql::TYPES[:integer].meta(native_type: "integer"),
  string: Sql::TYPES[:string].meta(native_type: "varchar(255)"),
  text: Sql::TYPES[:text].meta(column_type: :string),

  # Used indirectly for migrations to override the column type (since
  # sqlite doesn't support bignum as a primary key).
  #
  pk_bignum: Sql::TYPES[:bignum].meta(column_type: :integer)
}.freeze