Open uladkasach opened 2 years ago
this should also support saying lockOn: null
this will enable this one simple "upsert" command to be used in high concurrency operations to allow the user to atomically/safely fulfill the use case of:
by letting the user specify to the command their expectation that the row does not exist:
upsert
command they are already used toopt-into
having errors thrown by this function under certain circumstances
insert
command, for example, where you would be less inclined to consider the effect of parallelism - with the lockOn
syntax, you realize that you're asking for an error to be thrown in this specific situation
upserts should support optimisitc locking for concurrency control
for example, the contract could look like
refs: