add a pppageprops param to prop=pageprops
Closed, ResolvedPublic

Description

It is possible to add a "pppageprops" param, which only list specified page props?. "Useful for checking whether a certain page uses a certain page prop."

Thanks.


Version: 1.18.x
Severity: enhancement

bzimport added a project: MediaWiki-API.Via ConduitNov 21 2014, 11:19 PM
bzimport set Reference to bz26480.
duplicatebug created this task.Via LegacyDec 29 2010, 8:35 PM
bzimport added a comment.Via ConduitDec 29 2010, 8:38 PM

Bryan.TongMinh wrote:

We would need to track somewhere which pageprops exist, which I don't really want to do. Or make it an unvalidated string param.

duplicatebug added a comment.Via ConduitDec 29 2010, 8:53 PM

In my opinion a "unvalidated string param" is enough.

duplicatebug added a comment.Via ConduitDec 29 2010, 9:14 PM

Maybe "Useful for checking whether a certain page *has* a certain page prop." is better, as description. Because a page has props and not use it.

Reedy added a comment.Via ConduitDec 30 2010, 1:00 AM

(In reply to comment #1)

We would need to track somewhere which pageprops exist, which I don't really
want to do. Or make it an unvalidated string param.

IIRC, didn't Soxred93 do something like that originally, which you reverted that part and cleaned up

(Don't take that as me disagreeing with what you did though! :))

bzimport added a comment.Via ConduitDec 30 2010, 10:11 AM

Bryan.TongMinh wrote:

Indeed

Reedy added a comment.Via ConduitJan 5 2011, 3:20 AM
  • Name/value pairs indexed by page_id

CREATE TABLE /*_*/page_props (

pp_page int NOT NULL,
pp_propname varbinary(60) NOT NULL,
pp_value blob NOT NULL

) /*$wgDBTableOptions*/\G

CREATE UNIQUE INDEX /*i*/pp_page_propname ON /*_*/page_props (pp_page,pp_propname)\G

Having already filtered by a page... Filtering by a propname afterwards, wouldn't to too expensive (thinking about if we left it as an unvalidated input string)

Reedy added a comment.Via ConduitJan 5 2011, 10:12 PM

r79675

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.