Page MenuHomePhabricator

Migrate usage of Database::select to SelectQueryBuilder in SecurePoll
Open, Needs TriagePublic

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 979120 had a related patch set uploaded (by Ladsgroup; author: Amir Sarabadani):

[mediawiki/extensions/SecurePoll@master] [WIP] Migrate to query builders and expression builders

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

Change 979120 abandoned by Ladsgroup:

[mediawiki/extensions/SecurePoll@master] [WIP] Migrate to query builders and expression builders

Reason:

It's way too big for one change and on top, it feels like putting a bowtie on a pig. The extension needs a full refactor how it's making db queries, they are all over the place.

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