Writes the staged changes as TransactionOptions.root selects. The transaction cannot be used afterwards.
Stages rewriting the documents of the given objects (default: every object stored in a document of its own) without their history.
Optionalids: readonly string[]Stages removing an object from the space. The object leaves no tombstone.
The staged state of an object: what earlier calls in this transaction left, else what is stored. None for an object that is not stored or that this transaction deletes.
Reads the staged state of an object and stages the object transform returns in its place.
The returned object must keep the id. Does nothing for an object that is not stored.
Whether the object was found.
Structural changes to a database, staged and then committed atomically.
Staged changes are not visible to queries until Transaction.commit. Use it for changes that an ordinary write cannot express: changing an object's type in place, removing objects without a tombstone, or dropping document history. For schema changes that a write can express, prefer define. Run it with
db.runMigrationsthrough defineTransaction, or directly:Example