Deduplicate count_search and bind_filters logic #4

Open
opened 2026-07-25 11:17:18 +00:00 by GKaszewski · 0 comments
Owner

Severity: Medium

In crates/adapters/postgres/src/catalog/mod.rs, the count_search method manually re-binds all filter parameters instead of reusing the bind_filters helper function that exists right above it.

The duplication is ~15 lines and a maintenance hazard — if a new filter is added to bind_filters but not to count_search, they'll diverge silently.

**Severity: Medium** In `crates/adapters/postgres/src/catalog/mod.rs`, the `count_search` method manually re-binds all filter parameters instead of reusing the `bind_filters` helper function that exists right above it. The duplication is ~15 lines and a maintenance hazard — if a new filter is added to `bind_filters` but not to `count_search`, they'll diverge silently.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: GKaszewski/k-photos#4