db_query: Get data from a database query

View source: R/queries.R

db_queryR Documentation

Get data from a database query

Description

Gets data from a database using a query and connection name. The connection is created, used, and automatically closed.

Usage

db_query(query, connection_name, ...)

Arguments

query

SQL query to execute

connection_name

Name of the connection in config.yml

...

Additional arguments passed to DBI::dbGetQuery

Value

A data frame with the query results

Examples


if (FALSE) {
users <- db_query("SELECT * FROM users", "my_db")
}



framework documentation built on Feb. 18, 2026, 1:07 a.m.