Description Usage Arguments Details See Also Examples
The 'dbReplaceInTable()' method assumes that the table has been created beforehand, e.g. with [dbCreateTable()]. The default implementation calls [sqlReplaceInTableTemplate()] and then [dbExecute()] with the 'param' argument. Backends compliant to ANSI SQL 99 which use ‘?' as a placeholder for prepard queries don’t need to override it. Backends with a different SQL syntax which use '?' as a placeholder for prepared queries can override [sqlReplaceInTable()]. Other backends (with different placeholders or with entirely different ways to create tables) need to override the 'dbReplaceInTable()' method.
1 | dbReplaceInTable(conn, name, value, ..., row.names = NULL)
|
conn |
A DBIConnection object, as returned by
|
name |
Name of the table, escaped with [dbQuoteIdentifier()]. |
value |
A data frame of values. The column names must be consistent with those in the target table in the database. |
... |
Other arguments used by individual methods. |
row.names |
Must be 'NULL'. |
The 'row.names' argument is not supported by this method. Process the values with [sqlRownamesToColumn()] before calling this method.
Other DBIConnection generics: dbAddIndex
,
dbAddPrimaryKey
,
dbDeleteAllRecords
,
dbDropTable
, dbUpdateTable
1 2 3 4 5 | con <- dbConnect(RSQLite::SQLite(), ":memory:")
dbCreateTable(con, "iris", iris)
dbUpdateTable(con, "iris", iris)
dbReadTable(con, "iris")
dbDisconnect(con)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.