From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 469662B6ED for ; Tue, 27 Mar 2018 07:05:04 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9TE3p1JaHwO5 for ; Tue, 27 Mar 2018 07:05:04 -0400 (EDT) Received: from smtp61.i.mail.ru (smtp61.i.mail.ru [217.69.128.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 07E922B6EA for ; Tue, 27 Mar 2018 07:05:03 -0400 (EDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: [tarantool-patches] Re: [PATCH v2 2/2] sql: use 'view' opts from space From: "n.pettik" In-Reply-To: <20180327060443.GB4581@atlas> Date: Tue, 27 Mar 2018 14:05:02 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: <60C99E00-4002-4F08-8495-4B0014B252AD@tarantool.org> References: <20180327060443.GB4581@atlas> Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: Konstantin Osipov Cc: tarantool-patches@freelists.org > On 27 Mar 2018, at 09:04, Konstantin Osipov = wrote: >=20 > * Nikita Pettik [18/03/27 02:06]: >>=20 >> +/** >> + * Return true if space which corresponds to >> + * given table has view option. >> + */ >> +bool >> +space_is_view(Table *table) >> +{ >> + assert(table !=3D NULL); >> + uint32_t space_id =3D SQLITE_PAGENO_TO_SPACEID(table->tnum); >> + struct space *space =3D space_by_id(space_id); >> + assert(space !=3D NULL); >> + return space->def->opts.view; >> +} >=20 > I assume this implementation will change in a few weeks. It=E2=80=99s true. Added FIXME clarification: @@ -1163,6 +1163,10 @@ index_collation_name(Index *idx, uint32_t column) /** * Return true if space which corresponds to * given table has view option. + * + * FIXME: this is temporary wrapper around SQL specific struct. + * It will be removed after data dictionary integration + * into SQL is finished.