From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp41.i.mail.ru (smtp41.i.mail.ru [94.100.177.101]) (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 9AF2B4696C5 for ; Wed, 4 Dec 2019 01:51:23 +0300 (MSK) References: <47387272c9d4e681beb98cbaea997d8300a17474.1574277369.git.korablev@tarantool.org> From: Vladislav Shpilevoy Message-ID: <6edaa4a5-13a1-69c8-21bd-ee26c436b39f@tarantool.org> Date: Tue, 3 Dec 2019 23:51:21 +0100 MIME-Version: 1.0 In-Reply-To: <47387272c9d4e681beb98cbaea997d8300a17474.1574277369.git.korablev@tarantool.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Tarantool-patches] [PATCH v2 08/16] sql: resurrect sql_bind_parameter_count() function 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! On 20/11/2019 22:28, Nikita Pettik wrote: > This function is present in sql/vdbeapi.c source file, its prototype is > missing in any header file. It makes impossible to use it. Let's add > prototype declaration to sql/sqlInt.h (as other parameter > setters/getters) and refactor a bit in accordance with our codestyle. > > Need for #2592 > --- > src/box/sql/sqlInt.h | 6 ++++++ > src/box/sql/vdbeapi.c | 10 +++------- > 2 files changed, 9 insertions(+), 7 deletions(-) > > diff --git a/src/box/sql/sqlInt.h b/src/box/sql/sqlInt.h > index bd0dca703..875efd6e3 100644 > --- a/src/box/sql/sqlInt.h > +++ b/src/box/sql/sqlInt.h > @@ -688,6 +688,12 @@ int > sql_bind_zeroblob64(sql_stmt *, int, > sql_uint64); > > +/** > + * Return the number of wildcards that should be bound to. > + */ > +int > +sql_bind_parameter_count(sql_stmt *stmt); Why we are here, lets make it 'const struct sql_stmt *'. In sql_stmt_schema_version() too. > + > /** > * Perform pointer parameter binding for the prepared sql > * statement.