Methods

Class Index [+]

Quicksearch

Sequel::SQL::OperatorBuilders

These methods are designed as replacements for the core extension operator methods, so that Sequel is still easy to use if the core extensions are not enabled.

The following methods are defined via metaprogramming: +, -, *, /, &, |. The +, -, *, and / operators return numeric expressions combining all the arguments with the appropriate operator, and the & and | operators return boolean expressions combining all of the arguments with either AND or OR.

Public Instance Methods

~(arg) click to toggle source

Invert the given expression. Returns a Sequel::SQL::BooleanExpression created from this argument, not matching all of the conditions.

  Sequel.~(nil) # SQL: NOT NULL
  Sequel.~([[:a, true]]) # SQL: a IS NOT TRUE
  Sequel.~([[:a, 1], [:b, [2, 3]]]) # SQL: a != 1 OR b NOT IN (2, 3)
     # File lib/sequel/sql.rb, line 741
741:       def ~(arg)
742:         if condition_specifier?(arg)
743:           SQL::BooleanExpression.from_value_pairs(arg, :OR, true)
744:         else
745:           SQL::BooleanExpression.invert(arg)
746:         end
747:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.