diff options
author | louiz’ <louiz@louiz.org> | 2017-11-29 21:40:46 +0100 |
---|---|---|
committer | louiz’ <louiz@louiz.org> | 2017-12-02 20:08:50 +0100 |
commit | 923cf31ba62ebfd2369a9594a60020477730b649 (patch) | |
tree | a743e9e92579809c8e95395edf1304eefc09e796 /src/database/database.cpp | |
parent | 0168b96b79db2627fdba77a8712956408aa081d1 (diff) | |
parent | e1c7a6518a1aeaac1786c321aee35bd5e20acf6f (diff) | |
download | biboumi-923cf31ba62ebfd2369a9594a60020477730b649.tar.gz biboumi-923cf31ba62ebfd2369a9594a60020477730b649.tar.bz2 biboumi-923cf31ba62ebfd2369a9594a60020477730b649.tar.xz biboumi-923cf31ba62ebfd2369a9594a60020477730b649.zip |
Merge branch 'postgresql' into 'postgresql'
Some fixes for the postgresql branch
See merge request louiz/biboumi!19
Diffstat (limited to 'src/database/database.cpp')
-rw-r--r-- | src/database/database.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/database/database.cpp b/src/database/database.cpp index b1a5ba5..f9a365d 100644 --- a/src/database/database.cpp +++ b/src/database/database.cpp @@ -37,7 +37,7 @@ void Database::open(const std::string& filename) std::unique_ptr<DatabaseEngine> new_db; static const auto psql_prefix = "postgresql://"s; if (filename.substr(0, psql_prefix.size()) == psql_prefix) - new_db = PostgresqlEngine::open("dbname="s + filename.substr(psql_prefix.size())); + new_db = PostgresqlEngine::open(filename); else new_db = Sqlite3Engine::open(filename); if (!new_db) @@ -242,7 +242,7 @@ std::vector<Database::RosterItem> Database::get_full_roster() void Database::close() { - Database::db.release(); + Database::db = nullptr; } std::string Database::gen_uuid() |