Delete edges by primary key — the rebind pass's half of a re-resolution.
(edgeIds: number[])
| 5550 | |
| 5551 | /** Delete edges by primary key — the rebind pass's half of a re-resolution. */ |
| 5552 | deleteEdgesByIds(edgeIds: number[]): number { |
| 5553 | if (edgeIds.length === 0) return 0; |
| 5554 | let changed = 0; |
| 5555 | this.db.transaction(() => { |
| 5556 | for (let i = 0; i < edgeIds.length; i += SQLITE_PARAM_CHUNK_SIZE) { |
| 5557 | const chunk = edgeIds.slice(i, i + SQLITE_PARAM_CHUNK_SIZE); |
| 5558 | const placeholders = chunk.map(() => '?').join(','); |
| 5559 | changed += this.db.prepare(`DELETE FROM edges WHERE id IN (${placeholders})`).run(...chunk).changes; |
| 5560 | } |
| 5561 | })(); |
| 5562 | return changed; |
| 5563 | } |
| 5564 | |
| 5565 | /** |
| 5566 | * Replace resolution edges with their original unresolved references as one |
no test coverage detected