~singpolyma/biboumi

de8267fa3f4f4e1d61bcf35fb36c6664f520a385 — louiz’ 4 years ago 857c7d3
Fix a build warning when compiling without postgres or sqlite
2 files changed, 6 insertions(+), 0 deletions(-)

M src/database/postgresql_engine.hpp
M src/database/sqlite3_engine.hpp
M src/database/postgresql_engine.hpp => src/database/postgresql_engine.hpp +3 -0
@@ 45,12 45,15 @@ private:

#else

using namespace std::string_literals;

class PostgresqlEngine
{
public:
  static std::unique_ptr<DatabaseEngine> open(const std::string& string)
  {
    throw std::runtime_error("Cannot open postgresql database "s + string + ": biboumi is not compiled with libpq.");
    return {};
  }
};


M src/database/sqlite3_engine.hpp => src/database/sqlite3_engine.hpp +3 -0
@@ 42,12 42,15 @@ private:

#else

using namespace std::string_literals;

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.");
    return {};
  }
};