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 /include/extensible.h | |
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 'include/extensible.h')
-rw-r--r-- | include/extensible.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/include/extensible.h b/include/extensible.h index 7ff518516..f248e6db8 100644 --- a/include/extensible.h +++ b/include/extensible.h @@ -173,7 +173,7 @@ public: void ExtensibleSerialize(const Extensible *e, const Serializable *s, Serialize::Data &data) const override { T *t = this->Get(e); - data[this->name] << *t; + data.Store(this->name, *t); } void ExtensibleUnserialize(Extensible *e, Serializable *s, Serialize::Data &data) override @@ -194,8 +194,7 @@ public: void ExtensibleSerialize(const Extensible *e, const Serializable *s, Serialize::Data &data) const override { - data.SetType(this->name, Serialize::Data::DT_INT); - data[this->name] << true; + data.Store(this->name, true); } void ExtensibleUnserialize(Extensible *e, Serializable *s, Serialize::Data &data) override |