Module: ROM::SQL::Types
- Includes:
- Types
- Defined in:
- lib/rom/sql/types.rb,
lib/rom/sql/extensions/sqlite/types.rb,
lib/rom/sql/extensions/postgres/types.rb
Constant Summary collapse
- Serial =
Int.(primary_key: true)
- Blob =
Constructor(Sequel::SQL::Blob, &Sequel::SQL::Blob.method(:new))
- Void =
Nil
- SQLite =
::ROM::SQL::SQLite::Types
- PG =
Postgres::Types
Class Method Summary collapse
-
.define(value_type, &block) ⇒ Dry::Types::Definition
Define a complex attribute type using Type DSL.
-
.ForeignKey(relation, type = Types::Int.meta(index: true)) ⇒ Dry::Types::Definition
Define a foreign key attribute type.
Class Method Details
.define(value_type, &block) ⇒ Dry::Types::Definition
Define a complex attribute type using Type DSL
38 39 40 |
# File 'lib/rom/sql/types.rb', line 38 def self.define(value_type, &block) TypeDSL.new(value_type).call(&block) end |
.ForeignKey(relation, type = Types::Int.meta(index: true)) ⇒ Dry::Types::Definition
Define a foreign key attribute type
23 24 25 |
# File 'lib/rom/sql/types.rb', line 23 def self.ForeignKey(relation, type = Types::Int.(index: true)) super end |