ExprCommOp: This class represents an SQL logical operator.

ExprCommOpR Documentation

This class represents an SQL logical operator.

Description

This class represents an SQL logical operator.

This class represents an SQL logical operator.

Details

Used to generate SQL expressions involving a commutative binary operator like in "a + 10 + b".

Super classes

sqlq::Statement -> sqlq::Expr -> sqlq::ExprComp -> ExprCommOp

Methods

Public methods

Inherited methods

Method new()

Initializer.

Usage
ExprCommOp$new(op, expr = NULL)
Arguments
op

The logical operator, as a string.

expr

A list of logical expressions.

Returns

Nothing.


Method add()

Add an SQL expression to the logical operator.

Usage
ExprCommOp$add(expr)
Arguments
expr

A Expr instance.

Returns

Nothing.


Method nb_expr()

Returns the number of expressions.

Usage
ExprCommOp$nb_expr()
Returns

The number of expressions in this logical operator.


Method getTokens()

Generates the list of tokens representing this statement.

Usage
ExprCommOp$getTokens()
Returns

A list of Token objects.


Method clone()

The objects of this class are cloneable with this method.

Usage
ExprCommOp$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Examples

# To generate "a + 10 + b":
ExprCommOp$new("+", list(ExprField$new("a"), ExprValue$new(10),
                         ExprField$new("b")))


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