|
| | Statement (SQLite::Statement statement, SqliteCppDb *db) |
| |
| template<typename... T> |
| auto | bind (int index, T &&... values) -> void |
| |
| template<typename... T> |
| auto | bind (const std::string &name, T &&... values) -> void |
| |
| void | reset () |
| |
| void | execute (std::stop_token stopToken={}) |
| |
| template<std::default_initializable Ret> |
| auto | executeAndGet (std::stop_token stopToken={}) -> std::optional< Ret > |
| | Executes a query that returns a single row.
|
| |
| template<std::default_initializable Ret> |
| auto | executeAndGetAll (std::stop_token stopToken={}) -> std::vector< Ret > |
| | Executes a query that returns any number of rows.
|
| |
Wrapper for SQLiteCpp::Statement.
- Note
- A statement must not be used by multiple threads simultaneously.
Execution accepts an optional stop token. Cancellation is checked after acquiring the connection and during SQL execution and row copying. It throws SQLite::Exception with SQLITE_INTERRUPT without interrupting other statements. Interrupted writes may roll back their transaction.