SQL_HELPER_FUNCTIONS: Helper functions for common SQL Statements

SQL_HELPER_FUNCTIONSR Documentation

Helper functions for common SQL Statements

Description

Helper functions for common SQL Statements

Usage

select_star(schema_tbl)

drop_if_exists(schema_tbl)

add_verbose(schema_tbl)

create_index(schema_tbl, index_cols)

Arguments

schema_tbl

character Schema.table name.

index_cols

character expects a vector of column names...c('col1','col2','col3')

Details

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.

Value

These functions return common SQL statements that can be combined to to build a complete pipeline of commands such as drop, create, create index.


Fredo-XVII/RToolShed documentation built on March 17, 2024, 12:15 p.m.