make_create_table | R Documentation |
Create a QueryCreate instance.
make_create_table(tabl, fields_def)
tabl |
Name of the new table |
fields_def |
An list of ExprFieldDef instances. |
An instance of QueryCreate.
# 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 <- make_create_table(tabl = 'books', fields_def = fields_def)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.