Class: Arel::Predicates::NotIn

Inherits:
Binary 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 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



295
296
297
# File 'lib/arel/algebra/predicates.rb', line 295

def complement
  In.new(operand1, operand2)
end

#eval(row) ⇒ Object



299
300
301
# File 'lib/arel/algebra/predicates.rb', line 299

def eval(row)
  !(operand2.eval(row).include?(operand1.eval(row)))
end

#predicate_sqlObject



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

def predicate_sql; operand2.exclusion_predicate_sql end