Class: SqlTools::Constraint

Inherits:
Object
  • Object
show all
Defined in:
lib/sql_tools/constraint.rb

Class Method Summary collapse

Class Method Details

.from(node) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/sql_tools/constraint.rb', line 4

def from(node)
  if node.children.any? { |child| child.type == :keyword_key }
    Index.new(node)
  else
    binding.b
  end
end