Class: PgMeta::UniqueConstraint

Inherits:
Constraint show all
Defined in:
lib/pg_meta/meta.rb

Instance Attribute Summary

Attributes inherited from Constraint

#columns

Attributes inherited from Node

#name, #parent, #root

Instance Method Summary collapse

Methods inherited from Constraint

#column, #kind, #to_h

Methods inherited from Node

#dump, #dump_value, #guid, #inspect, #sid, #to_h, #to_s, #to_yaml, #uid

Constructor Details

#initialize(table, name, columns) ⇒ UniqueConstraint

Returns a new instance of UniqueConstraint.



456
457
458
459
# File 'lib/pg_meta/meta.rb', line 456

def initialize(table, name, columns)
  super
  table.unique_constraints[name] = self
end