Module: TableConstraintNode
- Defined in:
- lib/sql_munger/nodes.rb
Instance Method Summary collapse
Instance Method Details
#constraint? ⇒ Boolean
211 |
# File 'lib/sql_munger/nodes.rb', line 211 def constraint?; true; end |
#field? ⇒ Boolean
210 |
# File 'lib/sql_munger/nodes.rb', line 210 def field?; false; end |
#fields ⇒ Object
221 222 223 224 225 |
# File 'lib/sql_munger/nodes.rb', line 221 def fields constraint_spec.parenthesised_list.qualified_identifier_list.elements.map do |node| node.qualified_identifier.text_value end end |
#name ⇒ Object
217 218 219 |
# File 'lib/sql_munger/nodes.rb', line 217 def name constraint_name.parts.last end |
#type ⇒ Object
213 214 215 |
# File 'lib/sql_munger/nodes.rb', line 213 def type constraint_spec.constraint_clause.text_value.downcase.gsub( /\s+/, '_' ).to_sym end |