Class: Peegee::UniqueConstraint
- Inherits:
-
Object
- Object
- Peegee::UniqueConstraint
- Defined in:
- lib/peegee/unique_constraint.rb
Instance Method Summary collapse
-
#initialize(opts) ⇒ UniqueConstraint
constructor
A new instance of UniqueConstraint.
-
#to_s ⇒ Object
returns human readable unique constraint definition.
-
#unique_constraint_name ⇒ Object
Returns the name of this unique constraint.
Constructor Details
#initialize(opts) ⇒ UniqueConstraint
Returns a new instance of UniqueConstraint.
4 5 6 |
# File 'lib/peegee/unique_constraint.rb', line 4 def initialize(opts) super(opts) end |
Instance Method Details
#to_s ⇒ Object
returns human readable unique constraint definition
14 15 16 |
# File 'lib/peegee/unique_constraint.rb', line 14 def to_s "Unique Constraint: #{unique_constraint_name} on #{table_name}" end |
#unique_constraint_name ⇒ Object
Returns the name of this unique constraint
9 10 11 |
# File 'lib/peegee/unique_constraint.rb', line 9 def unique_constraint_name @constraint_name end |