create_sql_connection: Create and store a new SQL connection non-interactively

View source: R/create_sql_connection.R

create_sql_connectionR Documentation

Create and store a new SQL connection non-interactively

Description

This function allows for the non-interactive definition of an SQL connection. It'll likely be more common to define connections interactively via start_sql_connection.

Usage

create_sql_connection(alias, drv, ...)

Arguments

alias

string identifying the desired SQL connection.

drv

an object that inherits from DBIDriver, or an existing DBIConnection object (in order to clone an existing connection).

...

Arguments passed on to DBI::dbConnect

Details

A call to this function should be identical to the equivalent DBI::dbConnect() call, only with an additional alias argument.

Arguments are securely saved to the system's credential store. Type information is also saved, ensuring that the resulting call is identical to the equivalent DBI::dbConnect() call.

All arguments must be named and must include argument drv. drv's value must be fully namespaced (i.e. odbc::odbc(), not odbc()).

Value

NULL, invisibly.

See Also

Other connection management functions: delete_sql_connection(), start_sql_connection()


pnacht/simplysql documentation built on Sept. 5, 2024, 8:46 p.m.