Class: Straitjacket::CheckConstraint
- Inherits:
-
Constraint
- Object
- Constraint
- Straitjacket::CheckConstraint
- Defined in:
- lib/straitjacket.rb
Instance Attribute Summary
Attributes inherited from Constraint
#column, #content, #name, #options, #table
Instance Method Summary collapse
Methods inherited from Constraint
Constructor Details
This class inherits a constructor from Straitjacket::Constraint
Instance Method Details
#sql ⇒ Object
127 128 129 |
# File 'lib/straitjacket.rb', line 127 def sql %[ALTER TABLE "#{table}" ADD CONSTRAINT "#{name}" CHECK (#{@content})] end |