Module: ROM::SQL::Types::PG

Defined in:
lib/rom/sql/extensions/postgres/types.rb

Constant Summary collapse

UUID =

UUID

Types::String
Array =

Array

Dry::Types::Definition
.new(Sequel::Postgres::PGArray)
JSONArray =

JSON

Dry::Types::Definition
.new(Sequel::Postgres::JSONArray)
.constructor(Sequel.method(:pg_json))
JSONHash =
Dry::Types::Definition
.new(Sequel::Postgres::JSONHash)
.constructor(Sequel.method(:pg_json))
JSONOp =
Dry::Types::Definition
.new(Sequel::Postgres::JSONOp)
.constructor(Sequel.method(:pg_json))
JSON =
JSONArray | JSONHash | JSONOp
JSONBArray =

JSONB

Dry::Types::Definition
.new(Sequel::Postgres::JSONBArray)
.constructor(Sequel.method(:pg_jsonb))
JSONBHash =
Dry::Types::Definition
.new(Sequel::Postgres::JSONBHash)
.constructor(Sequel.method(:pg_jsonb))
JSONBOp =
Dry::Types::Definition
.new(Sequel::Postgres::JSONBOp)
.constructor(Sequel.method(:pg_jsonb))
JSONB =
JSONBArray | JSONBHash | JSONBOp
Bytea =
Dry::Types::Definition
.new(Sequel::SQL::Blob)
.constructor(Sequel::SQL::Blob.method(:new))
Money =

MONEY

Types::Decimal

Class Method Summary collapse

Class Method Details

.Array(db_type) ⇒ Object



19
20
21
# File 'lib/rom/sql/extensions/postgres/types.rb', line 19

def self.Array(db_type)
  Array.constructor(-> (v) { Sequel.pg_array(v, db_type) }).meta(type: db_type)
end