36 parent::__construct( $query, $moduleName,
'ppn' );
49 $this->
addOption(
'ORDER BY',
'pp_propname' );
51 if ( $params[
'continue'] ) {
54 $this->
addWhereRange(
'pp_propname',
'newer', $cont[0],
null );
57 $limit = $params[
'limit'];
60 if ( $this->
getDB()->getType() !==
'mysql' ) {
66 foreach ( $this->
select( __METHOD__ ) as $row ) {
67 if ( ++$count > $limit ) {
75 $vals[
'propname'] = $row->pp_propname;
76 $fit = $result->addValue( [
'query', $this->
getModuleName() ],
null, $vals );
83 $result->addIndexedTagName( [
'query', $this->
getModuleName() ],
'p' );
92 ParamValidator::PARAM_TYPE =>
'limit',
93 ParamValidator::PARAM_DEFAULT => 10,
94 IntegerDef::PARAM_MIN => 1,
103 'action=query&list=pagepropnames'
104 =>
'apihelp-query+pagepropnames-example-simple',
109 return 'https://www.mediawiki.org/wiki/Special:MyLanguage/API:Pagepropnames';
parseContinueParamOrDie(string $continue, array $types)
Parse the 'continue' parameter in the usual format and validate the types of each part,...
const LIMIT_BIG1
Fast query, standard limit.
getResult()
Get the result object.
extractRequestParams( $options=[])
Using getAllowedParams(), this function makes an array of the values provided by the user,...
const PARAM_HELP_MSG
(string|array|Message) Specify an alternative i18n documentation message for this parameter.
const LIMIT_BIG2
Fast query, apihighlimits limit.
getModuleName()
Get the name of the module being executed by this instance.
This is a base class for all Query modules.
setContinueEnumParameter( $paramName, $paramValue)
Set a query-continue value.
addWhereRange( $field, $dir, $start, $end, $sort=true)
Add a WHERE clause corresponding to a range, and an ORDER BY clause to sort in the right direction.
addFields( $value)
Add a set of fields to select to the internal array.
addOption( $name, $value=null)
Add an option such as LIMIT or USE INDEX.
addTables( $tables, $alias=null)
Add a set of tables to the internal array.
getDB()
Get the Query database connection (read-only)
select( $method, $extraQuery=[], array &$hookData=null)
Execute a SELECT query based on the values in the internal arrays.
A query module to list used page props.
__construct(ApiQuery $query, $moduleName)
getExamplesMessages()
Returns usage examples for this module.
getAllowedParams()
Returns an array of allowed parameters (parameter name) => (default value) or (parameter name) => (ar...
getHelpUrls()
Return links to more detailed help pages about the module.
execute()
Evaluates the parameters, performs the requested query, and sets up the result.
getCacheMode( $params)
Get the cache mode for the data generated by this module.
This is the main query class.