Page MenuHomePhabricator

Migrate usage of Database::select to SelectQueryBuilder in CirrusSearch
Closed, ResolvedPublic3 Estimated Story Points

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

Change 818066 had a related patch set uploaded (by EJoseph; author: EJoseph):

[mediawiki/extensions/CirrusSearch@master] Migrate usage of Database::select to SelectQueryBuilder

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

Change 818066 merged by jenkins-bot:

[mediawiki/extensions/CirrusSearch@master] Migrate usage of Database::select to SelectQueryBuilder

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

Change 819746 had a related patch set uploaded (by Zabe; author: Zabe):

[mediawiki/extensions/CirrusSearch@master] Fix appending of join conds

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

Change 819621 had a related patch set uploaded (by Ladsgroup; author: Zabe):

[mediawiki/extensions/CirrusSearch@wmf/1.39.0-wmf.23] Fix appending of join conds

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

Change 819621 merged by jenkins-bot:

[mediawiki/extensions/CirrusSearch@wmf/1.39.0-wmf.23] Fix appending of join conds

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

Mentioned in SAL (#wikimedia-operations) [2022-08-02T21:29:13Z] <ladsgroup@deploy1002> Synchronized php-1.39.0-wmf.23/extensions/CirrusSearch/includes/Sanity/Checker.php: Backport: [[gerrit:819621|Fix appending of join conds (T312421 T314439)]] (duration: 03m 15s)

Change 819746 merged by jenkins-bot:

[mediawiki/extensions/CirrusSearch@master] Fix appending of join conds

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

Change #1025471 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/extensions/CirrusSearch@master] Migrate to IReadableDatabase::newSelectQueryBuilder

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

Change #1025471 merged by jenkins-bot:

[mediawiki/extensions/CirrusSearch@master] Migrate to IReadableDatabase::newSelectQueryBuilder

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