| hoo added a comment. |
In T151717#2871509, @Hall1467 wrote:I think a good way to go about this tracking would be by overriding the Lua direct access method for the table that represents the entity.
This can be done via an “__index” metamethod that would log statement usage (see this example of tracking: https://www.lua.org/pil/13.4.4.html). A “loggingtable” proxy object would access/track the actual object/table containing the entity. This should be a small change in modules using Wikidata.
This is very similar to what I already proposed in T76156: [Story] mw.wikibase: Use __index to lazy load entity contents, although mostly for performance reasons there.
TASK DETAIL
EMAIL PREFERENCES
To: hoo
Cc: TomT0m, Hall1467, hoo, zhuyifei1999, Eloquence, Lydia_Pintscher, Sannita, Ainali, Liuxinyu970226, MZMcBride, Ricordisamoa, Micru, jayvdb, Daniel_Mietchen, Tobi_WMDE_SW, Legoktm, Abraham, Wikidata-bugs, liangent, jeremyb, aude, Candalua, Bianjiang, Aklapper, DixonD, daniel, D3r1ck01, Izno, Mbch331
Cc: TomT0m, Hall1467, hoo, zhuyifei1999, Eloquence, Lydia_Pintscher, Sannita, Ainali, Liuxinyu970226, MZMcBride, Ricordisamoa, Micru, jayvdb, Daniel_Mietchen, Tobi_WMDE_SW, Legoktm, Abraham, Wikidata-bugs, liangent, jeremyb, aude, Candalua, Bianjiang, Aklapper, DixonD, daniel, D3r1ck01, Izno, Mbch331
_______________________________________________ Wikidata-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
