odbcConnectionTables: odbcConnectionTables

odbcConnectionTablesR Documentation

odbcConnectionTables

Description

This function returns a listing of tables accessible to the connected user. The expectation is that this is a relatively thin wrapper around the ODBC SQLTables function call, albeit returning a subset of the fields.

Usage

odbcConnectionTables(conn, name, ...)

## S4 method for signature 'OdbcConnection,Id'
odbcConnectionTables(conn, name, table_type = NULL)

## S4 method for signature 'OdbcConnection,character'
odbcConnectionTables(
  conn,
  name,
  catalog_name = NULL,
  schema_name = NULL,
  table_type = NULL
)

## S4 method for signature 'OdbcConnection,ANY'
odbcConnectionTables(
  conn,
  name = NULL,
  catalog_name = NULL,
  schema_name = NULL,
  table_type = NULL
)

## S4 method for signature 'OdbcConnection,SQL'
odbcConnectionTables(conn, name, table_type = NULL)

## S4 method for signature 'Oracle,character'
odbcConnectionTables(
  conn,
  name,
  catalog_name = NULL,
  schema_name = NULL,
  table_type = NULL
)

Arguments

conn

OdbcConnection

name

table we wish to search for

...

additional parameters to methods

table_type

List tables of this type, for example 'VIEW'. See odbcConnectionTableTypes for a listing of available table types for your connection.

catalog_name

character catalog where we wish to query for available tables

schema_name

character schema where we wish to query for available tables.

Details

It is important to note that, similar to the ODBC/API call, this method also accomodates pattern-value arguments for the catalog, schema, and table name arguments.

If extending this method, be aware that package:odbc internally uses this method to satisfy both DBI::dbListTables and DBI::dbExistsTable methods. ( The former also advertises pattern value arguments )

Query, rather than use SQLTables ODBC API for performance reasons on Oracle. Main functional difference between the implementation of SQLTables ( OEM driver ) and the query below is that the OEM implementation also looks through the synonyms. Given the performance reports, we sacrifice the synonym look-through for better execution time.

Value

data.frame with columns

  • table_catalog

  • table_schema

  • table_name

  • table_remarks

See Also

The ODBC documentation on SQLTables for further details.


odbc documentation built on July 9, 2023, 7:04 p.m.