diff options
author | louiz’ <louiz@louiz.org> | 2017-06-16 09:52:40 +0200 |
---|---|---|
committer | louiz’ <louiz@louiz.org> | 2017-06-16 09:54:36 +0200 |
commit | 40db183e3753486deaa43e950fff38579c5ced6f (patch) | |
tree | 8adfbb7649034d3ddc3290b825968442e09cad00 /src/database/database.hpp | |
parent | 4a963cc480bb5a78e20380131ba886a7a23b0782 (diff) | |
download | biboumi-40db183e3753486deaa43e950fff38579c5ced6f.tar.gz biboumi-40db183e3753486deaa43e950fff38579c5ced6f.tar.bz2 biboumi-40db183e3753486deaa43e950fff38579c5ced6f.tar.xz biboumi-40db183e3753486deaa43e950fff38579c5ced6f.zip |
Using OptionalBool, add RecordHistoryOptional col into IrcChannelOptions table
ref #3269
Diffstat (limited to 'src/database/database.hpp')
-rw-r--r-- | src/database/database.hpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/database/database.hpp b/src/database/database.hpp index 1ad62fc..28b6b1b 100644 --- a/src/database/database.hpp +++ b/src/database/database.hpp @@ -7,6 +7,8 @@ #include <database/column.hpp> #include <database/count_query.hpp> +#include <utils/optional_bool.hpp> + #include <chrono> #include <string> @@ -82,6 +84,9 @@ class Database static constexpr auto options = ""; RecordHistory(): Column<bool>(true) {}}; + struct RecordHistoryOptional: Column<OptionalBool> { static constexpr auto name = "recordHistory_"; + static constexpr auto options = ""; }; + struct VerifyCert: Column<bool> { static constexpr auto name = "verifyCert_"; static constexpr auto options = ""; VerifyCert(): Column<bool>(true) {} }; @@ -99,7 +104,7 @@ class Database using IrcServerOptionsTable = Table<Id, Owner, Server, Pass, AfterConnectionCommand, TlsPorts, Ports, Username, Realname, VerifyCert, TrustedFingerprint, EncodingOut, EncodingIn, MaxHistoryLength>; using IrcServerOptions = IrcServerOptionsTable::RowType; - using IrcChannelOptionsTable = Table<Id, Owner, Server, Channel, EncodingOut, EncodingIn, MaxHistoryLength, Persistent>; + using IrcChannelOptionsTable = Table<Id, Owner, Server, Channel, EncodingOut, EncodingIn, MaxHistoryLength, Persistent, RecordHistoryOptional>; using IrcChannelOptions = IrcChannelOptionsTable::RowType; Database() = default; |