From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Tue, 5 Mar 2019 21:59:06 +0300 From: Konstantin Osipov Subject: Re: [PATCH v2] box: add on_schema_init trigger Message-ID: <20190305185906.GC7992@chai> References: <20190305155309.32516-1-sergepetrenko@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190305155309.32516-1-sergepetrenko@tarantool.org> To: Serge Petrenko Cc: vdavydov.dev@gmail.com, tarantool-patches@freelists.org List-ID: * Serge Petrenko [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