module Arel::Ltree::Visitors

Private Instance Methods

visit_Arel_Attributes_Lquery(o) click to toggle source
# File lib/arel-ltree/ltree/visitors.rb, line 23
def visit_Arel_Attributes_Lquery(o)
  "'#{o}'::lquery"
end
visit_Arel_Attributes_Ltree(o) click to toggle source
# File lib/arel-ltree/ltree/visitors.rb, line 19
def visit_Arel_Attributes_Ltree(o)
  "'#{o}'::ltree"
end
visit_Arel_Ltree_Nodes_AncestorOf(o) click to toggle source
# File lib/arel-ltree/ltree/visitors.rb, line 6
def visit_Arel_Ltree_Nodes_AncestorOf(o)
  "#{visit o.left} @> #{visit o.right}"
end
visit_Arel_Ltree_Nodes_DescendantOf(o) click to toggle source
# File lib/arel-ltree/ltree/visitors.rb, line 10
def visit_Arel_Ltree_Nodes_DescendantOf(o)
  "#{visit o.left} <@ #{visit o.right}"
end
visit_Arel_Ltree_Nodes_Matches(o) click to toggle source
# File lib/arel-ltree/ltree/visitors.rb, line 14
def visit_Arel_Ltree_Nodes_Matches(o)
  raise ArgumentError.new("Missing right operand for MATCH") unless o.right
  "#{visit o.left} ~ #{visit o.right}"
end