[PATCH v2] box: add on_schema_init trigger

Konstantin Osipov kostja at tarantool.org
Tue Mar 5 21:59:06 MSK 2019


* Serge Petrenko <sergepetrenko at tarantool.org> [19/03/05 18:57]:
> If you want to change space's `space_name` storage engine to `vinyl`
> , you may say:
> ```
> function trig(old, new)
>     if new[3] == 'space_name' and new[4] ~= 'vinyl' then
>         return box.tuple.new{new[1], new[2], new[3], 'vinyl',
>                              new[5], new[6], new[7]}
>     end
> end
> ```

Please access tuple fields by their names ;)


-- 
Konstantin Osipov, Moscow, Russia, +7 903 626 22 32
http://tarantool.io - www.twitter.com/kostja_osipov



More information about the Tarantool-patches mailing list