StmtCreate: CREATE TABLE statement.

StmtCreateR Documentation

CREATE TABLE statement.

Description

CREATE TABLE statement.

CREATE TABLE statement.

Super class

sqlq::Statement -> StmtCreate

Methods

Public methods

Inherited methods

Method new()

Initializer.

Usage
StmtCreate$new(tabl, fields_def)
Arguments
tabl

A table name.

fields_def

An instance of ExprListFields

Returns

Nothing.


Method getTokens()

Generates the list of tokens representing this statement.

Usage
StmtCreate$getTokens()
Returns

A list of Token objects.


Method clone()

The objects of this class are cloneable with this method.

Usage
StmtCreate$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Examples

# To generate a simple CREATE TABLE statement:
fields_def <- list(ExprFieldDef$new('id', 'integer', primary=TRUE),
                   ExprFieldDef$new('title', 'varchar(200)', nullable=FALSE),
                   ExprFieldDef$new('author', 'varchar(80)', nullable=FALSE))
StmtCreate$new(tabl = 'books', fields_def = fields_def)


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