Simple wrapper for a SQLite database connection.
More...
#include <sqlite.h>
|
| Connection (const std::string &filename) |
| Create from filename.
|
|
| ~Connection () |
| And clean up.
|
|
template<class ... Columns> |
Statement< Columns... > | prepare (const std::string &query, bool persistent=false) |
| Return a prepared statement for execution.
|
|
| operator sqlite3 * () const |
| Convert to raw sqlite3 pointer to allow initialization of statements without calling prepare.
|
|
|
sqlite3 * | m_connection |
| Pointer to the sqlite database object.
|
|
Simple wrapper for a SQLite database connection.
Definition at line 310 of file sqlite.h.
◆ Connection()
Create from filename.
Definition at line 313 of file sqlite.h.
314 {
315 detail::checkSQLiteError(sqlite3_open_v2(filename.c_str(), &
m_connection, SQLITE_OPEN_READONLY,
nullptr));
316 }
sqlite3 * m_connection
Pointer to the sqlite database object.
◆ ~Connection()
◆ operator sqlite3 *()
operator sqlite3 * |
( |
| ) |
const |
|
inline |
Convert to raw sqlite3 pointer to allow initialization of statements without calling prepare.
Definition at line 323 of file sqlite.h.
◆ prepare()
Statement< Columns... > prepare |
( |
const std::string & |
query, |
|
|
bool |
persistent = false |
|
) |
| |
|
inline |
Return a prepared statement for execution.
Definition at line 321 of file sqlite.h.
ObjectStatement< std::tuple< Columns... >, Columns... > Statement
Basic Statement returning a tuple of columns.
◆ m_connection
Pointer to the sqlite database object.
Definition at line 326 of file sqlite.h.
The documentation for this class was generated from the following file: