Page MenuHomePhabricator

Migrate usage of Database::select to SelectQueryBuilder in Linter
Closed, ResolvedPublic

Description

Now that T243051: A query builder for MediaWiki core is done, this extension should migrate away from IDatabase::select() to SelectQueryBuilder.

It would improve readability of the code, avoids mistakes by passing the wrong order of arguments, etc.

For more information check T243051 and its documentation.

Note that query builder is a different paradigm and changes should not be one-to-one. For example, avoid using joinConds().

Event Timeline

This change appears to have been completed.
Cannot find references to Database::select(

Ah I see, will look at fixing all of these. Seems like there could be minor risk of breaking something so will test carefully.

Change 895369 had a related patch set uploaded (by Sbailey; author: Sbailey):

[mediawiki/extensions/Linter@master] WIP Replacing direct use of select or selectRow with QueryBuilder

https://gerrit.wikimedia.org/r/895369

Change 895369 merged by jenkins-bot:

[mediawiki/extensions/Linter@master] Replace use of select or selectRow with QueryBuilder

https://gerrit.wikimedia.org/r/895369