R/sqlData_PqConnection.R

Defines functions sqlData_PqConnection

Documented in sqlData_PqConnection

#' @inheritParams DBI::sqlRownamesToColumn
#' @param ... Ignored.
#' @rdname postgres-tables
#' @usage NULL
sqlData_PqConnection <- function(con, value, row.names = FALSE, ...) {
  if (is.null(row.names)) row.names <- FALSE
  value <- sqlRownamesToColumn(value, row.names)

  value[] <- lapply(value, dbQuoteLiteral, conn = con)

  value
}

#' @rdname postgres-tables
#' @export
setMethod("sqlData", "PqConnection", sqlData_PqConnection)

Try the RPostgres package in your browser

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

RPostgres documentation built on Oct. 23, 2023, 1:06 a.m.