@@ -203,11 +203,17 @@ class Statement
203203 /* *
204204 * @brief Bind an int value to a named parameter "?NNN", ":VVV", "@VVV" or "$VVV" in the SQL prepared statement (aIndex >= 1)
205205 */
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+ }
207210 /* *
208211 * @brief Bind a 32bits unsigned int value to a named parameter "?NNN", ":VVV", "@VVV" or "$VVV" in the SQL prepared statement (aIndex >= 1)
209212 */
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+ }
211217
212218#if (LONG_MAX == INT_MAX) // 4 bytes "long" type means the data model is ILP32 or LLP64 (Win64 Visual C++ and MinGW)
213219 /* *
@@ -229,57 +235,84 @@ class Statement
229235 /* *
230236 * @brief Bind a 64bits int value to a named parameter "?NNN", ":VVV", "@VVV" or "$VVV" in the SQL prepared statement (aIndex >= 1)
231237 */
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+ }
233242 /* *
234243 * @brief Bind a double (64bits float) value to a named parameter "?NNN", ":VVV", "@VVV" or "$VVV" in the SQL prepared statement (aIndex >= 1)
235244 */
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+ }
237249 /* *
238250 * @brief Bind a string value to a named parameter "?NNN", ":VVV", "@VVV" or "$VVV" in the SQL prepared statement (aIndex >= 1)
239251 *
240252 * @note Uses the SQLITE_TRANSIENT flag, making a copy of the data, for SQLite internal use
241253 */
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+ }
243258 /* *
244259 * @brief Bind a text value to a named parameter "?NNN", ":VVV", "@VVV" or "$VVV" in the SQL prepared statement (aIndex >= 1)
245260 *
246261 * @note Uses the SQLITE_TRANSIENT flag, making a copy of the data, for SQLite internal use
247262 */
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+ }
249267 /* *
250268 * @brief Bind a binary blob value to a named parameter "?NNN", ":VVV", "@VVV" or "$VVV" in the SQL prepared statement (aIndex >= 1)
251269 *
252270 * @note Uses the SQLITE_TRANSIENT flag, making a copy of the data, for SQLite internal use
253271 */
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+ }
255276 /* *
256277 * @brief Bind a string value to a named parameter "?NNN", ":VVV", "@VVV" or "$VVV" in the SQL prepared statement (aIndex >= 1)
257278 *
258279 * The string can contain null characters as it is binded using its size.
259280 *
260281 * @warning Uses the SQLITE_STATIC flag, avoiding a copy of the data. The string must remains unchanged while executing the statement.
261282 */
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+ }
263287 /* *
264288 * @brief Bind a text value to a named parameter "?NNN", ":VVV", "@VVV" or "$VVV" in the SQL prepared statement (aIndex >= 1)
265289 *
266290 * Main usage is with null-terminated literal text (aka in code static strings)
267291 *
268292 * @warning Uses the SQLITE_STATIC flag, avoiding a copy of the data. The string must remains unchanged while executing the statement.
269293 */
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+ }
271298 /* *
272299 * @brief Bind a binary blob value to a named parameter "?NNN", ":VVV", "@VVV" or "$VVV" in the SQL prepared statement (aIndex >= 1)
273300 *
274301 * @warning Uses the SQLITE_STATIC flag, avoiding a copy of the data. The string must remains unchanged while executing the statement.
275302 */
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+ }
277307 /* *
278308 * @brief Bind a NULL value to a named parameter "?NNN", ":VVV", "@VVV" or "$VVV" in the SQL prepared statement (aIndex >= 1)
279309 *
280310 * @see clearBindings() to set all bound parameters to NULL.
281311 */
282- void bind (const char * apName); // bind NULL value
312+ void bind (const char * apName) // bind NULL value
313+ {
314+ bind (getIndex (apName));
315+ }
283316
284317
285318 /* *
0 commit comments