MCPcopy Create free account
hub / github.com/davisking/dlib / bind_blob

Method bind_blob

dlib/sqlite/sqlite.h:413–434  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

411 }
412
413 void bind_blob (
414 unsigned long parameter_id,
415 const std::vector<char>& item
416 )
417 {
418 // make sure requires clause is not broken
419 DLIB_ASSERT(1 <= parameter_id && parameter_id <= get_max_parameter_id(),
420 "\t void statement::bind_blob()"
421 << "\n\t Invalid parameter id."
422 << "\n\t parameter_id: " << parameter_id
423 << "\n\t get_max_parameter_id(): " << get_max_parameter_id()
424 << "\n\t this: " << this
425 );
426
427 reset();
428 int status = sqlite3_bind_blob(stmt, parameter_id, &item[0], item.size(), SQLITE_TRANSIENT);
429
430 if (status != SQLITE_OK)
431 {
432 throw sqlite_error(sqlite3_errmsg(db.get()));
433 }
434 }
435
436 template <typename T>
437 void bind_object (

Callers

nothing calls this directly

Calls 3

sqlite_errorClass · 0.70
sizeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected