Id-class {DBI} | R Documentation |
Objects of class Id
have a single slot name
, which is a named
character vector.
The dbQuoteIdentifier()
method converts Id
objects to strings.
Support for Id
objects depends on the database backend.
They can be used in the following methods as name
or table
argument:
Objects of this class are also returned from dbListObjects()
.
Id(...)
... |
Components of the hierarchy, e.g. |
# Identifies a table in a specific schema:
Id(schema = "dbo", table = "Customer")
# Identifies a table in a specific cluster, catalog, and schema:
Id(cluster = "mycluster", catalog = "mycatalog", schema = "myschema", table = "mytable")
# Create a SQL expression for an identifier:
dbQuoteIdentifier(ANSI(), Id(schema = "nycflights13", table = "flights"))
# Write a table in a specific schema:
## Not run:
dbWriteTable(con, Id(schema = "myschema", table = "mytable"), data.frame(a = 1))
## End(Not run)