Class: Arel::Predicates::Equality

Inherits:
Binary show all
Defined in:
lib/arel/algebra/predicates.rb,
lib/arel/engines/sql/predicates.rb,
lib/arel/engines/memory/predicates.rb

Instance Method Summary collapse

Methods inherited from Binary

#bind, #eval, #to_sql

Methods inherited from Predicate

#and, #not, #or

Instance Method Details

#==(other) ⇒ Object



119
120
121
122
123
# File 'lib/arel/algebra/predicates.rb', line 119

def ==(other)
  Equality === other and
    ((operand1 == other.operand1 and operand2 == other.operand2) or
     (operand1 == other.operand2 and operand2 == other.operand1))
end

#complementObject



125
126
127
# File 'lib/arel/algebra/predicates.rb', line 125

def complement
  Inequality.new(operand1, operand2)
end

#operatorObject



52
# File 'lib/arel/engines/memory/predicates.rb', line 52

def operator; :== end

#predicate_sqlObject



50
51
52
# File 'lib/arel/engines/sql/predicates.rb', line 50

def predicate_sql
  operand2.equality_predicate_sql
end