summaryrefslogtreecommitdiff
path: root/src/access.cpp
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2024-08-14 02:40:48 +0100
committerSadie Powell <sadie@witchery.services>2024-08-14 05:47:55 +0100
commit528b5938ec71abed396248cf5e00f346e685aaea (patch)
treee923fed32be3fb62f946d44c633cd85ce855550b /src/access.cpp
parent03bee1706383d2766923e5d8edbb90d7ad1948b6 (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/access.cpp')
-rw-r--r--src/access.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/access.cpp b/src/access.cpp
index f5d4d784b..95ecb5385 100644
--- a/src/access.cpp
+++ b/src/access.cpp
@@ -160,14 +160,14 @@ NickCore *ChanAccess::GetAccount() const
void ChanAccess::Serialize(Serialize::Data &data) const
{
- data["provider"] << this->provider->name;
- data["ci"] << this->ci->name;
- data["mask"] << this->Mask();
- data["creator"] << this->creator;
- data["description"] << this->description;
- data.SetType("last_seen", Serialize::Data::DT_INT); data["last_seen"] << this->last_seen;
- data.SetType("created", Serialize::Data::DT_INT); data["created"] << this->created;
- data["data"] << this->AccessSerialize();
+ data.Store("provider", this->provider->name);
+ data.Store("ci", this->ci->name);
+ data.Store("mask", this->Mask());
+ data.Store("creator", this->creator);
+ data.Store("description", this->description);
+ data.Store("last_seen", this->last_seen);
+ data.Store("created", this->created);
+ data.Store("data", this->AccessSerialize());
}
Serializable *ChanAccess::Unserialize(Serializable *obj, Serialize::Data &data)