Class: Arel::Predicates::Unary
- Inherits:
-
Predicate
show all
- Defined in:
- lib/arel/algebra/predicates.rb,
lib/arel/engines/sql/predicates.rb,
lib/arel/engines/memory/predicates.rb
Direct Known Subclasses
Not
Instance Method Summary
collapse
Methods inherited from Predicate
#and, #complement, #not, #or
Instance Method Details
#bind(relation) ⇒ Object
78
79
80
|
# File 'lib/arel/algebra/predicates.rb', line 78
def bind(relation)
self.class.new(operand.find_correlate_in(relation))
end
|
#eval(row) ⇒ Object
10
11
12
|
# File 'lib/arel/engines/memory/predicates.rb', line 10
def eval(row)
operand.eval(row).send(operator)
end
|
#to_sql(formatter = nil) ⇒ Object
10
11
12
|
# File 'lib/arel/engines/sql/predicates.rb', line 10
def to_sql(formatter = nil)
"#{predicate_sql} (#{operand.to_sql(formatter)})"
end
|