Skip to contents

Update rows in a table

Usage

hb_update_rows(
  client,
  table,
  data,
  ...,
  row_id_col = "_id",
  chunk_size = 1000L
)

Arguments

client

A harbour_client.

table

Table name.

data

A tibble or data frame whose columns match the table schema.

...

These dots are for future extensions and must be empty.

row_id_col

Name of the column in data that holds row IDs. Default "_id".

chunk_size

Rows per request. SeaTable caps batch writes at 1000 and harbouR clamps it, warning if you asked for more.

Value

Invisibly, a one-row tibble with columns table (chr), n_rows (int) and n_requests (int).

Examples

if (FALSE) { # interactive()
client <- hb_client()
hb_update_rows(
  client, "Samples",
  tibble::tibble(`_id` = "abc", Name = "renamed")
)
}