Class: Mkxms::Mssql::TableTypeKeyConstraintHandler
- Inherits:
-
Object
- Object
- Mkxms::Mssql::TableTypeKeyConstraintHandler
- Defined in:
- lib/mkxms/mssql/table_type_handler.rb
Instance Method Summary collapse
- #handle_column_element(parse) ⇒ Object
- #handle_property_element(parse) ⇒ Object
-
#initialize(constraints, node) ⇒ TableTypeKeyConstraintHandler
constructor
A new instance of TableTypeKeyConstraintHandler.
Constructor Details
#initialize(constraints, node) ⇒ TableTypeKeyConstraintHandler
Returns a new instance of TableTypeKeyConstraintHandler.
214 215 216 217 218 |
# File 'lib/mkxms/mssql/table_type_handler.rb', line 214 def initialize(constraints, node) TableType::KeyConstraint.new(node.attributes).tap do |c| constraints << (@constraint = c) end end |
Instance Method Details
#handle_column_element(parse) ⇒ Object
220 221 222 |
# File 'lib/mkxms/mssql/table_type_handler.rb', line 220 def handle_column_element(parse) @constraint.columns << TableType::ConstraintColumn.new(parse.node.attributes) end |
#handle_property_element(parse) ⇒ Object
224 225 226 |
# File 'lib/mkxms/mssql/table_type_handler.rb', line 224 def handle_property_element(parse) raise "Properties on table type constraints are unsupported" end |