From 528b5938ec71abed396248cf5e00f346e685aaea Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Wed, 14 Aug 2024 02:40:48 +0100 Subject: 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. --- modules/chanserv/cs_log.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'modules/chanserv/cs_log.cpp') diff --git a/modules/chanserv/cs_log.cpp b/modules/chanserv/cs_log.cpp index defd38287..e06d3d42b 100644 --- a/modules/chanserv/cs_log.cpp +++ b/modules/chanserv/cs_log.cpp @@ -37,14 +37,14 @@ struct LogSettingImpl final void Serialize(Serialize::Data &data) const override { - data["ci"] << chan; - data["service_name"] << service_name; - data["command_service"] << command_service; - data["command_name"] << command_name; - data["method"] << method; - data["extra"] << extra; - data["creator"] << creator; - data.SetType("created", Serialize::Data::DT_INT); data["created"] << created; + data.Store("ci", chan); + data.Store("service_name", service_name); + data.Store("command_service", command_service); + data.Store("command_name", command_name); + data.Store("method", method); + data.Store("extra", extra); + data.Store("creator", creator); + data.Store("created", created); } static Serializable *Unserialize(Serializable *obj, Serialize::Data &data) -- cgit