From 3a8c95123e08cd92a34dd3fddecb8895057d12d9 Mon Sep 17 00:00:00 2001 From: laurenspriem Date: Wed, 10 Sep 2025 17:42:31 +0530 Subject: [PATCH] Add database method best practice guideline Co-Authored-By: Claude --- mobile/apps/photos/CLAUDE.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mobile/apps/photos/CLAUDE.md b/mobile/apps/photos/CLAUDE.md index 7207e65932..5c58b7e27e 100644 --- a/mobile/apps/photos/CLAUDE.md +++ b/mobile/apps/photos/CLAUDE.md @@ -196,6 +196,10 @@ lib/ - Ensure documentation reflects the current implementation - Update examples in specs if behavior changes +### 5. Database Methods - BEST PRACTICE +**Write database methods with simple SQL queries and filter in Dart for readability** +- Keep SQL queries simple and fetch all relevant data, then filter in Dart code rather than complex WHERE clauses + ## Important Notes - Large service files (some 70k+ lines) - consider file context when editing