* Get the count of PENDING (never-attempted) references without loading * them into memory. Rows marked status='failed' — attempted by a completed * pass, no match — are excluded: they are not outstanding work, only retry * candidates for the #1240 sweep, so they must not trip the #1187 orp
()
| 2316 | * sweep or the `status` pending-refs warning. |
| 2317 | */ |
| 2318 | getUnresolvedReferencesCount(): number { |
| 2319 | if (!this.stmts.getUnresolvedCount) { |
| 2320 | this.stmts.getUnresolvedCount = this.db.prepare( |
| 2321 | "SELECT COUNT(*) as count FROM unresolved_refs WHERE status = 'pending'" |
| 2322 | ); |
| 2323 | } |
| 2324 | const row = this.stmts.getUnresolvedCount.get() as { count: number }; |
| 2325 | return row.count; |
| 2326 | } |
| 2327 | |
| 2328 | /** |
| 2329 | * Get a batch of PENDING unresolved references using LIMIT/OFFSET |
no test coverage detected