Module | Sequel::Dataset::UnsupportedIsTrue
In: | lib/sequel/adapters/utils/unsupported.rb

This module should be included in the dataset class for all databases that don‘t support IS [NOT] (TRUE|FALSE)

### Methods

complex_expression_sql

### Public Instance methods

complex_expression_sql(op, args)

Use an = construct instead of IS and an != OR IS NULL construct instead of IS NOT.

[Source]

        # File lib/sequel/adapters/utils/unsupported.rb, line 48
    48:     def complex_expression_sql(op, args)
    49:       case op
    50:       when :IS, 'IS NOT''IS NOT'
    51:         isnot = op != :IS
    52:         return super if (v1 = args.at(1)).nil?
    53:         v0 = literal(args.at(0))
    54:         s = "(#{v0} #{'!' if isnot}= #{literal(v1)})"
    55:         s = "(#{s} OR (#{v0} IS NULL))" if isnot
    56:         s
    57:       else
    58:         super(op, args)
    59:       end
    60:     end

[Validate]