Sha256: be6aad169cc919bd0de0ccc330d8f011100f8d147f13a245740fe15087d32041

Contents?: true

Size: 935 Bytes

Versions: 2

Compression:

Stored size: 935 Bytes

Contents

module Axiom
  module Adapter
    module Arango
      class Visitor
        class For
          class Unary
            # Visitor for emitting AQL FILTER statements from axiom restrictions
            class Restriction < self

              handle(Axiom::Algebra::Restriction)

              LOCAL_NAME = AQL.name_node('restriction')

            private

              # Return filter operation
              #
              # @return [AQL::Node]
              #
              # @api private
              #
              def operation
                Node::Operation::Unary::Filter.new(expression)
              end

              # Return restriction expression
              #
              # @return [AQL::Node]
              #
              # @api private
              #
              def expression
                visit(input.predicate)
              end

            end
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
axiom-arango-adapter-0.0.2 lib/axiom/adapter/arango/visitor/for/unary/restriction.rb
axiom-arango-adapter-0.0.1 lib/axiom/adapter/arango/visitor/for/unary/restriction.rb