Class: Arel::Predicates::CompoundPredicate
- Defined in:
- lib/arel/algebra/predicates.rb
Instance Attribute Summary
Attributes inherited from Binary
Attributes inherited from Unary
Instance Method Summary collapse
Methods inherited from Binary
Methods inherited from Unary
Methods inherited from Predicate
#and, #complement, #not, #or
Constructor Details
This class inherits a constructor from Arel::Predicates::Binary
Instance Method Details
#eval(row) ⇒ Object
148 149 150 |
# File 'lib/arel/algebra/predicates.rb', line 148 def eval(row) eval "operand1.eval(row) #{operator} operand2.eval(row)" end |
#to_sql(formatter = nil) ⇒ Object
152 153 154 |
# File 'lib/arel/algebra/predicates.rb', line 152 def to_sql(formatter = nil) "(#{operand1.to_sql(formatter)} #{predicate_sql} #{operand2.to_sql(formatter)})" end |