QueryCreate | R Documentation |
Create query.
Create query.
This class represents an SQL CREATE TABLE query. See the function make_create_table() to create more easily a QueryCreate object.
sqlq::Query
-> QueryCreate
new()
Initializer.
QueryCreate$new(create)
create
A StmtCreate instance.
Nothing.
clone()
The objects of this class are cloneable with this method.
QueryCreate$clone(deep = FALSE)
deep
Whether to make a deep clone.
make_create_table
# 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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.