* 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
()
| 2064 | * sweep or the `status` pending-refs warning. |
| 2065 | */ |
| 2066 | getUnresolvedReferencesCount(): number { |
| 2067 | if (!this.stmts.getUnresolvedCount) { |
| 2068 | this.stmts.getUnresolvedCount = this.db.prepare( |
| 2069 | "SELECT COUNT(*) as count FROM unresolved_refs WHERE status = 'pending'" |
| 2070 | ); |
| 2071 | } |
| 2072 | const row = this.stmts.getUnresolvedCount.get() as { count: number }; |
| 2073 | return row.count; |
| 2074 | } |
| 2075 | |
| 2076 | /** |
| 2077 | * Get a batch of PENDING unresolved references using LIMIT/OFFSET |
no test coverage detected