run_query: Run an SQL query and return the results as a data.frame

Description Usage Arguments Value See Also

View source: R/run_query.R

Description

Run an SQL query and return the results as a data.frame

Usage

1
run_query(query, conn = last_connection())

Arguments

query

character. The SQL query to run. This can also be left blank to obtain the latest database connection.

conn

PqConnection. The database connection to use. By default this is the last connection opened with this package, or if non-existent, a new connection using getOption('database.yml').

Value

a data.frame with the results of the query. If the query parameter was blank, the last database connection will be returned. (If no database connection was used, note this may spin up a new one dependending on your configuration. See last_connection.)

See Also

postgresql_connection


robertzk/berdie documentation built on May 27, 2019, 10:34 a.m.