class Mkxms::Mssql::UniqueConstraintHandler
Public Class Methods
new(constraints, node)
click to toggle source
# File lib/mkxms/mssql/unique_constraint_handler.rb, line 15 def initialize(constraints, node) a = node.attributes @uconst = UniqueConstraint.new(a).tap do |c| constraints << c end end
Public Instance Methods
handle_column_element(parse)
click to toggle source
# File lib/mkxms/mssql/unique_constraint_handler.rb, line 23 def handle_column_element(parse) a = parse.node.attributes raise UnsupportedFeatureError.new("Unique constraints may not specify included columns (#{@uconst.qualified_table})") if a['included'] @uconst.columns << IndexColumn.new(a['name'], a['desc'] ? :descending : :ascending) end