summaryrefslogtreecommitdiff
path: root/src/database/database.cpp
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2017-09-09 17:09:17 +0200
committerlouiz’ <louiz@louiz.org>2017-09-09 17:09:17 +0200
commitbfcf29451787d10c747ad79cb3fd177ac86e9cf1 (patch)
tree20e34434b136300cdfb3f99f07c76e6b7b9c726c /src/database/database.cpp
parent8d99374f1f02a4d229b49f6697247eb1e1f4f940 (diff)
downloadbiboumi-bfcf29451787d10c747ad79cb3fd177ac86e9cf1.tar.gz
biboumi-bfcf29451787d10c747ad79cb3fd177ac86e9cf1.tar.bz2
biboumi-bfcf29451787d10c747ad79cb3fd177ac86e9cf1.tar.xz
biboumi-bfcf29451787d10c747ad79cb3fd177ac86e9cf1.zip
Add the persistent_by_default configuration option
fix #3293
Diffstat (limited to 'src/database/database.cpp')
-rw-r--r--src/database/database.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/database/database.cpp b/src/database/database.cpp
index f706528..a2b88e2 100644
--- a/src/database/database.cpp
+++ b/src/database/database.cpp
@@ -6,6 +6,8 @@
#include <utils/get_first_non_empty.hpp>
#include <utils/time.hpp>
+#include <config/config.hpp>
+
#include <database/index.hpp>
#include <sqlite3.h>
@@ -18,6 +20,9 @@ Database::IrcChannelOptionsTable Database::irc_channel_options("IrcChannelOption
Database::RosterTable Database::roster("roster");
std::map<Database::CacheKey, Database::EncodingIn::real_type> Database::encoding_in_cache{};
+Database::GlobalPersistent::GlobalPersistent():
+ Column<bool>{Config::get_bool("persistent_by_default", false)}
+{}
void Database::open(const std::string& filename)
{