From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <korablev@tarantool.org>
Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [94.100.177.149])
 (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 1635246971A
 for <tarantool-patches@dev.tarantool.org>;
 Fri, 13 Dec 2019 16:55:56 +0300 (MSK)
Date: Fri, 13 Dec 2019 16:55:55 +0300
From: Nikita Pettik <korablev@tarantool.org>
Message-ID: <20191213135555.GA80915@tarantool.org>
References: <cover.1574277369.git.korablev@tarantool.org>
 <e9fb868315c0d12ce101f571218266849cad786d.1574277369.git.korablev@tarantool.org>
 <20191204115517.GK6592@atlas>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
In-Reply-To: <20191204115517.GK6592@atlas>
Subject: Re: [Tarantool-patches] [PATCH v2 09/16] sql: resurrect
	sql_bind_parameter_name()
List-Id: Tarantool development patches <tarantool-patches.dev.tarantool.org>
List-Unsubscribe: <https://lists.tarantool.org/mailman/options/tarantool-patches>, 
 <mailto:tarantool-patches-request@dev.tarantool.org?subject=unsubscribe>
List-Archive: <https://lists.tarantool.org/pipermail/tarantool-patches/>
List-Post: <mailto:tarantool-patches@dev.tarantool.org>
List-Help: <mailto:tarantool-patches-request@dev.tarantool.org?subject=help>
List-Subscribe: <https://lists.tarantool.org/mailman/listinfo/tarantool-patches>, 
 <mailto:tarantool-patches-request@dev.tarantool.org?subject=subscribe>
To: Konstantin Osipov <kostja.osipov@gmail.com>, tarantool-patches@dev.tarantool.org, v.shpilevoy@tarantool.org

On 04 Dec 14:55, Konstantin Osipov wrote:
> * Nikita Pettik <korablev@tarantool.org> [19/11/21 10:00]:
> > +/**
> > + * Return the name of a wildcard parameter. Return NULL if the index
> > + * is out of range or if the wildcard is unnamed.
> > + */
> 
> Please document the valid range of the index (0-based I assume)
> > +const char *
> > +sql_bind_parameter_name(sql_stmt *stmt, int i);
> > 

Fixed:

diff --git a/src/box/sql/sqlInt.h b/src/box/sql/sqlInt.h
index e5092b7a4..a5c564b8a 100644
--- a/src/box/sql/sqlInt.h
+++ b/src/box/sql/sqlInt.h
@@ -697,7 +697,8 @@ sql_bind_parameter_count(sql_stmt *stmt);
 
 /**
  * Return the name of a wildcard parameter. Return NULL if the index
- * is out of range or if the wildcard is unnamed.
+ * is out of range or if the wildcard is unnamed. Parameter's index
+ * is 0-based.
  */
 const char *
 sql_bind_parameter_name(sql_stmt *stmt, int i);

> -- 
> Konstantin Osipov, Moscow, Russia