* Swap the underlying connection in place. Used by pool workers' * connection recycling (plan §7a.6, writes-under-readers): a long-lived * read connection pins WAL checkpoint progress, and the deep WAL that * accumulates behind it taxes every main-thread B-tree page operation * (deletes
(db: SqliteDatabase)
| 603 | * lazily on next use. |
| 604 | */ |
| 605 | rebind(db: SqliteDatabase): void { |
| 606 | this.db = db; |
| 607 | this.stmts = {}; |
| 608 | this.batchStmts.clear(); |
| 609 | this.edgeKindStmts.clear(); |
| 610 | this.flowQueries = undefined; |
| 611 | // The change stamp is per connection, and fresh connections to two |
| 612 | // different databases report the same one — the memo goes with the old |
| 613 | // connection, or a worker following a rebuilt index keeps its answer (#1864). |
| 614 | this.dominantFileMemo = undefined; |
| 615 | this.readMemos.clear(); |
| 616 | this.presentSchema.clear(); |
| 617 | } |
| 618 | |
| 619 | /** |
| 620 | * Tables (`name`) and columns (`table.column`) that later migrations added, |
no test coverage detected