CodableDatastore
CodableDatastore copied to clipboard
Add options to persist method to prevent accidental updates or creations
For instance, only create if does not exist, or only update if does exist. These cases are more rare, but the default behavior should be obvious so folks don't accidentally assume one of those scenarios.
This can be trivial to check within a transaction — if persist returns an object, you know there was a previous value and can in turn fail the transaction.