Module: Sequel::EmptyArrayConsiderNulls

Defined in:
lib/sequel/extensions/empty_array_consider_nulls.rb

Instance Method Summary collapse

Instance Method Details

#empty_array_value(op, cols) ⇒ Object

Use a simple expression that is always true or false, never NULL.



27
28
29
30
# File 'lib/sequel/extensions/empty_array_consider_nulls.rb', line 27

def empty_array_value(op, cols)
  c = Array(cols)
  SQL::BooleanExpression.from_value_pairs(c.zip(c), :AND, op == :IN)
end