commit: commit

Description Usage Arguments Value See Also Examples

View source: R/main.R

Description

Commit a single entity to the datastore. Specify a kind and optionally a name (setting name = NULL will result in an id being assigned as a substitute for name). Additional arguments are treated as properties of the entity. mutation_type can be set to one of the following:

Usage

1
2
commit(kind, name = NULL, ..., mutation_type = "upsert",
  keep_existing = TRUE)

Arguments

kind

The entity kind

name

The name of the entity. If NULL, id is autogenerated.

...

Additional arguments to store as properties.

mutation_type

The type of mutation. One of insert, update, upsert, or delete. Default is upsert.

keep_existing

Preserve/edit existing data. The entity will be retrieved and specified properties replaced or new properties added. Existing properties will be retained. Default is TRUE.

Value

list of content and the transaction id

See Also

https://cloud.google.com/datastore/docs/concepts/entities - Entities, Properties, and Keys

Examples

1
commit("test", "entity_name", int_column = as.integer(1), str_column = "awesome!", float_column = 3.14)

cloudyr/rdatastore documentation built on May 13, 2019, 8:22 p.m.