@@ -203,11 +203,17 @@ class Statement
203
203
/* *
204
204
* @brief Bind an int value to a named parameter "?NNN", ":VVV", "@VVV" or "$VVV" in the SQL prepared statement (aIndex >= 1)
205
205
*/
206
- void bind (const char * apName, const int aValue);
206
+ void bind (const char * apName, const int aValue)
207
+ {
208
+ bind (getIndex (apName), aValue);
209
+ }
207
210
/* *
208
211
* @brief Bind a 32bits unsigned int value to a named parameter "?NNN", ":VVV", "@VVV" or "$VVV" in the SQL prepared statement (aIndex >= 1)
209
212
*/
210
- void bind (const char * apName, const unsigned aValue);
213
+ void bind (const char * apName, const unsigned aValue)
214
+ {
215
+ bind (getIndex (apName), aValue);
216
+ }
211
217
212
218
#if (LONG_MAX == INT_MAX) // 4 bytes "long" type means the data model is ILP32 or LLP64 (Win64 Visual C++ and MinGW)
213
219
/* *
@@ -229,57 +235,84 @@ class Statement
229
235
/* *
230
236
* @brief Bind a 64bits int value to a named parameter "?NNN", ":VVV", "@VVV" or "$VVV" in the SQL prepared statement (aIndex >= 1)
231
237
*/
232
- void bind (const char * apName, const long long aValue);
238
+ void bind (const char * apName, const long long aValue)
239
+ {
240
+ bind (getIndex (apName), aValue);
241
+ }
233
242
/* *
234
243
* @brief Bind a double (64bits float) value to a named parameter "?NNN", ":VVV", "@VVV" or "$VVV" in the SQL prepared statement (aIndex >= 1)
235
244
*/
236
- void bind (const char * apName, const double aValue);
245
+ void bind (const char * apName, const double aValue)
246
+ {
247
+ bind (getIndex (apName), aValue);
248
+ }
237
249
/* *
238
250
* @brief Bind a string value to a named parameter "?NNN", ":VVV", "@VVV" or "$VVV" in the SQL prepared statement (aIndex >= 1)
239
251
*
240
252
* @note Uses the SQLITE_TRANSIENT flag, making a copy of the data, for SQLite internal use
241
253
*/
242
- void bind (const char * apName, const std::string& aValue);
254
+ void bind (const char * apName, const std::string& aValue)
255
+ {
256
+ bind (getIndex (apName), aValue);
257
+ }
243
258
/* *
244
259
* @brief Bind a text value to a named parameter "?NNN", ":VVV", "@VVV" or "$VVV" in the SQL prepared statement (aIndex >= 1)
245
260
*
246
261
* @note Uses the SQLITE_TRANSIENT flag, making a copy of the data, for SQLite internal use
247
262
*/
248
- void bind (const char * apName, const char * apValue);
263
+ void bind (const char * apName, const char * apValue)
264
+ {
265
+ bind (getIndex (apName), apValue);
266
+ }
249
267
/* *
250
268
* @brief Bind a binary blob value to a named parameter "?NNN", ":VVV", "@VVV" or "$VVV" in the SQL prepared statement (aIndex >= 1)
251
269
*
252
270
* @note Uses the SQLITE_TRANSIENT flag, making a copy of the data, for SQLite internal use
253
271
*/
254
- void bind (const char * apName, const void * apValue, const int aSize);
272
+ void bind (const char * apName, const void * apValue, const int aSize)
273
+ {
274
+ bind (getIndex (apName), apValue, aSize);
275
+ }
255
276
/* *
256
277
* @brief Bind a string value to a named parameter "?NNN", ":VVV", "@VVV" or "$VVV" in the SQL prepared statement (aIndex >= 1)
257
278
*
258
279
* The string can contain null characters as it is binded using its size.
259
280
*
260
281
* @warning Uses the SQLITE_STATIC flag, avoiding a copy of the data. The string must remains unchanged while executing the statement.
261
282
*/
262
- void bindNoCopy (const char * apName, const std::string& aValue);
283
+ void bindNoCopy (const char * apName, const std::string& aValue)
284
+ {
285
+ bindNoCopy (getIndex (apName), aValue);
286
+ }
263
287
/* *
264
288
* @brief Bind a text value to a named parameter "?NNN", ":VVV", "@VVV" or "$VVV" in the SQL prepared statement (aIndex >= 1)
265
289
*
266
290
* Main usage is with null-terminated literal text (aka in code static strings)
267
291
*
268
292
* @warning Uses the SQLITE_STATIC flag, avoiding a copy of the data. The string must remains unchanged while executing the statement.
269
293
*/
270
- void bindNoCopy (const char * apName, const char * apValue);
294
+ void bindNoCopy (const char * apName, const char * apValue)
295
+ {
296
+ bindNoCopy (getIndex (apName), apValue);
297
+ }
271
298
/* *
272
299
* @brief Bind a binary blob value to a named parameter "?NNN", ":VVV", "@VVV" or "$VVV" in the SQL prepared statement (aIndex >= 1)
273
300
*
274
301
* @warning Uses the SQLITE_STATIC flag, avoiding a copy of the data. The string must remains unchanged while executing the statement.
275
302
*/
276
- void bindNoCopy (const char * apName, const void * apValue, const int aSize);
303
+ void bindNoCopy (const char * apName, const void * apValue, const int aSize)
304
+ {
305
+ bindNoCopy (getIndex (apName), apValue, aSize);
306
+ }
277
307
/* *
278
308
* @brief Bind a NULL value to a named parameter "?NNN", ":VVV", "@VVV" or "$VVV" in the SQL prepared statement (aIndex >= 1)
279
309
*
280
310
* @see clearBindings() to set all bound parameters to NULL.
281
311
*/
282
- void bind (const char * apName); // bind NULL value
312
+ void bind (const char * apName) // bind NULL value
313
+ {
314
+ bind (getIndex (apName));
315
+ }
283
316
284
317
285
318
/* *
0 commit comments