[tarantool-patches] Re: [PATCH] Introduce 'view' space option

v.shpilevoy at tarantool.org v.shpilevoy at tarantool.org
Mon Mar 26 16:30:13 MSK 2018



> 26 марта 2018 г., в 16:11, Nikita Pettik <korablev at tarantool.org> написал(а):
> 
> Now, space can feature SQL specific option 'view'. In SQL view is a
> space without any functional parts except for 'SELECT' statement.
> In this respect, creation of any indexes is prohibited on views;
> views must have SQL statement; transofrmation from space to view is also
> banned.
> It is worth mentioning, that setting 'view' option isn't available via
> Lua interface.

Seems, that it is not true, because I still can set view via raw insert into _space:
box.cfg{}
s = box.schema.create_space('test')
raw_s = box.space._space:get{s.id}:totable()
s:drop()
raw_s[6].view = true
raw_s[6].sql = 'invalid shit'
box.space._space:replace(raw_s) -- this works ok.

It can not be fixed now, but please, note this in a commit message, and add a test, that shows box.schema.create_space(name, {view = true, sql = 'invalid shit'}) fails, but box.space._space:replace(raw_s)
works ok.

And how about delete TF_View in the same commit?



More information about the Tarantool-patches mailing list