diff options
Diffstat (limited to 'src/database/sqlite3_engine.hpp')
-rw-r--r-- | src/database/sqlite3_engine.hpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/database/sqlite3_engine.hpp b/src/database/sqlite3_engine.hpp index eb18d0c..5b8176c 100644 --- a/src/database/sqlite3_engine.hpp +++ b/src/database/sqlite3_engine.hpp @@ -4,12 +4,17 @@ #include <database/statement.hpp> -#include <sqlite3.h> #include <memory> #include <string> #include <tuple> #include <set> +#include <biboumi.h> + +#ifdef SQLITE3_FOUND + +#include <sqlite3.h> + class Sqlite3Engine: public DatabaseEngine { public: @@ -28,3 +33,15 @@ private: sqlite3* const db; }; +#else + +class Sqlite3Engine +{ +public: + static std::unique_ptr<DatabaseEngine> open(const std::string& string) + { + throw std::runtime_error("Cannot open sqlite3 database "s + string + ": biboumi is not compiled with sqlite3 lib."); + } +}; + +#endif |