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:
@@ -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 */
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user