Class AdbiConnection (and methods)
Source:R/AdbiConnection.R, R/dbAppendTable_AdbiConnection_character_data.frame.R, R/dbBegin_AdbiConnection.R, and 22 more
AdbiConnection-class.RdAdbiConnection objects are created by passing adbi() as first argument to
DBI::dbConnect().
They are a superclass of the DBI::DBIConnection class.
The "Usage" section lists the class methods overridden by adbi.
Usage
# S4 method for class 'AdbiConnection'
dbAppendTable(conn, name, value, ..., row.names = NULL)
# S4 method for class 'AdbiConnection'
dbBegin(conn, ...)
# S4 method for class 'AdbiConnection'
dbCommit(conn, ...)
# S4 method for class 'AdbiConnection'
dbDataType(dbObj, obj, ...)
# S4 method for class 'AdbiConnection,Id'
dbExistsTable(conn, name, ...)
# S4 method for class 'AdbiConnection,SQL'
dbExistsTable(conn, name, ...)
# S4 method for class 'AdbiConnection,character'
dbExistsTable(conn, name, ...)
# S4 method for class 'AdbiConnection'
dbGetInfo(dbObj, ...)
# S4 method for class 'AdbiConnection'
dbIsValid(dbObj, ...)
# S4 method for class 'AdbiConnection,Id'
dbListFields(conn, name, ...)
# S4 method for class 'AdbiConnection,SQL'
dbListFields(conn, name, ...)
# S4 method for class 'AdbiConnection,character'
dbListFields(conn, name, ...)
# S4 method for class 'AdbiConnection'
dbListTables(conn, ...)
# S4 method for class 'AdbiConnection,character'
dbQuoteIdentifier(conn, x, ...)
# S4 method for class 'AdbiConnection,SQL'
dbQuoteIdentifier(conn, x, ...)
# S4 method for class 'AdbiConnection,character'
dbQuoteLiteral(conn, x, ...)
# S4 method for class 'AdbiConnection,character'
dbQuoteString(conn, x, ...)
# S4 method for class 'AdbiConnection,SQL'
dbQuoteString(conn, x, ...)
# S4 method for class 'AdbiConnection,character'
dbRemoveTable(conn, name, ..., temporary = FALSE, fail_if_missing = TRUE)
# S4 method for class 'AdbiConnection,Id'
dbRemoveTable(conn, name, ..., temporary = FALSE, fail_if_missing = TRUE)
# S4 method for class 'AdbiConnection'
dbRollback(conn, ...)
# S4 method for class 'AdbiConnection'
dbUnquoteIdentifier(conn, x, ...)
# S4 method for class 'AdbiConnection,Id,data.frame'
dbWriteTable(
conn,
name,
value,
overwrite = FALSE,
append = FALSE,
...,
field.types = NULL,
row.names = NULL,
temporary = FALSE
)
# S4 method for class 'AdbiConnection,SQL,data.frame'
dbWriteTable(conn, name, value, ...)
# S4 method for class 'AdbiConnection,character,data.frame'
dbWriteTable(conn, name, value, ...)
# S4 method for class 'AdbiConnection'
show(object)Arguments
- conn
A DBI::DBIConnection object, as returned by
DBI::dbConnect().- 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"')
- value
A data.frame (or coercible to data.frame).
- ...
Other parameters passed on to methods.
- row.names
A logical specifying whether the
row.namesshould be output to the output DBMS table; ifTRUE, an extra field whose name will be whatever the R identifier"row.names"maps to the DBMS (seeDBI::make.db.names()). IfNAwill add rows names if they are characters, otherwise will ignore.- dbObj
A object inheriting from DBI::DBIDriver or DBI::DBIConnection
- obj
An R object whose SQL type we want to determine.
- x
A character vector, DBI::SQL or DBI::Id object to quote as identifier.
- temporary
a logical specifying whether the new table should be temporary. Its default is
FALSE. IfTRUE,DBI::dbRemoveTable()considers only temporary tables. For SQLite, PostgreSQL and DuckDB, it qualifies the name with the schema of temporary tables, and for other databases it sendsDROP TEMPORARY TABLE, which not all of them support.- fail_if_missing
If
FALSE,DBI::dbRemoveTable()succeeds if the table doesn't exist.- overwrite
Allow overwriting the destination table. Cannot be
TRUEifappendis alsoTRUE.- append
Allow appending to the destination table. Cannot be
TRUEifoverwriteis alsoTRUE.- field.types
character vector of named SQL field types where the names are the names of new table's columns. If missing, types inferred with
DBI::dbDataType()).- object
Any R object
Value
The DBI methods return what their generics specify, as documented on the
generic's help page, for example DBI::dbListTables().
The show() method is called for its side effect of printing a summary.
See also
The corresponding generic functions
DBI::dbSendQuery(), DBI::dbGetQuery(),
DBI::dbSendStatement(), DBI::dbExecute(),
DBI::dbExistsTable(), DBI::dbListTables(), DBI::dbListFields(),
DBI::dbRemoveTable(), and DBI::sqlData().