SQL_HELPER_FUNCTIONS | R Documentation |
Helper functions for common SQL Statements
select_star(schema_tbl)
drop_if_exists(schema_tbl)
add_verbose(schema_tbl)
create_index(schema_tbl, index_cols)
schema_tbl |
character Schema.table name. |
index_cols |
character expects a vector of column names...c('col1','col2','col3') |
The table name needs to include the schema in the Postgres server. The list of primary keys can simply be "var1,var2,var3" because this will be inserted into an SQL statement that will be sent to the server.
These functions return common SQL statements that can be combined to to build a complete pipeline of commands such as drop, create, create index.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.