db_execute: Execute a database statement

View source: R/queries.R

db_executeR Documentation

Execute a database statement

Description

Executes a SQL statement on a database without returning results. The connection is created, used, and automatically closed.

Usage

db_execute(query, connection_name, ...)

Arguments

query

SQL statement to execute

connection_name

Name of the connection in config.yml

...

Additional arguments passed to DBI::dbExecute

Value

Number of rows affected

Examples


if (FALSE) {
rows <- db_execute("DELETE FROM cache WHERE expired = TRUE", "my_db")
}



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