ExprUnaryOp: This class represents an SQL unary operator.

ExprUnaryOpR Documentation

This class represents an SQL unary operator.

Description

This class represents an SQL unary operator.

This class represents an SQL unary operator.

Details

Used to generate SQL expressions involving an unary operator like in "NOT flag".

Super classes

sqlq::Statement -> sqlq::Expr -> sqlq::ExprComp -> ExprUnaryOp

Methods

Public methods

Inherited methods

Method new()

Initializer.

Usage
ExprUnaryOp$new(op, expr, ...)
Arguments
op

The unary operator, as a string.

expr

An Expr instance.

...

Arguments to pass to parent class.

Returns

Nothing.


Method getTokens()

Generates the list of tokens representing this statement.

Usage
ExprUnaryOp$getTokens()
Returns

A list of Token objects.


Method clone()

The objects of this class are cloneable with this method.

Usage
ExprUnaryOp$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Examples

# To generate "NOT flag":
ExprUnaryOp$new("not", ExprField$new("flag"))


sqlq documentation built on Sept. 16, 2025, 9:10 a.m.