Description Usage Arguments Examples
Upsert records
1 2 3 4 5 6 7 8 9 |
conn |
A DBIConnection object |
table |
The table name to upsert |
records |
A data frame of records to upsert |
where_cols |
The columns to use for WHERE clause |
batch_size |
The number of records to upsert in a single statement (defaults to all) |
returning |
Columns to return |
skip_existing |
Skip existing rows |
1 2 3 4 5 6 7 8 9 10 | ## Not run:
db <- dbxConnect(adapter="postgres", dbname="dbx")
table <- "forecasts"
DBI::dbCreateTable(db, table, data.frame(id=1:3, temperature=20:22))
records <- data.frame(id=c(3, 4), temperature=c(20, 25))
dbxUpsert(db, table, records, where_cols=c("id"))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.