class Mkxms::Mssql::IndexHandler

Public Class Methods

new(indexes, node) click to toggle source
# File lib/mkxms/mssql/index_handler.rb, line 76
def initialize(indexes, node)
  @index = Index.new(node.attributes).tap do |i|
    store_properties_on i
    indexes << i
  end
end

Public Instance Methods

handle_column_element(parse) click to toggle source
# File lib/mkxms/mssql/index_handler.rb, line 83
def handle_column_element(parse)
  a = parse.node.attributes
  
  if a['included']
    @index.included_columns << IndexColumn.new(a['name'])
  else
    @index.columns << IndexColumn.new(a['name'], a['desc'] ? :descending : :ascending)
  end
end