EVOLUTION-MANAGER
Edit File: dbListObjects.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: List remote objects</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for dbListObjects {DBI}"><tr><td>dbListObjects {DBI}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>List remote objects</h2> <h3>Description</h3> <p>Returns the names of remote objects accessible through this connection as a data frame. This should include temporary objects, but not all database backends (in particular <span class="pkg">RMariaDB</span> and <span class="pkg">RMySQL</span>) support this. Compared to <code><a href="dbListTables.html">dbListTables()</a></code>, this method also enumerates tables and views in schemas, and returns fully qualified identifiers to access these objects. This allows exploration of all database objects available to the current user, including those that can only be accessed by giving the full namespace. </p> <h3>Usage</h3> <pre> dbListObjects(conn, prefix = NULL, ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>conn</code></td> <td> <p>A <a href="DBIConnection-class.html">DBIConnection</a> object, as returned by <code><a href="dbConnect.html">dbConnect()</a></code>.</p> </td></tr> <tr valign="top"><td><code>prefix</code></td> <td> <p>A fully qualified path in the database's namespace, or <code>NULL</code>. This argument will be processed with <code><a href="dbUnquoteIdentifier.html">dbUnquoteIdentifier()</a></code>. If given the method will return all objects accessible through this prefix.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>Other parameters passed on to methods.</p> </td></tr> </table> <h3>Value</h3> <p><code>dbListObjects()</code> returns a data frame with columns <code>table</code> and <code>is_prefix</code> (in that order), optionally with other columns with a dot (<code>.</code>) prefix. The <code>table</code> column is of type list. Each object in this list is suitable for use as argument in <code><a href="dbQuoteIdentifier.html">dbQuoteIdentifier()</a></code>. The <code>is_prefix</code> column is a logical. This data frame contains one row for each object (schema, table and view) accessible from the prefix (if passed) or from the global namespace (if prefix is omitted). Tables added with <code><a href="dbWriteTable.html">dbWriteTable()</a></code> are part of the data frame, including temporary objects if supported by the database. As soon a table is removed from the database, it is also removed from the data frame of database objects. </p> <p>The returned names are suitable for quoting with <code>dbQuoteIdentifier()</code>. An error is raised when calling this method for a closed or invalid connection. </p> <h3>Specification</h3> <p>The <code>table</code> object can be quoted with <code><a href="dbQuoteIdentifier.html">dbQuoteIdentifier()</a></code>. The result of quoting can be passed to <code><a href="dbUnquoteIdentifier.html">dbUnquoteIdentifier()</a></code>. The unquoted results are equal to the original <code>table</code> object. (For backends it may be convenient to use the <a href="Id.html">Id</a> class, but this is not required.) </p> <p>The <code>prefix</code> column indicates if the <code>table</code> value refers to a table or a prefix. For a call with the default <code>prefix = NULL</code>, the <code>table</code> values that have <code>is_prefix == FALSE</code> correspond to the tables returned from <code><a href="dbListTables.html">dbListTables()</a></code>, </p> <p>Values in <code>table</code> column that have <code>is_prefix == TRUE</code> can be passed as the <code>prefix</code> argument to another call to <code>dbListObjects()</code>. For the data frame returned from a <code>dbListObject()</code> call with the <code>prefix</code> argument set, all <code>table</code> values where <code>is_prefix</code> is <code>FALSE</code> can be used in a call to <code><a href="dbExistsTable.html">dbExistsTable()</a></code> which returns <code>TRUE</code>. </p> <h3>See Also</h3> <p>Other DBIConnection generics: <code><a href="DBIConnection-class.html">DBIConnection-class</a></code>, <code><a href="dbAppendTable.html">dbAppendTable</a>()</code>, <code><a href="dbCreateTable.html">dbCreateTable</a>()</code>, <code><a href="dbDataType.html">dbDataType</a>()</code>, <code><a href="dbDisconnect.html">dbDisconnect</a>()</code>, <code><a href="dbExecute.html">dbExecute</a>()</code>, <code><a href="dbExistsTable.html">dbExistsTable</a>()</code>, <code><a href="dbGetException.html">dbGetException</a>()</code>, <code><a href="dbGetInfo.html">dbGetInfo</a>()</code>, <code><a href="dbGetQuery.html">dbGetQuery</a>()</code>, <code><a href="dbIsReadOnly.html">dbIsReadOnly</a>()</code>, <code><a href="dbIsValid.html">dbIsValid</a>()</code>, <code><a href="dbListFields.html">dbListFields</a>()</code>, <code><a href="dbListResults.html">dbListResults</a>()</code>, <code><a href="dbListTables.html">dbListTables</a>()</code>, <code><a href="dbReadTable.html">dbReadTable</a>()</code>, <code><a href="dbRemoveTable.html">dbRemoveTable</a>()</code>, <code><a href="dbSendQuery.html">dbSendQuery</a>()</code>, <code><a href="dbSendStatement.html">dbSendStatement</a>()</code>, <code><a href="dbWriteTable.html">dbWriteTable</a>()</code> </p> <h3>Examples</h3> <pre> con <- dbConnect(RSQLite::SQLite(), ":memory:") dbListObjects(con) dbWriteTable(con, "mtcars", mtcars) dbListObjects(con) dbDisconnect(con) </pre> <hr /><div style="text-align: center;">[Package <em>DBI</em> version 1.1.0 <a href="00Index.html">Index</a>]</div> </body></html>