Sha256: 0f0d054aa23ad90474668ef8897f6b8fbaaee363cd638d903c7fb0334dcf0948

Contents?: true

Size: 550 Bytes

Versions: 7

Compression:

Stored size: 550 Bytes

Contents

module AgnosticBackend
  module Queryable
    class Query < TreeNode
      attr_accessor :errors
      attr_reader :context

      def initialize(context)
        super()
        @errors ||= Hash.new { |hash, key| hash[key] = Array.new }
        @context = context
      end

      def execute
        raise NotImplementedError
      end

      def valid?
        self.accept(AgnosticBackend::Queryable::Validator.new)
      end

     def set_scroll_cursor(value)
        context.scroll_cursor(value)
        context.build
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
agnostic_backend-0.9.9 lib/agnostic_backend/queryable/query.rb
agnostic_backend-0.9.8 lib/agnostic_backend/queryable/query.rb
agnostic_backend-0.9.4 lib/agnostic_backend/queryable/query.rb
agnostic_backend-0.9.3 lib/agnostic_backend/queryable/query.rb
agnostic_backend-0.9.2 lib/agnostic_backend/queryable/query.rb
agnostic_backend-0.9.1 lib/agnostic_backend/queryable/query.rb
agnostic_backend-0.9.0 lib/agnostic_backend/queryable/query.rb