dbxUpdate {dbx} | R Documentation |
Update records
Description
Update records
Usage
dbxUpdate(
conn,
table,
records,
where_cols,
batch_size = NULL,
transaction = TRUE
)
Arguments
conn |
A DBIConnection object |
table |
The table name to update |
records |
A data frame of records to insert |
where_cols |
The columns to use for WHERE clause |
batch_size |
The number of records to update in a single transaction (defaults to all) |
transaction |
Wrap the update in a transaction (defaults to true) |
Examples
db <- dbxConnect(adapter="sqlite", dbname=":memory:")
table <- "forecasts"
DBI::dbCreateTable(db, table, data.frame(id=1:3, temperature=20:22))
records <- data.frame(id=c(1, 2), temperature=c(16, 13))
dbxUpdate(db, table, records, where_cols=c("id"))
[Package dbx version 0.3.2 Index]