Convenience function for DBI::Id
Usage
id(db_table, ...)
# S3 method for class 'Id'
id(db_table, conn = NULL, ...)
# S3 method for class 'character'
id(db_table, conn = NULL, allow_table_only = TRUE, ...)
# S3 method for class 'data.frame'
id(db_table, ...)Arguments
- db_table
(
id-like object(1))
A table specification (coercible byid()).- ...
Further arguments passed to methods.
- conn
(
DBIConnection(1))
Connection object.- allow_table_only
(
logical(1))
IfTRUE, allows for returning anDBI::Idwithtable= "myschema.table" if schema "myschema" is not found inconn. IfFALSE, the function will raise an error if the implied schema cannot be found inconn.
Value
A DBI::Id object parsed from db_table (see details).
Details
The given db_table is parsed to a DBI::Id depending on the type of input:
character: db_table is parsed to a DBI::Id object using an assumption of "schema.table" syntax with corresponding schema (if found inconn) and table values. If no schema is implied, the default schema ofconnwill be used.DBI::Id: if schema is not specified inId, the schema is set to the default schema forconn(if given).tbl_sql: the remote name is used to resolve the table identification.data.frame: A Id is built from the data.frame (columnscatalog,schema, andtable). Can be used in conjunction withget_tables(conn, pattern).
See also
DBI::Id which this function wraps.
