Class: Arel::Predicates::Inequality

Inherits:
Equality show all
Defined in:
lib/arel/algebra/predicates.rb

Instance Attribute Summary

Attributes inherited from Binary

#operand2

Attributes inherited from Unary

#operand

Instance Method Summary collapse

Methods inherited from Equality

#==

Methods inherited from Binary

#==, #bind, #initialize, #to_sql

Methods inherited from Unary

#==, #bind, #initialize, #to_sql

Methods inherited from Predicate

#and, #not, #or

Constructor Details

This class inherits a constructor from Arel::Predicates::Binary

Instance Method Details

#complementObject



196
197
198
# File 'lib/arel/algebra/predicates.rb', line 196

def complement
  Equality.new(operand1, operand2)
end

#eval(row) ⇒ Object



201
202
203
# File 'lib/arel/algebra/predicates.rb', line 201

def eval(row)
  operand1.eval(row) != operand2.eval(row)
end

#operatorObject



200
# File 'lib/arel/algebra/predicates.rb', line 200

def operator; :"!=" end

#predicate_sqlObject



205
206
207
# File 'lib/arel/algebra/predicates.rb', line 205

def predicate_sql
  operand2.inequality_predicate_sql
end