sqlHelpers (version 0.1.2)

Collection of 'SQL' Utilities for 'T-SQL' and 'Postgresql'

Description

Includes functions for interacting with common meta data fields, writing insert statements, calling functions, and more for 'T-SQL' and 'Postgresql'.

Copy Link

Version

Install

install.packages('sqlHelpers')

Monthly Downloads

226

Version

0.1.2

License

GPL (>= 3)

Maintainer

Last Published

October 14th, 2023

Functions in sqlHelpers (0.1.2)

fetch_function_parameters

Retrieve the input parameters of a function/procedure.
fetch_function_definition

Retrieve the definition of a function/procedure.
drop_table

Generate a DROP TABLE statement, optionally execute the statement if con is not NULL.
connect

Connect to a database using a connection string via DBI/odbc.
fetch_tables

Retrieve the tables in a schema
call_function

Call a SQL function/procedure.
create_table_from_data_frame

Generate a CREATE TABLE statement based on a data.frame, optionally execute the statement if con is not NULL.
fetch_columns

Retrieve the columns/types in a table.
insert_batch_chunker

Helper function for INSERT
fetch_function_output_parameters

Retrieve the output parameters of a function/procedure.
t_sql_bulk_insert

Generate a BULK INSERT statement, optionally execute the statement if con is not NULL.
sqlizeNames

Convert a column name into a SQL compatible name.
sqlizeTypes

Get the equivalent SQL data type for a given R object.
truncate_table

Generate a TRUNCATE TABLE statement, optionally execute the statement if con is not NULL.
t_sql_script_proc_definition

Fetch the object definition of a proc in Microsoft SQL Server.
update_values

Generate a UPDATE statement, optionally execute the statement if con is not NULL.
insert_values

Generate a INSERT statement, optionally execute the statement if con is not NULL.
quoteText2

Add single quotes to strings using stringi::stri_join, useful for converting R strings into SQL formatted strings.
t_sql_script_create_table

Generate a CREATE TABLE statement for an existing table in Microsoft SQL Server.