[Tarantool-patches] [PATCH v2 08/16] sql: resurrect sql_bind_parameter_count() function

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Wed Dec 4 01:51:21 MSK 2019


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.


More information about the Tarantool-patches mailing list