[MINOR] Duplicate date detectie gebruikt LIKE string matching #13
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
eddy/weegschaal-app#13
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Probleem
src/database/db.ts:86-93:Dit gebruikt string matching (
LIKE '2024-01-15%') om metingen op dezelfde dag te vinden. Dit werkt voor ISO 8601 datums, maar is fragiel:LIKEzonder index is een full table scanOplossing
Gebruik SQLite's
date()functie voor semantische datumvergelijking:Dit is robuuster omdat
date()de datum extraheert ongeacht het tijdformaat.