Problem/Motivation

There are a lot of calls to db_query('SELECT COUNT(*) ...');.

Find for example just those in test code with find . -type f -name '*Test.php' -exec grep -Ei "QUERY.*COUNT.*\(\*\)" {} \+.

There's a better and more db abstract way to achieve the same with $injected_database->select(...)->countQuery()

Proposed resolution

Convert those to $injected_database->select(...)->countQuery() in test code. Followup of #2994904: Convert query('SELECT ... FROM {xxx}') to select('xxx')->... in tests for remaining tests.

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#4 interdiff_2-4.txt748 bytesmondrake
#4 3000016-4.patch28.47 KBmondrake
#2 3000016-2.patch28.46 KBmondrake

Comments

mondrake created an issue. See original summary.

mondrake’s picture

Status: Active » Needs review
StatusFileSize
new28.46 KB

Status: Needs review » Needs work

The last submitted patch, 2: 3000016-2.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

mondrake’s picture

Status: Needs work » Needs review
StatusFileSize
new28.47 KB
new748 bytes
mondrake’s picture

Status: Needs review » Closed (outdated)