<commit_before>module Veritas
  module Adapter
    module Arango
      class Visitor
        # Visitor for binary aql nodes
        class Binary < self

          MAPPING = {
            Function::Numeric::Multiplication => AQL::Node::Operator::Binary::Multiplication,
            Function::Connective::Disjunction => AQL::Node::Operator::Binary::Or,
            Function::Connective::Disjunction => AQL::Node::Operator::Binary::Or,
            Function::Predicate::Equality     => AQL::Node::Operator::Binary::Equality
          }.freeze

          MAPPING.each_key do |klass|
            handle(klass)
          end

          # Return local name
          #
          # @return [Node::Name]
          #
          # @api private
          #
          def local_name
            context.local_name
          end
          memoize :local_name

          # Return root aql node
          #
          # @return [AQL::Node]
          #
          # @api private
          #
          def root
            klass = MAPPING.fetch(input.class)
            klass.new(left, right)
          end
          memoize :root

        private

          # Return left aql node
          #
          # @return [AQL::Node]
          #
          # @api private
          #
          def left
            visit(input.left)
          end

          # Return right aql node
          #
          # @return [AQL::Node]
          #
          # @api private
          #
          def right
            visit(input.right)
          end

        end
      end
    end
  end
end
<commit_msg>Add support for remaining binary numeric operators<commit_after>module Veritas
  module Adapter
    module Arango
      class Visitor
        # Visitor for binary aql nodes
        class Binary < self

          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::Connective::Disjunction => AQL::Node::Operator::Binary::Or,
            Function::Connective::Disjunction => AQL::Node::Operator::Binary::Or,
            Function::Predicate::Equality     => AQL::Node::Operator::Binary::Equality
          }.freeze

          MAPPING.each_key do |klass|
            handle(klass)
          end

          # Return local name
          #
          # @return [Node::Name]
          #
          # @api private
          #
          def local_name
            context.local_name
          end
          memoize :local_name

          # Return root aql node
          #
          # @return [AQL::Node]
          #
          # @api private
          #
          def root
            klass = MAPPING.fetch(input.class)
            klass.new(left, right)
          end
          memoize :root

        private

          # Return left aql node
          #
          # @return [AQL::Node]
          #
          # @api private
          #
          def left
            visit(input.left)
          end

          # Return right aql node
          #
          # @return [AQL::Node]
          #
          # @api private
          #
          def right
            visit(input.right)
          end

        end
      end
    end
  end
end

{'fraction_non_alphanumeric': 0.09618668184405237, 'fraction_numerical': 0.0, 'mean_word_length': 1.3590604026845639, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6950513', 'n_tokens_mistral': 934, 'n_tokens_neox': 912, 'n_words': 196}