Class: Babik::Selection::Operation::BinaryOperation

Inherits:
Base
  • Object
show all
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

Instance Attribute Summary

Attributes inherited from Base

#field, #sql_operation, #sql_operation_template, #value

Instance Method Summary collapse

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