@@ -223,11 +223,17 @@ class Statement
223223 /* *
224224 * @brief Bind an int value to a named parameter "?NNN", ":VVV", "@VVV" or "$VVV" in the SQL prepared statement (aIndex >= 1)
225225 */
226- void bind (const char * apName, const int aValue);
226+ void bind (const char * apName, const int aValue)
227+ {
228+ bind (getIndex (apName), aValue);
229+ }
227230 /* *
228231 * @brief Bind a 32bits unsigned int value to a named parameter "?NNN", ":VVV", "@VVV" or "$VVV" in the SQL prepared statement (aIndex >= 1)
229232 */
230- void bind (const char * apName, const unsigned aValue);
233+ void bind (const char * apName, const unsigned aValue)
234+ {
235+ bind (getIndex (apName), aValue);
236+ }
231237
232238#if (LONG_MAX == INT_MAX) // 4 bytes "long" type means the data model is ILP32 or LLP64 (Win64 Visual C++ and MinGW)
233239 /* *
@@ -249,57 +255,84 @@ class Statement
249255 /* *
250256 * @brief Bind a 64bits int value to a named parameter "?NNN", ":VVV", "@VVV" or "$VVV" in the SQL prepared statement (aIndex >= 1)
251257 */
252- void bind (const char * apName, const long long aValue);
258+ void bind (const char * apName, const long long aValue)
259+ {
260+ bind (getIndex (apName), aValue);
261+ }
253262 /* *
254263 * @brief Bind a double (64bits float) value to a named parameter "?NNN", ":VVV", "@VVV" or "$VVV" in the SQL prepared statement (aIndex >= 1)
255264 */
256- void bind (const char * apName, const double aValue);
265+ void bind (const char * apName, const double aValue)
266+ {
267+ bind (getIndex (apName), aValue);
268+ }
257269 /* *
258270 * @brief Bind a string value to a named parameter "?NNN", ":VVV", "@VVV" or "$VVV" in the SQL prepared statement (aIndex >= 1)
259271 *
260272 * @note Uses the SQLITE_TRANSIENT flag, making a copy of the data, for SQLite internal use
261273 */
262- void bind (const char * apName, const std::string& aValue);
274+ void bind (const char * apName, const std::string& aValue)
275+ {
276+ bind (getIndex (apName), aValue);
277+ }
263278 /* *
264279 * @brief Bind a text value to a named parameter "?NNN", ":VVV", "@VVV" or "$VVV" in the SQL prepared statement (aIndex >= 1)
265280 *
266281 * @note Uses the SQLITE_TRANSIENT flag, making a copy of the data, for SQLite internal use
267282 */
268- void bind (const char * apName, const char * apValue);
283+ void bind (const char * apName, const char * apValue)
284+ {
285+ bind (getIndex (apName), apValue);
286+ }
269287 /* *
270288 * @brief Bind a binary blob value to a named parameter "?NNN", ":VVV", "@VVV" or "$VVV" in the SQL prepared statement (aIndex >= 1)
271289 *
272290 * @note Uses the SQLITE_TRANSIENT flag, making a copy of the data, for SQLite internal use
273291 */
274- void bind (const char * apName, const void * apValue, const int aSize);
292+ void bind (const char * apName, const void * apValue, const int aSize)
293+ {
294+ bind (getIndex (apName), apValue, aSize);
295+ }
275296 /* *
276297 * @brief Bind a string value to a named parameter "?NNN", ":VVV", "@VVV" or "$VVV" in the SQL prepared statement (aIndex >= 1)
277298 *
278299 * The string can contain null characters as it is binded using its size.
279300 *
280301 * @warning Uses the SQLITE_STATIC flag, avoiding a copy of the data. The string must remains unchanged while executing the statement.
281302 */
282- void bindNoCopy (const char * apName, const std::string& aValue);
303+ void bindNoCopy (const char * apName, const std::string& aValue)
304+ {
305+ bindNoCopy (getIndex (apName), aValue);
306+ }
283307 /* *
284308 * @brief Bind a text value to a named parameter "?NNN", ":VVV", "@VVV" or "$VVV" in the SQL prepared statement (aIndex >= 1)
285309 *
286310 * Main usage is with null-terminated literal text (aka in code static strings)
287311 *
288312 * @warning Uses the SQLITE_STATIC flag, avoiding a copy of the data. The string must remains unchanged while executing the statement.
289313 */
290- void bindNoCopy (const char * apName, const char * apValue);
314+ void bindNoCopy (const char * apName, const char * apValue)
315+ {
316+ bindNoCopy (getIndex (apName), apValue);
317+ }
291318 /* *
292319 * @brief Bind a binary blob value to a named parameter "?NNN", ":VVV", "@VVV" or "$VVV" in the SQL prepared statement (aIndex >= 1)
293320 *
294321 * @warning Uses the SQLITE_STATIC flag, avoiding a copy of the data. The string must remains unchanged while executing the statement.
295322 */
296- void bindNoCopy (const char * apName, const void * apValue, const int aSize);
323+ void bindNoCopy (const char * apName, const void * apValue, const int aSize)
324+ {
325+ bindNoCopy (getIndex (apName), apValue, aSize);
326+ }
297327 /* *
298328 * @brief Bind a NULL value to a named parameter "?NNN", ":VVV", "@VVV" or "$VVV" in the SQL prepared statement (aIndex >= 1)
299329 *
300330 * @see clearBindings() to set all bound parameters to NULL.
301331 */
302- void bind (const char * apName); // bind NULL value
332+ void bind (const char * apName) // bind NULL value
333+ {
334+ bind (getIndex (apName));
335+ }
303336
304337
305338 /* *
0 commit comments