[Tarantool-patches] [tarantool-patches] Re: [PATCH v1 0/9] schema: rework _trigger space

Nikita Pettik korablev at tarantool.org
Wed Oct 16 16:31:06 MSK 2019


On 16 Oct 15:53, Kirill Shcherbatov wrote:
> > - name (both have)
> > - func_id (only Lua)
> > - space_id (both have)
> > - type (means one of replace/connection/auth etc; only Lua)
> > - event (only SQL)
> > - action_time (SQL and Lua have sets of timings which don't intersect)
> > - action (only SQL)
> 
> I need to mention that I didn't followed this outdated proposal in the
> refactoring that we are discussing.
> 
> <name> STRING  (both have)
> <space_id> UINT32 (both have)
> <opts> MAP (non of them for now, legacy, but potentially usefull)
> <language> STR (both have)
> <type> STR (both have; currently 'replace' type only - replace trigger;
>                       perhaps we would like to support some different trigger types)

Strictly speaking, this relates only to NoSQL triggers.

> <event_manipulation> STR  {"DELETE", "UPDATE", "INSERT" --
>                                                SQL only? - but it is possible to support it in Lua also}

How is this supposed to be supported in Lua? For NoSQL triggers only "replace"
event is valid, which obviously is non of delete, update or insert.

> <action_timing> STR {"BEFORE", "AFTER" - both have}

AFTER is not the same as on_replace; SQL also has INSTEAD.

> <code> STR (both have)

You format missing func_id which is required for NoSQL triggers and action
(FOR EACH STMT/ROW) which is valid for SQL only.



More information about the Tarantool-patches mailing list