module Sequel::ConstraintValidations::CreateTableGeneratorMethods

  1. lib/sequel/extensions/constraint_validations.rb

Additional methods for the create_table generator to support constraint validations.

Methods

Public Instance

  1. validate
  2. validation
  3. validations

Attributes

validations [R]

An array of stored validation metadata, used later by the database to create constraints.

Public Instance methods

validate (&block)

Call into the validate DSL for creating constraint validations.

[show source]
# File lib/sequel/extensions/constraint_validations.rb, line 186
def validate(&block)
  Generator.new(self).process(&block)
end
validation (opts)

Add a validation metadata hash to the stored array.

[show source]
# File lib/sequel/extensions/constraint_validations.rb, line 181
def validation(opts)
  @validations << opts
end