diff options
author | Sadie Powell <sadie@witchery.services> | 2024-08-14 02:40:48 +0100 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2024-08-14 05:47:55 +0100 |
commit | 528b5938ec71abed396248cf5e00f346e685aaea (patch) | |
tree | e923fed32be3fb62f946d44c633cd85ce855550b /src/memos.cpp | |
parent | 03bee1706383d2766923e5d8edbb90d7ad1948b6 (diff) |
Automatically determine SQL column type from the field.
Also add more column types to ensure we are storing data in the
best format in the database.
Diffstat (limited to 'src/memos.cpp')
-rw-r--r-- | src/memos.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/memos.cpp b/src/memos.cpp index 2e9f10db1..3aaded57d 100644 --- a/src/memos.cpp +++ b/src/memos.cpp @@ -36,12 +36,12 @@ Memo::~Memo() void Memo::Serialize(Serialize::Data &data) const { - data["owner"] << this->owner; - data.SetType("time", Serialize::Data::DT_INT); data["time"] << this->time; - data["sender"] << this->sender; - data["text"] << this->text; - data["unread"] << this->unread; - data["receipt"] << this->receipt; + data.Store("owner", this->owner); + data.Store("time", this->time); + data.Store("sender", this->sender); + data.Store("text", this->text); + data.Store("unread", this->unread); + data.Store("receipt", this->receipt); } Serializable *Memo::Unserialize(Serializable *obj, Serialize::Data &data) |