Class: AgnosticBackend::Queryable::Criteria::Between

Inherits:
Ternary show all
Defined in:
lib/agnostic_backend/queryable/criteria/ternary.rb

Instance Attribute Summary

Attributes inherited from Ternary

#attribute, #left_value, #right_value

Attributes inherited from TreeNode

#children, #context

Instance Method Summary collapse

Methods inherited from TreeNode

#==, #accept

Methods included from Utilities

included

Constructor Details

#initialize(attribute:, left_value:, right_value:, context: nil) ⇒ Between

Returns a new instance of Between.



14
15
16
17
18
19
# File 'lib/agnostic_backend/queryable/criteria/ternary.rb', line 14

def initialize(attribute:, left_value:, right_value:, context: nil)
  attribute = attribute_component(attribute: attribute, context: context)
  left_value = value_component(value: left_value, context: context, type: attribute.type)
  right_value = value_component(value: right_value, context: context, type: attribute.type)
  super(attribute: attribute, left_value: left_value, right_value: right_value, context: context)
end