7 namespace horizon::SQLite {
26 template <
class T> T get(
int idx)
const
35 template <
class... Ts> std::tuple<Ts...> get_columns(
typename convert<Ts>::to_int... idxs)
const
37 return std::make_tuple(get(idxs, Ts())...);
40 void bind(
int idx,
const std::string &v,
bool copy =
true);
41 void bind(
const char *name,
const std::string &v,
bool copy =
true);
42 void bind(
int idx,
int v);
43 void bind(
const char *name,
int v);
52 std::string get(
int idx, std::string)
const;
53 int get(
int idx,
int)
const;
56 class Error :
public std::runtime_error {
58 Error(
int a_rc,
const char *what) : std::runtime_error(what), rc(a_rc)
68 Database(
const std::string &filename,
int flags = SQLITE_OPEN_READONLY,
int timeout_ms = 0);
70 void execute(
const std::string &query);
71 void execute(
const char *query);
72 int get_user_version();
75 sqlite3 *db =
nullptr;
Definition: sqlite.hpp:64
Definition: sqlite.hpp:56
Definition: sqlite.hpp:20
This class encapsulates a UUID and allows it to be uses as a value type.
Definition: uuid.hpp:16
Definition: sqlite.hpp:31