Class: Mkxms::Mssql::DefaultConstraintHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/mkxms/mssql/default_constraint_handler.rb

Instance Method Summary collapse

Constructor Details

#initialize(constraints, node) ⇒ DefaultConstraintHandler

Returns a new instance of DefaultConstraintHandler.



30
31
32
33
34
35
36
37
38
39
40
# File 'lib/mkxms/mssql/default_constraint_handler.rb', line 30

def initialize(constraints, node)
  a = node.attributes
  @constraint = DefaultConstraint.new(
    a['schema'],
    a['table'],
    a['column'],
    a['name'],
  ).tap do |c|
    constraints << c
  end
end

Instance Method Details

#handle_text(text, parent_element) ⇒ Object



42
43
44
# File 'lib/mkxms/mssql/default_constraint_handler.rb', line 42

def handle_text(text, parent_element)
  @constraint.expression << text
end