| dbExistsTable,TrinoConnection,character-method | R Documentation |
Asks information_schema for a count, so the answer costs the same whatever
the schema holds. Trino folds every identifier to lower case, so the name is
matched the same way: "SALES" exists if sales does, as
SELECT * FROM SALES would find it.
## S4 method for signature 'TrinoConnection,character'
dbExistsTable(conn, name, ...)
## S4 method for signature 'TrinoConnection,Id'
dbExistsTable(conn, name, ...)
## S4 method for signature 'TrinoConnection,ANY'
dbExistsTable(conn, name, ...)
conn |
A TrinoConnection object. |
name |
Table name, required. A string: |
... |
Unused, for compatibility with the generic. |
A logical scalar. A name in a catalog or schema that does not exist
is simply FALSE, not an error.
con <- DBI::dbConnect(RTrino::Trino(), host = Sys.getenv("RTRINO_TEST_URL"),
catalog = "tpch", schema = "tiny")
DBI::dbExistsTable(con, "nation")
DBI::dbExistsTable(con, "tpch.sf1.nation")
DBI::dbExistsTable(con, DBI::Id(catalog = "tpch", schema = "sf1",
table = "nation"))
DBI::dbExistsTable(con, "no_such_table")
DBI::dbDisconnect(con)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.