R/dbCreateTable_DBIConnection.R

Defines functions dbCreateTable_DBIConnection

Documented in dbCreateTable_DBIConnection

#' @rdname hidden_aliases
#' @usage NULL
dbCreateTable_DBIConnection <- function(conn, name, fields, ..., row.names = NULL, temporary = FALSE) {
  stopifnot(is.null(row.names))
  stopifnot(is.logical(temporary), length(temporary) == 1L)

  query <- sqlCreateTable(
    con = conn,
    table = name,
    fields = fields,
    row.names = row.names,
    temporary = temporary,
    ...
  )
  dbExecute(conn, query)
  invisible(TRUE)
}
#' @rdname hidden_aliases
#' @export
setMethod("dbCreateTable", signature("DBIConnection"), dbCreateTable_DBIConnection)

Try the DBI package in your browser

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

DBI documentation built on June 18, 2022, 9:06 a.m.