R/dbCommit_SQLiteConnection.R

Defines functions dbCommit_SQLiteConnection

Documented in dbCommit_SQLiteConnection

#' @rdname sqlite-transaction
#' @usage NULL
dbCommit_SQLiteConnection <- function(conn, .name = NULL, ..., name = NULL) {
  name <- compat_name(name, .name)
  if (is.null(name)) {
    dbExecute(conn, "COMMIT")
  } else {
    dbExecute(conn, paste0("RELEASE SAVEPOINT ", dbQuoteIdentifier(conn, name)))
  }
  invisible(TRUE)
}
#' @rdname sqlite-transaction
#' @export
setMethod("dbCommit", "SQLiteConnection", dbCommit_SQLiteConnection)

Try the RSQLite package in your browser

Any scripts or data that you put into this service are public.

RSQLite documentation built on May 29, 2024, 3:30 a.m.