StmtCreate | R Documentation |
CREATE TABLE statement.
CREATE TABLE statement.
sqlq::Statement
-> StmtCreate
new()
Initializer.
StmtCreate$new(tabl, fields_def)
tabl
A table name.
fields_def
An instance of ExprListFields
Nothing.
getTokens()
Generates the list of tokens representing this statement.
StmtCreate$getTokens()
A list of Token objects.
clone()
The objects of this class are cloneable with this method.
StmtCreate$clone(deep = FALSE)
deep
Whether to make a deep clone.
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.