File: dbCreateTable_DBIConnection.R

package info (click to toggle)
dbi 1.2.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,004 kB
  • sloc: makefile: 2
file content (20 lines) | stat: -rw-r--r-- 552 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#' @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)