fix(ds): make conditionals less confusing
This commit is contained in:
parent
14022aded1
commit
0c05b3f019
|
@ -113,14 +113,15 @@
|
||||||
| {delete, message(_)}.
|
| {delete, message(_)}.
|
||||||
|
|
||||||
%% Precondition.
|
%% Precondition.
|
||||||
%% Fails whole batch if the message in question does not match (`while'), or
|
%% Fails whole batch if the storage already has the matching message (`if_exists'),
|
||||||
%% does match (`unless'). Here "match" means that it either just exists (when
|
%% or does not yet have (`unless_exists'). Here "matching" means that it either
|
||||||
%% pattern is '_') or has exactly the same payload, rest of the message fields are
|
%% just exists (when pattern is '_') or has exactly the same payload, rest of the
|
||||||
%% irrelevant. Useful to construct batches with "compare-and-set" semantics.
|
%% message fields are irrelevant.
|
||||||
|
%% Useful to construct batches with "compare-and-set" semantics.
|
||||||
%% Note: backends may not support this, but if they do only DBs with `atomic_batches'
|
%% Note: backends may not support this, but if they do only DBs with `atomic_batches'
|
||||||
%% enabled are expected to support preconditions in batches.
|
%% enabled are expected to support preconditions in batches.
|
||||||
-type precondition() ::
|
-type precondition() ::
|
||||||
{while | unless, message(iodata() | '_')}.
|
{if_exists | unless_exists, message(iodata() | '_')}.
|
||||||
|
|
||||||
-type rank_x() :: term().
|
-type rank_x() :: term().
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue