MCPcopy Create free account
hub / github.com/AnetaTexler/FaceBlit / bind_object

Method bind_object

VS/include/dlib/sqlite/sqlite.h:437–461  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

435
436 template <typename T>
437 void bind_object (
438 unsigned long parameter_id,
439 const T& item
440 )
441 {
442 // make sure requires clause is not broken
443 DLIB_ASSERT(1 <= parameter_id && parameter_id <= get_max_parameter_id(),
444 "\t void statement::bind_object()"
445 << "\n\t Invalid parameter id."
446 << "\n\t parameter_id: " << parameter_id
447 << "\n\t get_max_parameter_id(): " << get_max_parameter_id()
448 << "\n\t this: " << this
449 );
450
451 reset();
452 std::ostringstream sout;
453 serialize(item, sout);
454 const std::string& str = sout.str();
455 int status = sqlite3_bind_blob(stmt, parameter_id, str.data(), str.size(), SQLITE_TRANSIENT);
456
457 if (status != SQLITE_OK)
458 {
459 throw sqlite_error(sqlite3_errmsg(db.get()));
460 }
461 }
462
463 void bind_double (
464 unsigned long parameter_id,

Callers

nothing calls this directly

Calls 7

sqlite_errorClass · 0.70
resetFunction · 0.50
serializeFunction · 0.50
strMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected