Skip to content
Snippets Groups Projects
Commit 0e689b84 authored by Andrey Saranchin's avatar Andrey Saranchin Committed by Aleksandr Lyapunov
Browse files

lua: provide old trigger API with name

Triggers that were moved to the trigger registry accept trigger name as
an optional argument and allow to set triggers using new key-value API.
Let's provide triggers, that were not moved to the trigger registry yet,
with the same functionality. For this purpose the main trigger setter,
lbox_trigger_reset, is updated.

Backward compatibility is a bit broken after this patch. Firstly, all
the triggers were listed in order of their insertion, which is reversed
order of their actual layout and call. Now they are listed in direct
oreder of call.

The patch changes API for all the triggers that were not moved to the
trigger registry except for swim triggers - this case is a bit more
complicated because of context that can be passed to the swim triggers.

Note that argument `top` of `lbox_trigger_reset` is changed to `bottom`
because all passed `top`s became irrelevant with the introduction of the
third argument - changing it to `bottom` will help avoid a similar
problem in the future.

Along the way, make transactional triggers' error more descriptive and
add box.session.on_access_denied to the test - it wasn't tested by
mistake.

Part of #6484
Part of #8659

NO_CHANGELOG=later
NO_DOC=later
parent 6d882740
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment