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 2304726294 for ; Tue, 27 Mar 2018 02:04:46 -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 u8LK7Fru5T-7 for ; Tue, 27 Mar 2018 02:04:46 -0400 (EDT) Received: from smtp56.i.mail.ru (smtp56.i.mail.ru [217.69.128.36]) (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 D4DD22604D for ; Tue, 27 Mar 2018 02:04:45 -0400 (EDT) Date: Tue, 27 Mar 2018 09:04:43 +0300 From: Konstantin Osipov Subject: [tarantool-patches] Re: [PATCH v2 2/2] sql: use 'view' opts from space Message-ID: <20180327060443.GB4581@atlas> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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: tarantool-patches@freelists.org Cc: tarantool-patches@freelist.org, Nikita Pettik * Nikita Pettik [18/03/27 02:06]: > > +/** > + * Return true if space which corresponds to > + * given table has view option. > + */ > +bool > +space_is_view(Table *table) > +{ > + assert(table != NULL); > + uint32_t space_id = SQLITE_PAGENO_TO_SPACEID(table->tnum); > + struct space *space = space_by_id(space_id); > + assert(space != NULL); > + return space->def->opts.view; > +} I assume this implementation will change in a few weeks. -- Konstantin Osipov, Moscow, Russia, +7 903 626 22 32 http://tarantool.org - www.twitter.com/kostja_osipov