Khepri advanced API for transactional queries and updates.
This module exposes variants of the functions inkhepri_tx which
return more detailed return values for advanced use cases. See khepri_adv for examples of use cases where this module could be useful.
| get/1 | Returns the payload of the tree node pointed to by the given path pattern. |
| get/2 | Returns the payload of the tree node pointed to by the given path pattern. |
| get_many/1 | Returns payloads of all the tree nodes matching the given path pattern. |
| get_many/2 | Returns payloads of all the tree nodes matching the given path pattern. |
| do_get_many/4 | |
| put/2 | Runs the stored procedure pointed to by the given path and returns the result. |
| put/3 | Runs the stored procedure pointed to by the given path and returns the result. |
| put_many/2 | Sets the payload of all the tree nodes matching the given path pattern. |
| put_many/3 | Sets the payload of all the tree nodes matching the given path pattern. |
| create/2 | Creates a tree node with the given payload. |
| create/3 | Creates a tree node with the given payload. |
| update/2 | Updates an existing tree node with the given payload. |
| update/3 | Updates an existing tree node with the given payload. |
| compare_and_swap/3 | Updates an existing tree node with the given payload only if its data matches the given pattern. |
| compare_and_swap/4 | Updates an existing tree node with the given payload only if its data matches the given pattern. |
| delete/1 | Deletes the tree node pointed to by the given path pattern. |
| delete/2 | Deletes the tree node pointed to by the given path pattern. |
| delete_many/1 | Deletes all tree nodes matching the given path pattern. |
| delete_many/2 | Deletes all tree nodes matching the given path pattern. |
| clear_payload/1 | Deletes the payload of the tree node pointed to by the given path pattern. |
| clear_payload/2 | Deletes the payload of the tree node pointed to by the given path pattern. |
| clear_many_payloads/1 | Deletes the payload of all tree nodes matching the given path pattern. |
| clear_many_payloads/2 | Deletes the payload of all tree nodes matching the given path pattern. |
| ensure_instruction_is_permitted/1 | |
| should_process_function/4 | |
| is_standalone_fun_still_needed/2 |
get(PathPattern) -> Ret
PathPattern = khepri_path:pattern()Ret = khepri_adv:single_result()Returns the payload of the tree node pointed to by the given path pattern.
This is the same askhepri_adv:get/2 but inside the context of a
transaction function.
See also: khepri_adv:get/2.
get(PathPattern, Options) -> Ret
PathPattern = khepri_path:pattern()Options = khepri:tree_options()Ret = khepri_adv:single_result()Returns the payload of the tree node pointed to by the given path pattern.
This is the same askhepri_adv:get/3 but inside the context of a
transaction function.
See also: khepri_adv:get/3.
get_many(PathPattern) -> Ret
PathPattern = khepri_path:pattern()Ret = khepri_adv:many_results()Returns payloads of all the tree nodes matching the given path pattern.
This is the same askhepri_adv:get_many/2 but inside the context of
a transaction function.
See also: khepri_adv:get_many/2.
get_many(PathPattern, Options) -> Ret
PathPattern = khepri_path:pattern()Options = khepri:tree_options()Ret = khepri_adv:many_results()Returns payloads of all the tree nodes matching the given path pattern.
This is the same askhepri_adv:get_many/3 but inside the context of
a transaction function.
See also: khepri_adv:get_many/3.
do_get_many(PathPattern, Fun, Acc, Options) -> any()
put(PathPattern, Data) -> Ret
PathPattern = khepri_path:pattern()Data = khepri_payload:payload() | khepri:data() | function()Ret = khepri_adv:single_result()Runs the stored procedure pointed to by the given path and returns the result.
This is the same askhepri_adv:put/3 but inside the context of a
transaction function.
See also: khepri_adv:put/3.
put(PathPattern, Data, Options) -> Ret
PathPattern = khepri_path:pattern()Data = khepri_payload:payload() | khepri:data() | function()Options = khepri:tree_options() | khepri:put_options()Ret = khepri_adv:single_result()Runs the stored procedure pointed to by the given path and returns the result.
This is the same askhepri_adv:put/4 but inside the context of a
transaction function.
See also: khepri_adv:put/4.
put_many(PathPattern, Data) -> Ret
PathPattern = khepri_path:pattern()Data = khepri_payload:payload() | khepri:data() | function()Ret = khepri_adv:many_results()Sets the payload of all the tree nodes matching the given path pattern.
This is the same askhepri_adv:put_many/3 but inside the context of
a transaction function.
See also: khepri_adv:put_many/3.
put_many(PathPattern, Data, Options) -> Ret
PathPattern = khepri_path:pattern()Data = khepri_payload:payload() | khepri:data() | function()Options = khepri:tree_options() | khepri:put_options()Ret = khepri_adv:many_results()Sets the payload of all the tree nodes matching the given path pattern.
This is the same askhepri_adv:put_many/4 but inside the context of
a transaction function.
See also: khepri_adv:put_many/4.
create(PathPattern, Data) -> Ret
PathPattern = khepri_path:pattern()Data = khepri_payload:payload() | khepri:data() | function()Ret = khepri_adv:single_result()Creates a tree node with the given payload.
This is the same askhepri_adv:create/3 but inside the context of a
transaction function.
See also: khepri_adv:create/3.
create(PathPattern, Data, Options) -> Ret
PathPattern = khepri_path:pattern()Data = khepri_payload:payload() | khepri:data() | function()Options = khepri:tree_options() | khepri:put_options()Ret = khepri_adv:single_result()Creates a tree node with the given payload.
This is the same askhepri_adv:create/4 but inside the context of a
transaction function.
See also: khepri_adv:create/4.
update(PathPattern, Data) -> Ret
PathPattern = khepri_path:pattern()Data = khepri_payload:payload() | khepri:data() | function()Ret = khepri_adv:single_result()Updates an existing tree node with the given payload.
This is the same askhepri_adv:update/3 but inside the context of a
transaction function.
See also: khepri_adv:update/3.
update(PathPattern, Data, Options) -> Ret
PathPattern = khepri_path:pattern()Data = khepri_payload:payload() | khepri:data() | function()Options = khepri:tree_options() | khepri:put_options()Ret = khepri_adv:single_result()Updates an existing tree node with the given payload.
This is the same askhepri_adv:update/4 but inside the context of a
transaction function.
See also: khepri_adv:update/4.
compare_and_swap(PathPattern, DataPattern, Data) -> Ret
PathPattern = khepri_path:pattern()DataPattern = ets:match_pattern()Data = khepri_payload:payload() | khepri:data() | function()Ret = khepri_adv:single_result()Updates an existing tree node with the given payload only if its data matches the given pattern.
This is the same askhepri_adv:compare_and_swap/4 but inside the
context of a transaction function.
See also: khepri_adv:compare_and_swap/4.
compare_and_swap(PathPattern, DataPattern, Data, Options) -> Ret
PathPattern = khepri_path:pattern()DataPattern = ets:match_pattern()Data = khepri_payload:payload() | khepri:data() | function()Options = khepri:tree_options() | khepri:put_options()Ret = khepri_adv:single_result()Updates an existing tree node with the given payload only if its data matches the given pattern.
This is the same askhepri_adv:compare_and_swap/5 but inside the
context of a transaction function.
See also: khepri_adv:compare_and_swap/5.
delete(PathPattern) -> Ret
PathPattern = khepri_path:pattern()Ret = khepri_adv:single_result()Deletes the tree node pointed to by the given path pattern.
This is the same askhepri_adv:delete/2 but inside the context of a
transaction function.
See also: khepri_adv:delete/2.
delete(PathPattern, Options) -> Ret
PathPattern = khepri_path:pattern()Options = khepri:tree_options()Ret = khepri_adv:single_result()Deletes the tree node pointed to by the given path pattern.
This is the same askhepri_adv:delete/3 but inside the context of a
transaction function.
See also: khepri_adv:delete/3.
delete_many(PathPattern) -> Ret
PathPattern = khepri_path:pattern()Ret = khepri_adv:many_results()Deletes all tree nodes matching the given path pattern.
This is the same askhepri_adv:delete_many/2 but inside the context
of a transaction function.
See also: khepri_adv:delete_many/2.
delete_many(PathPattern, Options) -> Ret
PathPattern = khepri_path:pattern()Options = khepri:tree_options()Ret = khepri_adv:many_results()Deletes all tree nodes matching the given path pattern.
This is the same askhepri_adv:delete_many/3 but inside the context
of a transaction function.
See also: khepri_adv:delete_many/3.
clear_payload(PathPattern) -> Ret
PathPattern = khepri_path:pattern()Ret = khepri_adv:single_result()Deletes the payload of the tree node pointed to by the given path pattern.
This is the same askhepri_adv:clear_payload/2 but inside the
context of a transaction function.
See also: khepri_adv:clear_payload/2.
clear_payload(PathPattern, Options) -> Ret
PathPattern = khepri_path:pattern()Options = khepri:tree_options() | khepri:put_options()Ret = khepri_adv:single_result()Deletes the payload of the tree node pointed to by the given path pattern.
This is the same askhepri_adv:clear_payload/3 but inside the
context of a transaction function.
See also: khepri_adv:clear_payload/3.
clear_many_payloads(PathPattern) -> Ret
PathPattern = khepri_path:pattern()Ret = khepri_adv:many_results()Deletes the payload of all tree nodes matching the given path pattern.
This is the same askhepri_adv:clear_many_payloads/2 but inside the
context of a transaction function.
See also: khepri_adv:clear_many_payloads/2.
clear_many_payloads(PathPattern, Options) -> Ret
PathPattern = khepri_path:pattern()Options = khepri:tree_options() | khepri:put_options()Ret = khepri_adv:many_results()Deletes the payload of all tree nodes matching the given path pattern.
This is the same askhepri_adv:clear_many_payloads/3 but inside the
context of a transaction function.
See also: khepri_adv:clear_many_payloads/3.
ensure_instruction_is_permitted(Unknown) -> any()
should_process_function(Module, Name, Arity, FromModule) -> any()
is_standalone_fun_still_needed(X1, X2) -> any()
Generated by EDoc