Tarantool development patches archive
 help / color / mirror / Atom feed
From: "v.shpilevoy@tarantool.org" <v.shpilevoy@tarantool.org>
To: tarantool-patches@freelists.org
Cc: Nikita Pettik <korablev@tarantool.org>
Subject: [tarantool-patches] Re: [PATCH] Introduce 'view' space option
Date: Mon, 26 Mar 2018 16:30:13 +0300	[thread overview]
Message-ID: <8440DB05-B4E9-4DC1-9E0F-81B64749AC2C@tarantool.org> (raw)
In-Reply-To: <20180326131139.94448-1-korablev@tarantool.org>



> 26 марта 2018 г., в 16:11, Nikita Pettik <korablev@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?

      reply	other threads:[~2018-03-26 13:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-26 13:11 [tarantool-patches] " Nikita Pettik
2018-03-26 13:30 ` v.shpilevoy [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8440DB05-B4E9-4DC1-9E0F-81B64749AC2C@tarantool.org \
    --to=v.shpilevoy@tarantool.org \
    --cc=korablev@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='[tarantool-patches] Re: [PATCH] Introduce '\''view'\'' space option' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox