Class: Babik::Selection::Operation::EndsWith
- Inherits:
-
BinaryOperation
- Object
- Base
- BinaryOperation
- Babik::Selection::Operation::EndsWith
- Defined in:
- lib/babik/queryset/lib/selection/operation/operations.rb
Constant Summary collapse
- SQL_OPERATOR =
'LIKE'
Instance Attribute Summary
Attributes inherited from Base
#field, #sql_operation, #sql_operation_template, #value
Instance Method Summary collapse
Methods inherited from BinaryOperation
Methods inherited from Base
date_special_cases, #db_engine, escape, factory, #initialize, initialize_operation, initialize_operators, operator?, special_cases, #to_s
Constructor Details
This class inherits a constructor from Babik::Selection::Operation::BinaryOperation
Instance Method Details
#_init_sql_operation ⇒ Object
141 142 143 144 |
# File 'lib/babik/queryset/lib/selection/operation/operations.rb', line 141 def _init_sql_operation escaped_value = self.class.escape("%#{@value}") @sql_operation = @sql_operation.sub('?field', @field).sub('?value', escaped_value) end |