Methods

Class/Module Index [+]

Quicksearch

Sequel::SQL::BooleanMethods

This module includes the boolean/logical AND (&), OR (|) and NOT (~) operators that are defined on objects that can be used in a boolean context in SQL (Symbol, LiteralString, and SQL::GenericExpression).

:a & :b # "a" AND "b"
:a | :b # "a" OR "b"
~:a # NOT "a"

One exception to this is when a NumericExpression or Integer is the argument to & or |, in which case a bitwise method will be used:

:a & 1 # "a" & 1 
:a | (:b + 1) # "a" | ("b" + 1)

Public Instance Methods

~() click to toggle source

Create a new BooleanExpression with NOT, representing the inversion of whatever self represents.

~:a # NOT :a
# File lib/sequel/sql.rb, line 310
def ~
  BooleanExpression.invert(self)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.