EVOLUTION-MANAGER
Edit File: DBI-package.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: DBI: R Database Interface</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 DBI-package {DBI}"><tr><td>DBI-package {DBI}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>DBI: R Database Interface</h2> <h3>Description</h3> <p>DBI defines an interface for communication between R and relational database management systems. All classes in this package are virtual and need to be extended by the various R/DBMS implementations (so-called <em>DBI backends</em>). </p> <h3>Definition</h3> <p>A DBI backend is an R package which imports the <span class="pkg">DBI</span> and <span class="pkg">methods</span> packages. For better or worse, the names of many existing backends start with ‘R’, e.g., <span class="pkg">RSQLite</span>, <span class="pkg">RMySQL</span>, <span class="pkg">RSQLServer</span>; it is up to the backend author to adopt this convention or not. </p> <h3>DBI classes and methods</h3> <p>A backend defines three classes, which are subclasses of <a href="DBIDriver-class.html">DBIDriver</a>, <a href="DBIConnection-class.html">DBIConnection</a>, and <a href="DBIResult-class.html">DBIResult</a>. The backend provides implementation for all methods of these base classes that are defined but not implemented by DBI. All methods defined in <span class="pkg">DBI</span> are reexported (so that the package can be used without having to attach <span class="pkg">DBI</span>), and have an ellipsis <code>...</code> in their formals for extensibility. </p> <h3>Construction of the DBIDriver object</h3> <p>The backend must support creation of an instance of its <a href="DBIDriver-class.html">DBIDriver</a> subclass with a <dfn>constructor function</dfn>. By default, its name is the package name without the leading ‘R’ (if it exists), e.g., <code>SQLite</code> for the <span class="pkg">RSQLite</span> package. However, backend authors may choose a different name. The constructor must be exported, and it must be a function that is callable without arguments. DBI recommends to define a constructor with an empty argument list. </p> <h3>Author(s)</h3> <p><strong>Maintainer</strong>: Kirill Müller <a href="mailto:krlmlr+r@mailbox.org">krlmlr+r@mailbox.org</a> (<a href="https://orcid.org/0000-0002-1416-3412">ORCID</a>) </p> <p>Authors: </p> <ul> <li><p> R Special Interest Group on Databases (R-SIG-DB) </p> </li> <li><p> Hadley Wickham </p> </li></ul> <p>Other contributors: </p> <ul> <li><p> R Consortium [funder] </p> </li></ul> <h3>See Also</h3> <p>Important generics: <code><a href="dbConnect.html">dbConnect()</a></code>, <code><a href="dbGetQuery.html">dbGetQuery()</a></code>, <code><a href="dbReadTable.html">dbReadTable()</a></code>, <code><a href="dbWriteTable.html">dbWriteTable()</a></code>, <code><a href="dbDisconnect.html">dbDisconnect()</a></code> </p> <p>Formal specification (currently work in progress and incomplete): <code>vignette("spec", package = "DBI")</code> </p> <h3>Examples</h3> <pre> RSQLite::SQLite() </pre> <hr /><div style="text-align: center;">[Package <em>DBI</em> version 1.1.0 <a href="00Index.html">Index</a>]</div> </body></html>