commit method
Add inserts
to the datastore and remove deletes
from it.
The order of inserts and deletes is not specified. When the commit is done direct lookups will see the effect but non-ancestor queries will see the change in an eventual consistent way.
The inserts are done as upserts unless the provided model does not have an id, in which case an autoId will be generated.
For transactions, please use beginTransaction
and it's returned
Transaction object.
Implementation
Future commit({List<Model>? inserts, List<Key>? deletes}) {
return _commitHelper(this, inserts: inserts, deletes: deletes);
}