Learn R Programming

automerge (version 0.3.0)

am_rollback: Roll back pending operations

Description

Cancels all pending operations in the current transaction without committing them. This allows you to discard changes since the last commit.

Usage

am_rollback(doc)

Value

The document doc (invisibly)

Arguments

doc

An Automerge document

Examples

Run this code
doc <- am_create()

am_put(doc, AM_ROOT, "key", "value")
# Changed my mind, discard the put
am_rollback(doc)

am_close(doc)

Run the code above in your browser using DataLab