Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Add database method best practice guideline

laurenspriem3a8c95123e08
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