system-queries: Obtain structural data on the database

exists_sql_tableR Documentation

Obtain structural data on the database

Description

These functions simply wrap DBI functions to use the standard connection defined in start_sql_connection().

Usage

exists_sql_table(name, ...)

list_sql_tables(...)

list_sql_table_fields(name, ...)

list_sql_objects(prefix = NULL, ...)

Arguments

name

The table name, passed on to dbQuoteIdentifier(). Options are:

  • a character string with the unquoted DBMS table name, e.g. "table_name",

  • a call to Id() with components to the fully qualified table name, e.g. Id(schema = "my_schema", table = "table_name")

  • a call to SQL() with the quoted and fully qualified table name given verbatim, e.g. SQL('"my_schema"."table_name"')

...

Other parameters passed on to methods.

prefix

A fully qualified path in the database's namespace, or NULL. This argument will be processed with dbUnquoteIdentifier(). If given the method will return all objects accessible through this prefix.

Details

  • exists_sql_table() wraps DBI::dbExistsTable()

  • list_sql_tables() wraps DBI::dbListTables()

  • list_sql_table_fields() wraps DBI::dbListFields()

  • list_sql_objects() wraps DBI::dbListObjects()

See the DBI documentation for further information on each function.

name will be simply interpreted by sql_identifier(). If it is a character string containing a fully qualified name (i.e. my_schema.my_table), call sql_identifier() yourself and set parse = TRUE.


pnacht/simplysql documentation built on Sept. 5, 2024, 8:46 p.m.