Go to the documentation of this file.
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';
addFields( $value)
Add a set of fields to select to the internal array.
This is the main query class.
const PARAM_HELP_MSG
(string|array|Message) Specify an alternative i18n documentation message for this parameter.
const PARAM_TYPE
(string|string[]) Either an array of allowed value strings, or a string type as described below.
getResult()
Get the result object.
addOption( $name, $value=null)
Add an option such as LIMIT or USE INDEX.
const PARAM_MIN
(integer) Lowest value allowed for the parameter, for PARAM_TYPE 'integer' and 'limit'.
__construct(ApiQuery $query, $moduleName)
getHelpUrls()
Return links to more detailed help pages about the module.
This is a base class for all Query modules.
const LIMIT_BIG1
Fast query, standard limit.
getDB()
Get the Query database connection (read-only)
const PARAM_MAX
(integer) Max value allowed for the parameter, for PARAM_TYPE 'integer' and 'limit'.
addTables( $tables, $alias=null)
Add a set of tables to the internal array.
A query module to list used page props.
select( $method, $extraQuery=[], array &$hookData=null)
Execute a SELECT query based on the values in the internal arrays.
extractRequestParams( $options=[])
Using getAllowedParams(), this function makes an array of the values provided by the user,...
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.
dieContinueUsageIf( $condition)
Die with the 'badcontinue' error.
getExamplesMessages()
Returns usage examples for this module.
const LIMIT_BIG2
Fast query, apihighlimits limit.
const PARAM_DFLT
(null|boolean|integer|string) Default value of the parameter.
getModuleName()
Get the name of the module being executed by this instance.
const PARAM_MAX2
(integer) Max value allowed for the parameter for users with the apihighlimits right,...
getAllowedParams()
Returns an array of allowed parameters (parameter name) => (default value) or (parameter name) => (ar...
setContinueEnumParameter( $paramName, $paramValue)
Set a query-continue value.
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.