hoo created this task.
hoo added projects: MediaWiki-extensions-WikibaseClient, Wikidata.

TASK DESCRIPTION

If one wants to access the raw statements from a certain Entity in Lua right now, they need to load the whole entity (mw.wikibase.getEntity). This poses two main problems: a) The whole entity needs to be serialized for Lua and b) we can't (without rather nasty hacks) tell which Statement(s) have been used.

Getting this new function in place will fix the aforementioned problems and also allow us to use more efficient storage mechanisms for loading individual Statements later on (so that the backend also doesn't need to load the full entity).

I propose:
mw.wikibase.getStatements( 'entity id', 'property id of statements to load' ). It returns a table like a call to mw.wikibase.getEntity( 'entity id' ):getBestStatements( 'property id of statements to load' ) would.

This new functionality should track statement usages (C.P123), but for now also other usages (O).


TASK DETAIL
https://phabricator.wikimedia.org/T172905

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: eranroz, hoo
Cc: Aklapper, daniel, Lydia_Pintscher, aude, Liuxinyu970226, CennoxX, Danmichaelo, Scott_WUaS, Ltrlg, Oliv0, Izno, eranroz, IKhitron, PokestarFan, Doc_James, hoo, GoranSMilovanovic, QZanden, Wikidata-bugs, Mbch331
_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to