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 an expression that returns NULL if the column value is NULL.



31
32
33
34
# File 'lib/sequel/extensions/empty_array_consider_nulls.rb', line 31

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