Class: AgnosticBackend::Queryable::Query
- Defined in:
- lib/agnostic_backend/queryable/query.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#errors ⇒ Object
Returns the value of attribute errors.
Attributes inherited from TreeNode
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(context) ⇒ Query
constructor
A new instance of Query.
- #set_scroll_cursor(value) ⇒ Object
- #valid? ⇒ Boolean
Methods inherited from TreeNode
Methods included from Utilities
Constructor Details
#initialize(context) ⇒ Query
Returns a new instance of Query.
7 8 9 10 11 |
# File 'lib/agnostic_backend/queryable/query.rb', line 7 def initialize(context) super() @errors ||= Hash.new { |hash, key| hash[key] = Array.new } @context = context end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
5 6 7 |
# File 'lib/agnostic_backend/queryable/query.rb', line 5 def context @context end |
#errors ⇒ Object
Returns the value of attribute errors.
4 5 6 |
# File 'lib/agnostic_backend/queryable/query.rb', line 4 def errors @errors end |
Instance Method Details
#execute ⇒ Object
13 14 15 |
# File 'lib/agnostic_backend/queryable/query.rb', line 13 def execute raise NotImplementedError end |
#set_scroll_cursor(value) ⇒ Object
21 22 23 24 |
# File 'lib/agnostic_backend/queryable/query.rb', line 21 def set_scroll_cursor(value) context.scroll_cursor(value) context.build end |
#valid? ⇒ Boolean
17 18 19 |
# File 'lib/agnostic_backend/queryable/query.rb', line 17 def valid? self.accept(AgnosticBackend::Queryable::Validator.new) end |