Class: Peegee::UniqueConstraint

Inherits:
Object
  • Object
show all
Defined in:
lib/peegee/unique_constraint.rb

Instance Method Summary collapse

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_sObject

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_nameObject

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