Connecting and disconnecting

Connecting to and disconnecting from databases.

dbConnect()

Create a connection to a DBMS

dbDisconnect()

Disconnect (close) a connection

dbCanConnect()

Check if a connection to a DBMS can be established

dbGetInfo()

Get DBMS metadata

dbIsValid()

Is this DBMS object still valid?

dbIsReadOnly()

Is this DBMS object read only?

DBIConnector-class

DBIConnector class

dbGetConnectArgs()

Get connection arguments

Tables

Reading and writing entire tables.

dbReadTable() dbReadTableArrow()

Copy data frames from database tables

dbWriteTable() dbWriteTableArrow()

Copy data frames to database tables

dbCreateTable() dbCreateTableArrow()

Create a table in the database

dbAppendTable() dbAppendTableArrow()

Insert rows into a table

dbRemoveTable()

Remove a table from the database

dbListTables()

List remote tables

dbListFields()

List field names of a remote table

dbExistsTable()

Does a table exist?

dbListObjects()

List remote objects

sqlRownamesToColumn() sqlColumnToRownames()

Convert row names back and forth between columns

Queries and statements

Sending queries and executing statements.

dbGetQuery() dbGetQueryArrow()

Send query, retrieve results and then clear result set

dbExecute()

Execute an update statement, query number of rows affected, and then close result set

Results

More control for sending queries and executing statements.

dbSendQuery() dbSendQueryArrow()

Execute a query on a given database connection

dbSendStatement()

Execute a data manipulation statement on a given database connection

dbBind()

Bind values to a parameterized/prepared statement

dbFetch() dbFetchArrow() dbFetchArrowChunk() fetch()

Fetch records from a previously executed query

dbGetRowCount()

The number of rows fetched so far

dbGetRowsAffected()

The number of rows affected

dbGetStatement()

Get the statement associated with a result set

dbHasCompleted()

Completion status

dbColumnInfo()

Information about result types

dbClearResult()

Clear a result set

Transactions

Ensuring multiple statements are executed together, or not at all.

dbBegin() dbCommit() dbRollback()

Begin/commit/rollback SQL transactions

dbWithTransaction() dbBreak()

Self-contained SQL transactions

SQL

Tools for creating and parsing SQL queries.

SQL()

SQL quoting

dbDataType()

Determine the SQL data type of an object

dbQuoteIdentifier()

Quote identifiers

dbQuoteLiteral()

Quote literal values

dbQuoteString()

Quote literal strings

sqlCreateTable()

Compose query to create a simple table

sqlAppendTable() sqlAppendTableTemplate()

Compose query to insert rows into a table

sqlData()

Convert a data frame into form suitable for upload to an SQL database

dbUnquoteIdentifier()

Unquote identifiers

sqlInterpolate()

Safely interpolate values into an SQL string

Classes

S4 classes defined by DBI.

DBI DBI-package

DBI: R Database Interface

DBIObject-class

DBIObject class

DBIDriver-class

DBIDriver class

DBIConnection-class

DBIConnection class

DBIResult-class DBIResultArrow-class DBIResultArrowDefault-class

DBIResult class

DBIConnector-class

DBIConnector class

Id()

Refer to a table nested in a hierarchy (e.g. within a schema)