Fix countArchived() loading all members into memory (Closes #201) #201

Merged
shahondin1624 merged 1 commits from fix/n-plus-one-queries-member-list into main 2026-04-29 19:17:36 +02:00
Owner

Replace in-memory filtering with a SQL COUNT(*) query in the mapper, matching the pattern of the existing countAll() method.

Changes

  • Added MemberMapper::countArchived() using SELECT COUNT(*) WHERE deleted_at IS NOT NULL
  • Updated MemberService::countArchived() to delegate to the new mapper method
  • Updated existing unit test and added new tests for the mapper method
Replace in-memory filtering with a SQL COUNT(*) query in the mapper, matching the pattern of the existing countAll() method. ## Changes - Added MemberMapper::countArchived() using SELECT COUNT(*) WHERE deleted_at IS NOT NULL - Updated MemberService::countArchived() to delegate to the new mapper method - Updated existing unit test and added new tests for the mapper method
shahondin1624 added the backendbug labels 2026-04-29 19:16:39 +02:00
shahondin1624 added 1 commit 2026-04-29 19:16:39 +02:00
Fix countArchived() loading all members into memory (Closes #201)
Database Portability Tests / Unit Tests (PlatformHelper) (pull_request) Failing after 38s
Database Portability Tests / Integration (mysql) (pull_request) Has been skipped
Database Portability Tests / Integration (postgres) (pull_request) Has been skipped
Database Portability Tests / Integration (sqlite) (pull_request) Has been skipped
Database Portability Tests / Verify no MySQL-specific SQL (pull_request) Successful in 5s
d4e25fe739
Replace in-memory filtering with a SQL COUNT(*) query in the mapper,
matching the pattern of the existing countAll() method.
shahondin1624 merged commit d28dcd4541 into main 2026-04-29 19:17:36 +02:00
Sign in to join this conversation.