module Sequel::EmptyArrayConsiderNulls

Public Instance Methods

empty_array_value(op, cols) click to toggle source

Use an expression that returns NULL if the column value is NULL.

# 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