Class: PGTrunk::Operations::Domains::Base Abstract

Inherits:
PGTrunk::Operation show all
Defined in:
lib/pg_trunk/operations/domains/base.rb

Overview

This class is abstract.

Base class for operations with domain types

Direct Known Subclasses

ChangeDomain, CreateDomain, DropDomain, RenameDomain

Instance Method Summary collapse

Methods included from PGTrunk::Operation::SQLHelpers

#quote

Methods included from PGTrunk::Operation::RubyHelpers

#dump, #to_a, #to_opts, #to_ruby

Methods included from PGTrunk::Operation::Inversion

#invert!, #irreversible!

Methods included from PGTrunk::Operation::Validations

#error_messages

Methods included from PGTrunk::Operation::Attributes

#attributes, #initialize

Instance Method Details

#constraint(check, name: nil) ⇒ Object

Populate constraints from a block



16
17
18
# File 'lib/pg_trunk/operations/domains/base.rb', line 16

def constraint(check, name: nil)
  constraints << Constraint.new(check: check, name: name)
end