Add SQL helper utilities and migrate queries
This commit is contained in:
parent
d8ecf5f607
commit
fa68916d3e
2 changed files with 218 additions and 136 deletions
|
@ -113,6 +113,7 @@ CREATE INDEX idx_artists_name_nocase ON artists(name COLLATE NOCASE);
|
|||
- `createAsyncListState` – Manages loading, error, and empty states for async lists.
|
||||
- `prepareForView` – Wraps `db.prepare` to attach view/label metadata for logging.
|
||||
- `normalizePaginationState` / `clampPaginationToTotal` – Normalizes and clamps pagination inputs while emitting DEBUG telemetry.
|
||||
- `sqlValue`, `sqlLike`, `sqlIdentifier`, and the `sql` template tag – central helpers for manual SQL construction; always use these when interpolating dynamic values.
|
||||
|
||||
## Debugging & Logging
|
||||
- Runtime diagnostics are gated behind a localStorage flag. Enable with `localStorage.setItem('mp3com.debug', 'true')` (or `'false'`/`removeItem` to disable) before reloading the app.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue