module Torque::PostgreSQL::Adapter::ColumnMethods

Public Instance Methods

enum(*args, **options) click to toggle source

Creates a column with an enum type, needing to specify the subtype, which is basically the name of the type defined prior creating the column

# File lib/torque/postgresql/adapter/schema_definitions.rb, line 18
def enum(*args, **options)
  subtype = options.delete(:subtype)
  args.each { |name| column(name, (subtype || name), **options) }
end
enum_set(*args, **options) click to toggle source

Creates a column with an enum array type, needing to specify the subtype, which is basically the name of the type defined prior creating the column

Calls superclass method
# File lib/torque/postgresql/adapter/schema_definitions.rb, line 26
def enum_set(*args, **options)
  super(*args, **options.merge(array: true))
end
interval(*args, **options) click to toggle source

Creates a column with an interval type, allowing span of times and dates to be stored without having to store a seconds-based integer or any sort of other approach

# File lib/torque/postgresql/adapter/schema_definitions.rb, line 11
def interval(*args, **options)
  args.each { |name| column(name, :interval, **options) }
end