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

Method bind_text

dlib/sqlite/sqlite.h:554–575  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

552 }
553
554 void bind_text (
555 unsigned long parameter_id,
556 const std::string& item
557 )
558 {
559 // make sure requires clause is not broken
560 DLIB_ASSERT(1 <= parameter_id && parameter_id <= get_max_parameter_id(),
561 "\t void statement::bind_text()"
562 << "\n\t Invalid parameter id."
563 << "\n\t parameter_id: " << parameter_id
564 << "\n\t get_max_parameter_id(): " << get_max_parameter_id()
565 << "\n\t this: " << this
566 );
567
568 reset();
569 int status = sqlite3_bind_text(stmt, parameter_id, item.c_str(), -1, SQLITE_TRANSIENT);
570
571 if (status != SQLITE_OK)
572 {
573 throw sqlite_error(sqlite3_errmsg(db.get()));
574 }
575 }
576
577 private:
578

Callers

nothing calls this directly

Calls 2

sqlite_errorClass · 0.70
getMethod · 0.45

Tested by

no test coverage detected