Module: Sequel::SQL::BooleanMethods
- Included in:
- Dataset, LiteralString, BooleanExpression, GenericComplexExpression, GenericExpression, Symbol
- Defined in:
- lib/sequel/sql.rb
Overview
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"
Instance Method Summary collapse
-
#~ ⇒ Object
Create a new BooleanExpression with NOT, representing the inversion of whatever self represents.
Instance Method Details
#~ ⇒ Object
Create a new BooleanExpression with NOT, representing the inversion of whatever self represents.
~:a # NOT :a
267 268 269 |
# File 'lib/sequel/sql.rb', line 267 def ~ BooleanExpression.invert(self) end |