Class: Babik::Selection::Operation::BinaryOperation
- Defined in:
- lib/babik/queryset/lib/selection/operation/base.rb
Overview
Binary operation That’s it ?field <operator> ?value Most operations will have this format
Direct Known Subclasses
Contains, Different, EndsWith, GreaterThan, GreaterThanOrEqual, LessThan, LessThanOrEqual, StartsWith
Instance Attribute Summary
Attributes inherited from Base
#field, #sql_operation, #sql_operation_template, #value
Instance Method Summary collapse
-
#initialize(field, value) ⇒ BinaryOperation
constructor
A new instance of BinaryOperation.
Methods inherited from Base
#_init_sql_operation, date_special_cases, #db_engine, escape, factory, initialize_operation, initialize_operators, operator?, special_cases, #to_s
Constructor Details
#initialize(field, value) ⇒ BinaryOperation
Returns a new instance of BinaryOperation.
119 120 121 |
# File 'lib/babik/queryset/lib/selection/operation/base.rb', line 119 def initialize(field, value) super(field, "?field #{self.class::SQL_OPERATOR} ?value", value) end |