Skip to contents

List a table's columns

Usage

# S4 method for class 'TrinoConnection,character'
dbListFields(conn, name, ...)

# S4 method for class 'TrinoConnection,Id'
dbListFields(conn, name, ...)

# S4 method for class 'TrinoConnection,ANY'
dbListFields(conn, name, ...)

Arguments

conn

A TrinoConnection object.

name

Table name, required, in any form dbExistsTable() accepts: a string with one to three dot-separated parts, a DBI::Id() or a quoted identifier from DBI::SQL(). An unqualified name is resolved against the connection's catalog and schema.

...

Unused, for compatibility with the generic.

Value

A character vector of column names.

Examples

if (FALSE) { # nzchar(Sys.getenv("RTRINO_TEST_URL"))
con <- DBI::dbConnect(RTrino::Trino(), host = Sys.getenv("RTRINO_TEST_URL"),
                      catalog = "tpch", schema = "tiny")
DBI::dbListFields(con, "nation")
DBI::dbListFields(con, DBI::Id(schema = "sf1", table = "region"))
DBI::dbDisconnect(con)
}