Module khepri_tx_adv

Khepri advanced API for transactional queries and updates.

Description

Khepri advanced API for transactional queries and updates.

This module exposes variants of the functions in khepri_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.

Function Index

get/1Returns the payload of the tree node pointed to by the given path pattern.
get/2Returns the payload of the tree node pointed to by the given path pattern.
get_many/1Returns payloads of all the tree nodes matching the given path pattern.
get_many/2Returns payloads of all the tree nodes matching the given path pattern.
do_get_many/4
put/2Sets the payload of the tree node pointed to by the given path pattern.
put/3Sets the payload of the tree node pointed to by the given path pattern.
put_many/2Sets the payload of all the tree nodes matching the given path pattern.
put_many/3Sets the payload of all the tree nodes matching the given path pattern.
create/2Creates a tree node with the given payload.
create/3Creates a tree node with the given payload.
update/2Updates an existing tree node with the given payload.
update/3Updates an existing tree node with the given payload.
compare_and_swap/3Updates an existing tree node with the given payload only if its data matches the given pattern.
compare_and_swap/4Updates an existing tree node with the given payload only if its data matches the given pattern.
delete/1Deletes the tree node pointed to by the given path pattern.
delete/2Deletes the tree node pointed to by the given path pattern.
delete_many/1Deletes all tree nodes matching the given path pattern.
delete_many/2Deletes all tree nodes matching the given path pattern.
clear_payload/1Deletes the payload of the tree node pointed to by the given path pattern.
clear_payload/2Deletes the payload of the tree node pointed to by the given path pattern.
clear_many_payloads/1Deletes the payload of all tree nodes matching the given path pattern.
clear_many_payloads/2Deletes 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

Function Details

get/1

get(PathPattern) -> Ret

Returns the payload of the tree node pointed to by the given path pattern.

This is the same as khepri_adv:get/2 but inside the context of a transaction function.

See also: khepri_adv:get/2.

get/2

get(PathPattern, Options) -> Ret

Returns the payload of the tree node pointed to by the given path pattern.

This is the same as khepri_adv:get/3 but inside the context of a transaction function.

See also: khepri_adv:get/3.

get_many/1

get_many(PathPattern) -> Ret

Returns payloads of all the tree nodes matching the given path pattern.

This is the same as khepri_adv:get_many/2 but inside the context of a transaction function.

See also: khepri_adv:get_many/2.

get_many/2

get_many(PathPattern, Options) -> Ret

Returns payloads of all the tree nodes matching the given path pattern.

This is the same as khepri_adv:get_many/3 but inside the context of a transaction function.

See also: khepri_adv:get_many/3.

do_get_many/4

do_get_many(PathPattern, Fun, Acc, Options) -> any()

put/2

put(PathPattern, Data) -> Ret

Sets the payload of the tree node pointed to by the given path pattern.

This is the same as khepri_adv:put/3 but inside the context of a transaction function.

See also: khepri_adv:put/3.

put/3

put(PathPattern, Data, Options) -> Ret

Sets the payload of the tree node pointed to by the given path pattern.

This is the same as khepri_adv:put/4 but inside the context of a transaction function.

See also: khepri_adv:put/4.

put_many/2

put_many(PathPattern, Data) -> Ret

Sets the payload of all the tree nodes matching the given path pattern.

This is the same as khepri_adv:put_many/3 but inside the context of a transaction function.

See also: khepri_adv:put_many/3.

put_many/3

put_many(PathPattern, Data, Options) -> Ret

Sets the payload of all the tree nodes matching the given path pattern.

This is the same as khepri_adv:put_many/4 but inside the context of a transaction function.

See also: khepri_adv:put_many/4.

create/2

create(PathPattern, Data) -> Ret

Creates a tree node with the given payload.

This is the same as khepri_adv:create/3 but inside the context of a transaction function.

See also: khepri_adv:create/3.

create/3

create(PathPattern, Data, Options) -> Ret

Creates a tree node with the given payload.

This is the same as khepri_adv:create/4 but inside the context of a transaction function.

See also: khepri_adv:create/4.

update/2

update(PathPattern, Data) -> Ret

Updates an existing tree node with the given payload.

This is the same as khepri_adv:update/3 but inside the context of a transaction function.

See also: khepri_adv:update/3.

update/3

update(PathPattern, Data, Options) -> Ret

Updates an existing tree node with the given payload.

This is the same as khepri_adv:update/4 but inside the context of a transaction function.

See also: khepri_adv:update/4.

compare_and_swap/3

compare_and_swap(PathPattern, DataPattern, Data) -> Ret

Updates an existing tree node with the given payload only if its data matches the given pattern.

This is the same as khepri_adv:compare_and_swap/4 but inside the context of a transaction function.

See also: khepri_adv:compare_and_swap/4.

compare_and_swap/4

compare_and_swap(PathPattern, DataPattern, Data, Options) -> Ret

Updates an existing tree node with the given payload only if its data matches the given pattern.

This is the same as khepri_adv:compare_and_swap/5 but inside the context of a transaction function.

See also: khepri_adv:compare_and_swap/5.

delete/1

delete(PathPattern) -> Ret

Deletes the tree node pointed to by the given path pattern.

This is the same as khepri_adv:delete/2 but inside the context of a transaction function.

See also: khepri_adv:delete/2.

delete/2

delete(PathPattern, Options) -> Ret

Deletes the tree node pointed to by the given path pattern.

This is the same as khepri_adv:delete/3 but inside the context of a transaction function.

See also: khepri_adv:delete/3.

delete_many/1

delete_many(PathPattern) -> Ret

Deletes all tree nodes matching the given path pattern.

This is the same as khepri_adv:delete_many/2 but inside the context of a transaction function.

See also: khepri_adv:delete_many/2.

delete_many/2

delete_many(PathPattern, Options) -> Ret

Deletes all tree nodes matching the given path pattern.

This is the same as khepri_adv:delete_many/3 but inside the context of a transaction function.

See also: khepri_adv:delete_many/3.

clear_payload/1

clear_payload(PathPattern) -> Ret

Deletes the payload of the tree node pointed to by the given path pattern.

This is the same as khepri_adv:clear_payload/2 but inside the context of a transaction function.

See also: khepri_adv:clear_payload/2.

clear_payload/2

clear_payload(PathPattern, Options) -> Ret

Deletes the payload of the tree node pointed to by the given path pattern.

This is the same as khepri_adv:clear_payload/3 but inside the context of a transaction function.

See also: khepri_adv:clear_payload/3.

clear_many_payloads/1

clear_many_payloads(PathPattern) -> Ret

Deletes the payload of all tree nodes matching the given path pattern.

This is the same as khepri_adv:clear_many_payloads/2 but inside the context of a transaction function.

See also: khepri_adv:clear_many_payloads/2.

clear_many_payloads/2

clear_many_payloads(PathPattern, Options) -> Ret

Deletes the payload of all tree nodes matching the given path pattern.

This is the same as khepri_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/1

ensure_instruction_is_permitted(Unknown) -> any()

should_process_function/4

should_process_function(Module, Name, Arity, FromModule) -> any()

is_standalone_fun_still_needed/2

is_standalone_fun_still_needed(X1, X2) -> any()


Generated by EDoc