[Tarantool-patches] [PATCH v1 9/9] schema: rework _trigger system space

Konstantin Osipov kostja at scylladb.com
Thu Oct 17 10:44:07 MSK 2019


* Kirill Shcherbatov <kshcherbatov at tarantool.org> [19/10/14 19:07]:
> This patch reworks a _trigger system space to make it
> useful not only for sql triggers definitions.
> 
> The format of the updated system space is
> 
> _trigger (space id = 328)
> [<name> STRING, <space_id> UINT32, <opts> MAP, <language> STR,
>  <type> STR, <event_manipulation> STR,
>  <action_timing> STR, <code> STR]
> 
> After insertion into this space, a new instance describing trigger
> object is created using language-dependent constructor.
> 
> This volumerous refactoring is an initial step for further
> introduction of persistent triggers in Lua.

I agree with the implementation approach, given that we want
persistent Lua triggers, which we hardly do (but we do want SQL
triggers to be fired on NoSQL events, otherwise PeterG rightfully
would claim that Tarantool SQL violates relational tenets by Codd).

I think you should extract this part into an own series and split
it up - it's the most critical piece of the change.

BTW, I thought of another reason to do triggers in Lua and SQL in
a single space: this is how we dealt with persistent functions,
and it worked well. When we talk about backends in Tarantool, we
should not forget about C backend, and whatever other language it 
allows to bridge with.

-- 
Konstantin Osipov, Moscow, Russia


More information about the Tarantool-patches mailing list