R/dbBegin_SQLiteConnection.R

Defines functions dbBegin_SQLiteConnection

Documented in dbBegin_SQLiteConnection

#' @rdname sqlite-transaction
#' @usage NULL
dbBegin_SQLiteConnection <- function(conn, .name = NULL, ..., name = NULL) {
  name <- compat_name(name, .name)
  if (is.null(name)) {
    dbExecute(conn, "BEGIN")
  } else {
    dbExecute(conn, paste0("SAVEPOINT ", dbQuoteIdentifier(conn, name)))
  }
  invisible(TRUE)
}
#' @rdname sqlite-transaction
#' @export
setMethod("dbBegin", "SQLiteConnection", dbBegin_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.