Class: Axiom::Adapter::Arango::Visitor::Binary
- Inherits:
-
Axiom::Adapter::Arango::Visitor
- Object
- Axiom::Adapter::Arango::Visitor
- Axiom::Adapter::Arango::Visitor::Binary
- Defined in:
- lib/axiom/adapter/arango/visitor/binary.rb
Overview
Visitor for binary AQL nodes
Constant Summary collapse
- MAPPING =
{ Function::Numeric::Multiplication => AQL::Node::Operator::Binary::Multiplication, Function::Numeric::Addition => AQL::Node::Operator::Binary::Addition, Function::Numeric::Division => AQL::Node::Operator::Binary::Division, Function::Numeric::Modulo => AQL::Node::Operator::Binary::Modulo, Function::Numeric::Subtraction => AQL::Node::Operator::Binary::Subtraction, Function::Predicate::GreaterThanOrEqualTo => AQL::Node::Operator::Binary::GreaterThanOrEqualTo, Function::Predicate::GreaterThan => AQL::Node::Operator::Binary::GreaterThan, Function::Predicate::LessThan => AQL::Node::Operator::Binary::LessThan, Function::Predicate::LessThanOrEqualTo => AQL::Node::Operator::Binary::LessThanOrEqualTo, Function::Connective::Disjunction => AQL::Node::Operator::Binary::Or, Function::Connective::Conjunction => AQL::Node::Operator::Binary::And, Function::Predicate::Equality => AQL::Node::Operator::Binary::Equality, Function::Predicate::Inequality => AQL::Node::Operator::Binary::Inequality }.freeze
Constants inherited from Axiom::Adapter::Arango::Visitor
Instance Method Summary collapse
-
#local_name ⇒ Node::Name
private
Return local name.
-
#root ⇒ AQL::Node
private
Return root AQL node.
Methods inherited from Axiom::Adapter::Arango::Visitor
Instance Method Details
#local_name ⇒ Node::Name
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Return local name
34 35 36 |
# File 'lib/axiom/adapter/arango/visitor/binary.rb', line 34 def local_name context.local_name end |
#root ⇒ AQL::Node
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Return root AQL node
45 46 47 48 |
# File 'lib/axiom/adapter/arango/visitor/binary.rb', line 45 def root klass = MAPPING.fetch(input.class) klass.new(left, right) end |