Performs bulk insertion into a table using transactions. Rolls back if any errors occur.

bulk_insert_entry(con = NULL, tbl = NULL, data = NULL)

Arguments

con

DBI connection object.

tbl

Name of the target table.

data

A data.frame with rows to insert.

Value

None.

Examples

if (FALSE) { # \dontrun{
con <- DBI::dbConnect(RSQLite::SQLite(), ":memory:")
data <- data.frame(id = 1:3, name = c("A", "B", "C"), value = c(10, 20, 30))
bulk_insert_entry(con, "my_table", data)
} # }