StmtLimit: LIMIT statement.

StmtLimitR Documentation

LIMIT statement.

Description

LIMIT statement.

LIMIT statement.

Details

This class represents a SQL LIMIT statement. It requires a single integer limit value.

Super class

sqlq::Statement -> StmtLimit

Methods

Public methods

Inherited methods

Method new()

Initializer

Usage
StmtLimit$new(limit)
Arguments
limit

The integer limit.

Returns

Nothing.


Method getTokens()

Generates the list of tokens representing this statement.

Usage
StmtLimit$getTokens()
Returns

A list of Token objects.


Method clone()

The objects of this class are cloneable with this method.

Usage
StmtLimit$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Examples

# Create a LIMIT statement with a limit of 10:
limit <- StmtLimit$new(10L)

# Use the created LIMIT statement inside a SELECT query:
query <- QuerySelect$new(StmtSelectAll$new(),
                         from = StmtFrom$new("books"))
query$add(limit)


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