class Babik::Selection::Operation::IfNotNullOperation

Operations that in case a nil is passed will convert the equality comparison to IS NULL

Constants

SQL_OPERATOR

Public Class Methods

new(field, value) click to toggle source
Calls superclass method Babik::Selection::Operation::Base::new
# File lib/babik/queryset/lib/selection/operation/operations.rb, line 20
def initialize(field, value)
  if value.nil?
    super(field, '?field IS NULL', value)
  else
    super(field, "?field #{SQL_OPERATOR} ?value", value)
  end
end