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 =
Integer.(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::Nominal
Define a complex attribute type using Type DSL.
-
.ForeignKey(relation, type = Types::Integer.meta(index: true)) ⇒ Dry::Types::Nominal
Define a foreign key attribute type.
Class Method Details
.define(value_type, &block) ⇒ Dry::Types::Nominal
Define a complex attribute type using Type DSL
40 41 42 |
# File 'lib/rom/sql/types.rb', line 40 def self.define(value_type, &block) TypeDSL.new(value_type).call(&block) end |
.ForeignKey(relation, type = Types::Integer.meta(index: true)) ⇒ Dry::Types::Nominal
Define a foreign key attribute type
25 26 27 |
# File 'lib/rom/sql/types.rb', line 25 def self.ForeignKey(relation, type = Types::Integer.(index: true)) super end |