Class: AgnosticBackend::Queryable::Expressions::Limit

Inherits:
Expression show all
Defined in:
lib/agnostic_backend/queryable/expressions/expression.rb

Instance Attribute Summary

Attributes inherited from TreeNode

#children, #context

Instance Method Summary collapse

Methods inherited from TreeNode

#==, #accept

Methods included from Utilities

included

Constructor Details

#initialize(value:, context:) ⇒ Limit

Returns a new instance of Limit.



45
46
47
# File 'lib/agnostic_backend/queryable/expressions/expression.rb', line 45

def initialize(value:, context:)
  super([Value.new(value, parent: self, context: context)], context)
end

Instance Method Details

#limitObject



49
50
51
# File 'lib/agnostic_backend/queryable/expressions/expression.rb', line 49

def limit
  children.first
end