33 parent::__construct( $query, $moduleName,
'ppn' );
46 $this->
addOption(
'ORDER BY',
'pp_propname' );
48 if ( $params[
'continue'] ) {
49 $cont = explode(
'|', $params[
'continue'] );
53 $this->
addWhereRange(
'pp_propname',
'newer', $cont[0],
null );
56 $limit = $params[
'limit'];
59 if ( $this->
getDB()->getType() !==
'mysql' ) {
65 foreach ( $this->
select( __METHOD__ ) as $row ) {
66 if ( ++$count > $limit ) {
74 $vals[
'propname'] = $row->pp_propname;
75 $fit = $result->addValue( [
'query', $this->
getModuleName() ],
null, $vals );
82 $result->addIndexedTagName( [
'query', $this->
getModuleName() ],
'p' );
102 'action=query&list=pagepropnames'
103 =>
'apihelp-query+pagepropnames-example-simple',
108 return 'https://www.mediawiki.org/wiki/Special:MyLanguage/API:Pagepropnames';
const PARAM_MAX2
(integer) Max value allowed for the parameter for users with the apihighlimits right,...
const PARAM_MAX
(integer) Max value allowed for the parameter, for PARAM_TYPE 'integer' and 'limit'.
dieContinueUsageIf( $condition)
Die with the 'badcontinue' error.
const PARAM_TYPE
(string|string[]) Either an array of allowed value strings, or a string type as described below.
const PARAM_DFLT
(null|boolean|integer|string) Default value of the parameter.
const PARAM_MIN
(integer) Lowest value allowed for the parameter, for PARAM_TYPE 'integer' and 'limit'.
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.