12namespace horizon::SQLite {
31 template <
class T> T get(
int idx)
const
38 void bind(
int idx,
const std::string &v,
bool copy =
true);
39 void bind(
const char *name,
const std::string &v,
bool copy =
true);
40 void bind(
int idx,
int v);
41 void bind(
const char *name,
int v);
42 void bind_int64(
int idx, sqlite3_int64 v);
43 void bind_int64(
const char *name, sqlite3_int64 v);
46 void bind(
int idx, ObjectType type);
47 void bind(
const char *name, ObjectType type);
50 int get_column_count();
51 std::string get_column_name(
int col);
57 void get(
int idx, std::string &r)
const;
58 void get(
int idx,
UUID &r)
const;
59 void get(
int idx,
int &r)
const;
60 void get(
int idx, sqlite3_int64 &r)
const;
61 void get(
int idx, ObjectType &r)
const;
64class Error :
public std::runtime_error {
66 Error(
int a_rc,
const char *what) : std::runtime_error(what), rc(a_rc)
76 Database(
const std::string &filename,
int flags = SQLITE_OPEN_READONLY,
int timeout_ms = 0);
78 void execute(
const std::string &query);
79 void execute(
const char *query);
80 int get_user_version();
83 sqlite3 *db =
nullptr;
Definition: sqlite.hpp:72
Definition: sqlite.hpp:64
Definition: sqlite.hpp:25
Definition: sqlite.hpp:13
This class encapsulates a UUID and allows it to be uses as a value type.
Definition: uuid.hpp:16