From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 dev.tarantool.org (Postfix) with ESMTPS id 4D7914696C6 for ; Wed, 4 Dec 2019 01:51:25 +0300 (MSK) References: From: Vladislav Shpilevoy Message-ID: <54b08743-e180-317a-3bef-391f020d4e07@tarantool.org> Date: Tue, 3 Dec 2019 23:51:23 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Tarantool-patches] [PATCH v2 04/16] sql: rename sqlPrepare() to sql_compile() List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Nikita Pettik , tarantool-patches@dev.tarantool.org Thanks for the patch! > diff --git a/src/box/sql/sqlInt.h b/src/box/sql/sqlInt.h > index 3ca10778e..07c26e932 100644 > --- a/src/box/sql/sqlInt.h > +++ b/src/box/sql/sqlInt.h > @@ -468,6 +468,19 @@ typedef void (*sql_destructor_type) (void *); > #define SQL_STATIC ((sql_destructor_type)0) > #define SQL_TRANSIENT ((sql_destructor_type)-1) > > +/** > + * Compile the UTF-8 encoded SQL statement zSql into a statement handle. Please, keep 66 symbols border, and remove 'zSql'. > + * > + * @param sql UTF-8 encoded SQL statement. > + * @param sql_len Length of @sql in bytes. > + * @param re_prepared VM being re-compiled. Can be NULL. > + * @param[out] stmt A pointer to the compiled statement. > + * @param[out] sql_tail End of parsed string. > + */ > +int > +sql_compile(const char *sql, int bytes_count, struct Vdbe *re_prepared, > + sql_stmt **stmt, const char **sql_tail); > + > int > sql_step(sql_stmt *); > >