| 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 |
nothing calls this directly
no test coverage detected