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