QueryCreate: Create query.

QueryCreateR Documentation

Create query.

Description

Create query.

Create query.

Details

This class represents an SQL CREATE TABLE query. See the function make_create_table() to create more easily a QueryCreate object.

Super class

sqlq::Query -> QueryCreate

Methods

Public methods

Inherited methods

Method new()

Initializer.

Usage
QueryCreate$new(create)
Arguments
create

A StmtCreate instance.

Returns

Nothing.


Method clone()

The objects of this class are cloneable with this method.

Usage
QueryCreate$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

See Also

make_create_table

Examples

# To generate the CREATE query for creating a simple table for listing books:
fields_def <- list(ExprFieldDef$new('id', 'integer', primary=TRUE),
                   ExprFieldDef$new('title', 'varchar(200)', nullable=FALSE),
                   ExprFieldDef$new('author', 'varchar(80)', nullable=FALSE))
create <- QueryCreate$new(StmtCreate$new(tabl = 'books',
                                         fields_def = fields_def))


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