1
0
mirror of https://github.com/anope/anope.git synced 2026-06-12 19:14:47 +02:00

Prefix the special db_json columns with an @.

This commit is contained in:
Sadie Powell
2025-05-11 16:52:46 +01:00
parent 19f83eaa34
commit 41e702d853
2 changed files with 4 additions and 2 deletions
+2
View File
@@ -98,6 +98,8 @@ private:
Serialize::Type *s_type;
/* Iterator into serializable_items */
std::list<Serializable *>::iterator s_iter;
/** The time at which this object was first committed to the database. */
time_t first_commit = 0;
/* The hash of the last serialized form of this object committed to the database */
size_t last_commit = 0;
/* The last time this object was committed to the database */
+2 -2
View File
@@ -61,7 +61,7 @@ public:
continue;
Anope::string akey(yyjson_mut_get_str(key));
if (akey.equals_ci("id"))
if (akey.equals_ci("@id"))
{
this->id = yyjson_mut_get_uint(value);
continue;
@@ -354,7 +354,7 @@ public:
auto *elem = yyjson_mut_arr_add_obj(doc, type);
if (item->id)
yyjson_mut_obj_add_uint(doc, elem, "id", item->id);
yyjson_mut_obj_add_uint(doc, elem, "@id", item->id);
Data sd;
s_type->Serialize(item, sd);