Delete edges by primary key — the rebind pass's half of a re-resolution.
(edgeIds: number[])
| 5661 | |
| 5662 | /** Delete edges by primary key — the rebind pass's half of a re-resolution. */ |
| 5663 | deleteEdgesByIds(edgeIds: number[]): number { |
| 5664 | if (edgeIds.length === 0) return 0; |
| 5665 | let changed = 0; |
| 5666 | this.db.transaction(() => { |
| 5667 | for (let i = 0; i < edgeIds.length; i += SQLITE_PARAM_CHUNK_SIZE) { |
| 5668 | const chunk = edgeIds.slice(i, i + SQLITE_PARAM_CHUNK_SIZE); |
| 5669 | const placeholders = chunk.map(() => '?').join(','); |
| 5670 | changed += this.db.prepare(`DELETE FROM edges WHERE id IN (${placeholders})`).run(...chunk).changes; |
| 5671 | } |
| 5672 | })(); |
| 5673 | return changed; |
| 5674 | } |
| 5675 | |
| 5676 | /** |
| 5677 | * Replace resolution edges with their original unresolved references as one |
no test coverage detected