LATEST_DAW_SCAN_ID_SQL

Constant LATEST_DAW_SCAN_ID_SQL 

Source
const LATEST_DAW_SCAN_ID_SQL: &str = "\
    SELECT s.id FROM daw_scans s \
    WHERE s.scan_complete = 1 \
    AND EXISTS (SELECT 1 FROM daw_projects p WHERE p.scan_id = s.id) \
    ORDER BY s.timestamp DESC LIMIT 1";
Expand description

Latest complete DAW scan that has at least one daw_projects row. Empty scans remain in history but must not shadow prior results. Uses child-row presence (not project_count) so streaming scans still resolve after finalize quirks.