create_sql_script | R Documentation |
Create a SQL script, optionally execute the statement if con is not NULL.
create_sql_script(..., path = NULL, con = NULL)
... |
A string, SQL command to be combined into one document or statement. |
path |
A string, the file path (include the file name) to save the script. |
con |
A database connection that can be passed to DBI::dbSendQuery/DBI::dbGetQuery. |
A string, SQL commands combined into one document or statement; or the results retrieved by DBI::dbSendQuery after executing the statement.
create_sql_script(
createSCHEMA("dev"),
sql_80_char_comment(),
createTABLE(name = "sample",
columns = list(col1 = "SERIAL NOT NULL", col2 = "INTEGER", col3 = "TEXT"),
constraints = list(sample_constraint = "UNIQUE(col3)")
))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.