R/dbListFields__duckdb_connection_character.R

Defines functions dbListFields__duckdb_connection_character

Documented in dbListFields__duckdb_connection_character

#' @rdname duckdb_connection-class
#' @inheritParams DBI::dbListFields
#' @usage NULL
dbListFields__duckdb_connection_character <- function(conn, name, ...) {
  names(dbGetQuery(
    conn,
    sqlInterpolate(
      conn,
      "SELECT * FROM ? WHERE FALSE",
      dbQuoteIdentifier(conn, name)
    )
  ))
}

#' @rdname duckdb_connection-class
#' @export
setMethod("dbListFields", c("duckdb_connection", "character"), dbListFields__duckdb_connection_character)

Try the duckdb package in your browser

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

duckdb documentation built on Oct. 30, 2024, 5:06 p.m.