| duckdb_connection-class | R Documentation |
Implements DBIConnection.
## S4 method for signature 'duckdb_connection'
dbAppendTable(conn, name, value, ..., row.names = NULL)
## S4 method for signature 'duckdb_connection'
dbBegin(conn, ...)
## S4 method for signature 'duckdb_connection'
dbCommit(conn, ...)
## S4 method for signature 'duckdb_connection'
dbDataType(dbObj, obj, ...)
## S4 method for signature 'duckdb_connection,ANY'
dbExistsTable(conn, name, ...)
## S4 method for signature 'duckdb_connection'
dbGetInfo(dbObj, ...)
## S4 method for signature 'duckdb_connection'
dbIsValid(dbObj, ...)
## S4 method for signature 'duckdb_connection,Id'
dbListFields(conn, name, ...)
## S4 method for signature 'duckdb_connection,character'
dbListFields(conn, name, ...)
## S4 method for signature 'duckdb_connection'
dbListTables(conn, ...)
## S4 method for signature 'duckdb_connection,ANY'
dbQuoteIdentifier(conn, x, ...)
## S4 method for signature 'duckdb_connection'
dbQuoteLiteral(conn, x, ...)
## S4 method for signature 'duckdb_connection,character'
dbRemoveTable(conn, name, ..., fail_if_missing = TRUE)
## S4 method for signature 'duckdb_connection'
dbRollback(conn, ...)
## S4 method for signature 'duckdb_connection,character'
dbSendQueryArrow(conn, statement, params = NULL, ...)
## S4 method for signature 'duckdb_connection,character'
dbSendQuery(conn, statement, params = NULL, ..., arrow = FALSE)
## S4 method for signature 'duckdb_connection,character,data.frame'
dbWriteTable(
conn,
name,
value,
...,
row.names = FALSE,
overwrite = FALSE,
append = FALSE,
field.types = NULL,
temporary = FALSE
)
## S4 method for signature 'duckdb_connection'
show(object)
conn |
A duckdb_connection object as returned by |
name |
The table name, passed on to
|
value |
A data.frame (or coercible to data.frame). |
... |
Other parameters passed on to methods. |
row.names |
Whether the row.names of the data.frame should be preserved |
dbObj |
An object inheriting from class duckdb_connection. |
obj |
An R object whose SQL type we want to determine. |
statement |
a character string containing SQL. |
params |
For |
arrow |
Whether the query should be returned as an Arrow Table |
overwrite |
If a table with the given name already exists, should it be overwritten? |
append |
If a table with the given name already exists, just try to append the passed data to it |
field.types |
Override the auto-generated SQL types |
temporary |
Should the created table be temporary? |
object |
Any R object |
conn_refexternal pointer to the underlying DuckDB connection.
driverthe duckdb_driver this connection was opened from.
debugwhether debug information (such as queries) is printed.
convert_optsinternal options controlling how result values are converted to R.
reserved_wordscharacter vector of the engine's reserved SQL keywords, used to quote identifiers.
timezone_out time zone results are returned in;
superseded by
convert_opts, from which it is copied at construction, and no longer read internally.
tz_out_convert how timestamps are converted to
timezone_out ("with" or "force");
superseded by convert_opts.
bigint how 64-bit integers are returned; superseded by
convert_opts.
A statement can hold several SQL statements separated by semicolons,
in dbSendQuery(), dbSendQueryArrow(),
and the helpers built on them, such as dbExecute() and dbGetQuery().
They run in order, and each is prepared only after those before it have run,
so it sees their effects:
a PRAGMA that generates SQL, such as create_fts_index,
finds a table created earlier in the same string.
Every statement but the last runs when the query is sent,
params bind to the last statement only,
and only the last statement's result is returned.
The whole string is parsed before anything runs,
so a syntax error in any statement means that none of them run.
Any other error stops at the statement that raised it,
and the statements before it keep their effect,
because the string does not run in a transaction of its own.
For all or nothing, run the call inside dbWithTransaction(),
or call dbBegin() before it and dbRollback() if it fails.
To know which statements have run when one fails,
send one statement per call.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.