@@ -223,11 +223,17 @@ class Statement
223
223
/* *
224
224
* @brief Bind an int value to a named parameter "?NNN", ":VVV", "@VVV" or "$VVV" in the SQL prepared statement (aIndex >= 1)
225
225
*/
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
+ }
227
230
/* *
228
231
* @brief Bind a 32bits unsigned int value to a named parameter "?NNN", ":VVV", "@VVV" or "$VVV" in the SQL prepared statement (aIndex >= 1)
229
232
*/
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
+ }
231
237
232
238
#if (LONG_MAX == INT_MAX) // 4 bytes "long" type means the data model is ILP32 or LLP64 (Win64 Visual C++ and MinGW)
233
239
/* *
@@ -249,57 +255,84 @@ class Statement
249
255
/* *
250
256
* @brief Bind a 64bits int value to a named parameter "?NNN", ":VVV", "@VVV" or "$VVV" in the SQL prepared statement (aIndex >= 1)
251
257
*/
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
+ }
253
262
/* *
254
263
* @brief Bind a double (64bits float) value to a named parameter "?NNN", ":VVV", "@VVV" or "$VVV" in the SQL prepared statement (aIndex >= 1)
255
264
*/
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
+ }
257
269
/* *
258
270
* @brief Bind a string value to a named parameter "?NNN", ":VVV", "@VVV" or "$VVV" in the SQL prepared statement (aIndex >= 1)
259
271
*
260
272
* @note Uses the SQLITE_TRANSIENT flag, making a copy of the data, for SQLite internal use
261
273
*/
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
+ }
263
278
/* *
264
279
* @brief Bind a text value to a named parameter "?NNN", ":VVV", "@VVV" or "$VVV" in the SQL prepared statement (aIndex >= 1)
265
280
*
266
281
* @note Uses the SQLITE_TRANSIENT flag, making a copy of the data, for SQLite internal use
267
282
*/
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
+ }
269
287
/* *
270
288
* @brief Bind a binary blob value to a named parameter "?NNN", ":VVV", "@VVV" or "$VVV" in the SQL prepared statement (aIndex >= 1)
271
289
*
272
290
* @note Uses the SQLITE_TRANSIENT flag, making a copy of the data, for SQLite internal use
273
291
*/
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
+ }
275
296
/* *
276
297
* @brief Bind a string value to a named parameter "?NNN", ":VVV", "@VVV" or "$VVV" in the SQL prepared statement (aIndex >= 1)
277
298
*
278
299
* The string can contain null characters as it is binded using its size.
279
300
*
280
301
* @warning Uses the SQLITE_STATIC flag, avoiding a copy of the data. The string must remains unchanged while executing the statement.
281
302
*/
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
+ }
283
307
/* *
284
308
* @brief Bind a text value to a named parameter "?NNN", ":VVV", "@VVV" or "$VVV" in the SQL prepared statement (aIndex >= 1)
285
309
*
286
310
* Main usage is with null-terminated literal text (aka in code static strings)
287
311
*
288
312
* @warning Uses the SQLITE_STATIC flag, avoiding a copy of the data. The string must remains unchanged while executing the statement.
289
313
*/
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
+ }
291
318
/* *
292
319
* @brief Bind a binary blob value to a named parameter "?NNN", ":VVV", "@VVV" or "$VVV" in the SQL prepared statement (aIndex >= 1)
293
320
*
294
321
* @warning Uses the SQLITE_STATIC flag, avoiding a copy of the data. The string must remains unchanged while executing the statement.
295
322
*/
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
+ }
297
327
/* *
298
328
* @brief Bind a NULL value to a named parameter "?NNN", ":VVV", "@VVV" or "$VVV" in the SQL prepared statement (aIndex >= 1)
299
329
*
300
330
* @see clearBindings() to set all bound parameters to NULL.
301
331
*/
302
- void bind (const char * apName); // bind NULL value
332
+ void bind (const char * apName) // bind NULL value
333
+ {
334
+ bind (getIndex (apName));
335
+ }
303
336
304
337
305
338
/* *
0 commit comments