Class: Mkxms::Mssql::TableTypeHandler
- Inherits:
-
Object
- Object
- Mkxms::Mssql::TableTypeHandler
- Includes:
- PropertyHandler::ElementHandler
- Defined in:
- lib/mkxms/mssql/table_type_handler.rb
Instance Method Summary collapse
- #handle_check_constraint_element(parse) ⇒ Object
- #handle_column_element(parse) ⇒ Object
- #handle_key_constraint_element(parse) ⇒ Object
-
#initialize(user_types, node) ⇒ TableTypeHandler
constructor
A new instance of TableTypeHandler.
Methods included from PropertyHandler::ElementHandler
Constructor Details
#initialize(user_types, node) ⇒ TableTypeHandler
Returns a new instance of TableTypeHandler.
232 233 234 235 236 |
# File 'lib/mkxms/mssql/table_type_handler.rb', line 232 def initialize(user_types, node) TableType.new(node.attributes).tap do |tt| user_types << store_properties_on(@type = tt) end end |
Instance Method Details
#handle_check_constraint_element(parse) ⇒ Object
250 251 252 |
# File 'lib/mkxms/mssql/table_type_handler.rb', line 250 def handle_check_constraint_element(parse) parse.delegate_to TableTypeCheckConstraintHandler, @type.constraints end |
#handle_column_element(parse) ⇒ Object
238 239 240 241 242 243 244 |
# File 'lib/mkxms/mssql/table_type_handler.rb', line 238 def handle_column_element(parse) a = parse.node.attributes TableType::Column.new(parse.node.attributes).tap do |c| @type.columns << c parse.context = TableTypeColumnHandler.new(c) end end |
#handle_key_constraint_element(parse) ⇒ Object
246 247 248 |
# File 'lib/mkxms/mssql/table_type_handler.rb', line 246 def handle_key_constraint_element(parse) parse.delegate_to TableTypeKeyConstraintHandler, @type.constraints end |