R/dbSendPreparedQuery_SQLiteConnection_character_data.frame.R

Defines functions dbSendPreparedQuery_SQLiteConnection_character_data.frame

Documented in dbSendPreparedQuery_SQLiteConnection_character_data.frame

#' @rdname query-dep
#' @param bind.data A data frame of data to be bound.
#' @usage NULL
dbSendPreparedQuery_SQLiteConnection_character_data.frame <- function(conn, statement, bind.data, ...) {
  warning_once("RSQLite::dbSendPreparedQuery() is deprecated, please switch to DBI::dbSendQuery(params = bind.data).")

  res <- dbSendQuery(conn, statement)

  tryCatch(
    db_bind(res, unclass(bind.data), allow_named_superset = TRUE),
    error = function(e) {
      db_bind(res, unclass(unname(bind.data)), allow_named_superset = FALSE)
    }
  )
  res
}
#' @rdname query-dep
#' @export
setMethod("dbSendPreparedQuery", c("SQLiteConnection", "character", "data.frame"), dbSendPreparedQuery_SQLiteConnection_character_data.frame)

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.