R/DBI-complementar.R

Defines functions access_quoteDate

access_quoteDate <- function(conn, x, ...) {
  if (is(x, "SQL")) return(x)
  if (length(x) == 0L) return(SQL(character()))
  str <- paste0("#", x, "#")
  str[is.na(x)] <- "NULL"
  SQL(str)
}


#' @importFrom methods setMethod
NULL

#' @importMethodsFrom DBI dbQuoteLiteral
NULL

#' @export
setMethod("dbQuoteLiteral",
          c("ACCESS","POSIXt"),
          access_quoteDate)

#' @export
setMethod("dbQuoteLiteral",
          c("ACCESS","Date"),
          access_quoteDate)
faccinig/B2 documentation built on Dec. 31, 2021, 12:03 a.m.