@quereus/isolation 4.3.2 → 4.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -1
- package/dist/src/flush.d.ts.map +1 -1
- package/dist/src/flush.js +16 -3
- package/dist/src/flush.js.map +1 -1
- package/dist/src/isolated-table.d.ts +16 -4
- package/dist/src/isolated-table.d.ts.map +1 -1
- package/dist/src/isolated-table.js +121 -53
- package/dist/src/isolated-table.js.map +1 -1
- package/dist/src/isolation-module.d.ts +341 -110
- package/dist/src/isolation-module.d.ts.map +1 -1
- package/dist/src/isolation-module.js +645 -274
- package/dist/src/isolation-module.js.map +1 -1
- package/dist/src/overlay-rows.d.ts +10 -1
- package/dist/src/overlay-rows.d.ts.map +1 -1
- package/dist/src/overlay-rows.js +16 -3
- package/dist/src/overlay-rows.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Database, VirtualTableModule, BaseModuleConfig, TableSchema, TableIndexSchema as IndexSchema, ModuleCapabilities, VirtualTable, BestAccessPlanRequest, BestAccessPlanResult, SchemaChangeInfo, Schema, MappingAdvertisement, LensDeploymentSnapshot, VtabConcurrencyMode, VirtualTableConnection, BackingHost, EffectiveRowSource } from '@quereus/quereus';
|
|
1
|
+
import type { Database, VirtualTableModule, BaseModuleConfig, TableSchema, TableIndexSchema as IndexSchema, ModuleCapabilities, VirtualTable, BestAccessPlanRequest, BestAccessPlanResult, SchemaChangeInfo, Schema, MappingAdvertisement, LensDeploymentSnapshot, VtabConcurrencyMode, VirtualTableConnection, BackingHost, EffectiveRowSource, CatalogObjectKind, ViewSchema } from '@quereus/quereus';
|
|
2
2
|
import type { IsolationModuleConfig } from './isolation-types.js';
|
|
3
3
|
import { IsolatedTable } from './isolated-table.js';
|
|
4
4
|
/**
|
|
@@ -40,9 +40,10 @@ export interface ConnectionOverlayState {
|
|
|
40
40
|
* table on ANY discard path, including {@link IsolationModule.destroy} and
|
|
41
41
|
* {@link IsolationModule.closeAll}, which sweep overlays across multiple db ids
|
|
42
42
|
* and so have no single ambient `db` to hand the overlay module's `destroy`.
|
|
43
|
-
* Set at every real creation site (`ensureOverlay`, the
|
|
44
|
-
*
|
|
45
|
-
* `
|
|
43
|
+
* Set at every real creation site (`ensureOverlay`, and the ALTER PRIMARY KEY
|
|
44
|
+
* clean-overlay swap in `replaceOverlayForPrimaryKeyChange`); the default
|
|
45
|
+
* `MemoryTableModule` overlay ignores it, but a host-injected `config.overlay`
|
|
46
|
+
* keyed per-db needs the overlay's OWN db, not the sweeper's.
|
|
46
47
|
*/
|
|
47
48
|
db: Database;
|
|
48
49
|
/**
|
|
@@ -408,6 +409,18 @@ export declare class IsolationModule implements VirtualTableModule<IsolatedTable
|
|
|
408
409
|
* basis module would silently never hear the deployment.
|
|
409
410
|
*/
|
|
410
411
|
notifyLensDeployment(db: Database, logicalSchemaName: string, snapshot: LensDeploymentSnapshot): Promise<void>;
|
|
412
|
+
/**
|
|
413
|
+
* Forwards the view / materialized-view catalog-persistability veto to the underlying
|
|
414
|
+
* module.
|
|
415
|
+
*
|
|
416
|
+
* `allModules()` yields the REGISTERED module, which is this wrapper when a store is
|
|
417
|
+
* isolated — so without this forward an isolation-wrapped store would never be
|
|
418
|
+
* consulted and would keep the silent-drop bug (a view it cannot persist creates
|
|
419
|
+
* "successfully" and vanishes on reopen). Whether a catalog entry is encodable is a
|
|
420
|
+
* property of the definition text, not of the overlay, so a straight delegate is
|
|
421
|
+
* correct; the throw must propagate (that is the entire point of the hook).
|
|
422
|
+
*/
|
|
423
|
+
assertCatalogObjectPersistable(db: Database, kind: CatalogObjectKind, object: ViewSchema | TableSchema): void;
|
|
411
424
|
/**
|
|
412
425
|
* Delegates access plan selection to the underlying module.
|
|
413
426
|
* This ensures the query planner knows about indexes and can generate
|
|
@@ -484,40 +497,22 @@ export declare class IsolationModule implements VirtualTableModule<IsolatedTable
|
|
|
484
497
|
*/
|
|
485
498
|
destroy(db: Database, pAux: unknown, moduleName: string, schemaName: string, tableName: string): Promise<void>;
|
|
486
499
|
/**
|
|
487
|
-
*
|
|
488
|
-
*
|
|
489
|
-
*
|
|
490
|
-
*
|
|
491
|
-
*
|
|
492
|
-
*
|
|
493
|
-
*
|
|
494
|
-
*
|
|
495
|
-
* which must roll back).
|
|
500
|
+
* The INTERNAL raised when the DDL-ISSUING connection's own overlay rejects the change the
|
|
501
|
+
* DDL just made (routed through {@link applyInPlaceOverlayChange} by the index paths and
|
|
502
|
+
* every ALTER TABLE forward).
|
|
503
|
+
*
|
|
504
|
+
* Unreachable by construction: the row source handed to the underlying (see
|
|
505
|
+
* {@link issuerEffectiveRows}) judged a superset of exactly these rows and accepted them,
|
|
506
|
+
* so a rejection here means validation and migration have drifted. Raise loudly — the
|
|
507
|
+
* alternative is the silent row loss these guards exist to end.
|
|
496
508
|
*/
|
|
497
|
-
private
|
|
509
|
+
private issuerOverlayDriftError;
|
|
498
510
|
/**
|
|
499
|
-
*
|
|
500
|
-
*
|
|
501
|
-
*
|
|
502
|
-
*
|
|
503
|
-
*
|
|
504
|
-
* them, so a rejection here means validation and migration have drifted. Raise INTERNAL —
|
|
505
|
-
* loudly, because the alternative is the silent row loss this guard exists to end.
|
|
506
|
-
* - **A foreign connection.** Reachable and legitimate: its staged rows may violate a
|
|
507
|
-
* constraint another connection just declared. Poison that overlay and leave it
|
|
508
|
-
* unmigrated, so its owner errors on its next read/write/commit and rolls back. The
|
|
509
|
-
* issuer's DDL proceeds. Mirrors the tier-3 NOT NULL handling in {@link alterTable}.
|
|
510
|
-
*
|
|
511
|
-
* A rebuild that throws leaves the OLD overlay installed either way — the new table is
|
|
512
|
-
* simply discarded.
|
|
513
|
-
*/
|
|
514
|
-
private adoptRebuiltOverlay;
|
|
515
|
-
/**
|
|
516
|
-
* Builds the poison message stamped onto a foreign overlay whose staged rows cannot be
|
|
517
|
-
* migrated under a constraint another connection's DDL just declared (see
|
|
518
|
-
* {@link adoptRebuiltOverlay}). Companion to {@link buildAlterPoisonMessage}, which covers
|
|
519
|
-
* the `addColumn` NOT NULL backfill rejected before the underlying is touched; this one
|
|
520
|
-
* covers a UNIQUE (or any other) violation raised by the rebuild itself.
|
|
511
|
+
* Builds the poison message stamped onto a foreign overlay whose staged rows cannot adopt
|
|
512
|
+
* a constraint another connection's DDL just declared (see
|
|
513
|
+
* {@link applyInPlaceOverlayChange}). Companion to {@link buildAlterPoisonMessage}, which
|
|
514
|
+
* covers the data conditions the pre-validation pass rejects before any overlay is touched;
|
|
515
|
+
* this one covers a UNIQUE (or any other) violation raised by the in-place adoption itself.
|
|
521
516
|
*/
|
|
522
517
|
private buildRebuildPoisonMessage;
|
|
523
518
|
/**
|
|
@@ -561,9 +556,9 @@ export declare class IsolationModule implements VirtualTableModule<IsolatedTable
|
|
|
561
556
|
*/
|
|
562
557
|
private issuerEffectiveRows;
|
|
563
558
|
/**
|
|
564
|
-
* Creates an index on the underlying table, then
|
|
565
|
-
*
|
|
566
|
-
* the rest of each open transaction.
|
|
559
|
+
* Creates an index on the underlying table, then hands the same index to every
|
|
560
|
+
* per-connection overlay so it (and, for a UNIQUE index, the constraint derived from it)
|
|
561
|
+
* is enforced for the rest of each open transaction.
|
|
567
562
|
*
|
|
568
563
|
* Two things the underlying cannot do for itself:
|
|
569
564
|
*
|
|
@@ -575,14 +570,29 @@ export declare class IsolationModule implements VirtualTableModule<IsolatedTable
|
|
|
575
570
|
* 2. **Enforce the new constraint.** An overlay built before the index knows nothing of it,
|
|
576
571
|
* and `IsolatedTable.findMergedUniqueConflict` only scans the underlying — so a pending
|
|
577
572
|
* row colliding with another pending row is nobody's job until the overlay itself carries
|
|
578
|
-
* the index.
|
|
579
|
-
*
|
|
573
|
+
* the index. Forwarding is also what gives a merged secondary-index scan later in the
|
|
574
|
+
* transaction an overlay that can serve it.
|
|
580
575
|
*
|
|
581
576
|
* We use the stored table instance's createIndex() rather than the module-level method so
|
|
582
577
|
* that the MemoryTable's local tableSchema property stays in sync. That property is what
|
|
583
578
|
* ensureOverlay() reads when building the overlay schema.
|
|
584
579
|
*/
|
|
585
580
|
createIndex(db: Database, schemaName: string, tableName: string, indexSchema: IndexSchema, rows?: EffectiveRowSource): Promise<void>;
|
|
581
|
+
/**
|
|
582
|
+
* Adds one index to an already-open overlay, in the overlay's own flavor (predicate
|
|
583
|
+
* narrowed to live rows and rescoped onto the overlay's table name — see
|
|
584
|
+
* {@link createOverlayIndexSchema}).
|
|
585
|
+
*
|
|
586
|
+
* A UNIQUE index the overlay's staged rows violate raises `CONSTRAINT` out of
|
|
587
|
+
* `MemoryTableManager.createIndex`'s pre-validation pass, which
|
|
588
|
+
* {@link applyIndexChangeToOverlays} routes to INTERNAL (issuer) or poison (foreign).
|
|
589
|
+
* The pass runs before any mutation, so a rejected overlay is left exactly as it was.
|
|
590
|
+
*
|
|
591
|
+
* No-ops when the overlay module has no index support, or when the overlay already
|
|
592
|
+
* carries an index of that name (an overlay built after the underlying's create already
|
|
593
|
+
* copied it in through {@link createOverlaySchema}).
|
|
594
|
+
*/
|
|
595
|
+
private createOverlayIndex;
|
|
586
596
|
/**
|
|
587
597
|
* Reads back the underlying table instance's post-`createIndex` schema, asserting it now
|
|
588
598
|
* carries the new index.
|
|
@@ -594,64 +604,97 @@ export declare class IsolationModule implements VirtualTableModule<IsolatedTable
|
|
|
594
604
|
* schema, re-opening the very hole this method exists to close — so assert rather than assume.
|
|
595
605
|
*/
|
|
596
606
|
private assertIndexPresent;
|
|
607
|
+
/** Case-insensitive "does `schema` declare an index named `indexName`". */
|
|
608
|
+
private schemaHasIndex;
|
|
597
609
|
/**
|
|
598
|
-
* Drops an index on the underlying table.
|
|
610
|
+
* Drops an index on the underlying table, then drops it from every per-connection overlay.
|
|
599
611
|
*
|
|
600
612
|
* Mirrors createIndex: when the underlying VirtualTable exposes an
|
|
601
613
|
* instance-level dropIndex (e.g. MemoryTable, which forwards to its manager
|
|
602
614
|
* so MemoryTable.tableSchema stays fresh), prefer that. Otherwise fall back
|
|
603
615
|
* to the module-level dropIndex (e.g. StoreModule, which refreshes the
|
|
604
616
|
* StoreTable's cached tableSchema and tears down the index store).
|
|
605
|
-
*
|
|
606
|
-
* Any per-connection overlay that already exists for this table is
|
|
607
|
-
* rebuilt under the post-drop schema, preserving staged rows. A bare
|
|
608
|
-
* forward to `overlay.dropIndex` is insufficient: when the overlay's
|
|
609
|
-
* MemoryTable has an active write `TransactionLayer`, its
|
|
610
|
-
* `tableSchemaAtCreation` is frozen at layer-creation time, so the
|
|
611
|
-
* synthesized UNIQUE constraint keeps firing inside the overlay's
|
|
612
|
-
* own UC check on the next write even after the manager's schema is
|
|
613
|
-
* refreshed. Rebuilding gives the new MemoryTable a fresh
|
|
614
|
-
* transaction layer that captures the post-drop schema. Overlays
|
|
615
|
-
* created AFTER this point inherit the post-drop schema from the
|
|
616
|
-
* underlying at ensureOverlay time.
|
|
617
617
|
*/
|
|
618
618
|
dropIndex(db: Database, schemaName: string, tableName: string, indexName: string): Promise<void>;
|
|
619
619
|
/**
|
|
620
|
-
*
|
|
621
|
-
*
|
|
622
|
-
*
|
|
623
|
-
* identical either way, so staged rows copy verbatim.
|
|
624
|
-
*
|
|
625
|
-
* A poisoned overlay (from a cross-connection ALTER, or a DROP TABLE) holds rows in the
|
|
626
|
-
* pre-alter column layout, narrower/wider than `updatedSchema`. Rebuilding it would copy
|
|
627
|
-
* layout-mismatched rows AND drop the poison flag (the new state carries none), silently
|
|
628
|
-
* un-poisoning a connection that must still roll back. Leave it as-is.
|
|
620
|
+
* Drops one index (and the UNIQUE constraint derived from it) from an already-open
|
|
621
|
+
* overlay. No-ops when the overlay module has no index support, or when the overlay never
|
|
622
|
+
* carried the index.
|
|
629
623
|
*/
|
|
630
|
-
private
|
|
624
|
+
private dropOverlayIndex;
|
|
631
625
|
/**
|
|
632
|
-
*
|
|
633
|
-
*
|
|
634
|
-
*
|
|
635
|
-
*
|
|
626
|
+
* Applies an index change (CREATE INDEX or DROP INDEX) IN PLACE to every non-poisoned
|
|
627
|
+
* per-connection overlay of one table.
|
|
628
|
+
*
|
|
629
|
+
* In place, not by rebuild. Both paths used to discard the overlay and copy its staged
|
|
630
|
+
* rows into a fresh `MemoryTable`, which silently destroyed the overlay's savepoint chain:
|
|
631
|
+
* the copy's first write lazily registers the new overlay's connection, and
|
|
632
|
+
* `Database.registerConnection` replays `begin()` plus the whole active savepoint stack
|
|
633
|
+
* BEFORE the copy runs — so every copied row landed ABOVE the replayed savepoint and the
|
|
634
|
+
* next `rollback to savepoint` discarded rows staged long before that savepoint was taken
|
|
635
|
+
* (`bug-isolation-index-ddl-rebuild-drops-savepoint-writes`).
|
|
636
|
+
*
|
|
637
|
+
* The rebuild was originally forced by a memory-module limitation — an open write
|
|
638
|
+
* `TransactionLayer` froze its schema at creation, so a bare `overlay.dropIndex` left the
|
|
639
|
+
* synthesized UNIQUE constraint firing inside the layer. `TransactionLayer.adoptSchema`
|
|
640
|
+
* now has both an additive and a removal branch, and `MemoryTableManager` calls it for
|
|
641
|
+
* both index directions, so an open layer adopts the change with its savepoint snapshots
|
|
642
|
+
* intact.
|
|
643
|
+
*
|
|
644
|
+
* CONSTRAINT is routed by who owns the overlay via {@link applyInPlaceOverlayChange},
|
|
645
|
+
* shared with every ALTER TABLE forward.
|
|
646
|
+
*
|
|
647
|
+
* A poisoned overlay is skipped: it holds rows in a pre-ALTER column layout and its owner
|
|
648
|
+
* must roll back regardless, so there is nothing to keep enforcing for it.
|
|
636
649
|
*/
|
|
637
|
-
private
|
|
650
|
+
private applyIndexChangeToOverlays;
|
|
638
651
|
/**
|
|
639
|
-
*
|
|
652
|
+
* Applies one in-place DDL mutation to a single overlay, routing a CONSTRAINT failure
|
|
653
|
+
* by who owns the overlay: the issuer's own overlay → INTERNAL (its rows were already
|
|
654
|
+
* judged by the DDL's own validation pass, so a rejection here means validation and
|
|
655
|
+
* migration have drifted — {@link issuerOverlayDriftError}); a foreign overlay →
|
|
656
|
+
* poison and leave it untouched so its owner errors and rolls back
|
|
657
|
+
* ({@link buildRebuildPoisonMessage}). Any non-CONSTRAINT failure is a layer-invariant
|
|
658
|
+
* violation, not a data condition, and rethrows for everyone.
|
|
659
|
+
*
|
|
660
|
+
* Shared by the index paths ({@link applyIndexChangeToOverlays}) and the ALTER TABLE
|
|
661
|
+
* column-shape forwards ({@link alterTable}), so the two cannot drift on error routing.
|
|
662
|
+
*/
|
|
663
|
+
private applyInPlaceOverlayChange;
|
|
664
|
+
/**
|
|
665
|
+
* Delegates ALTER TABLE to the underlying module and carries any per-connection
|
|
640
666
|
* overlays to the post-alter schema without discarding staged rows.
|
|
641
667
|
*
|
|
642
|
-
*
|
|
643
|
-
*
|
|
644
|
-
*
|
|
645
|
-
*
|
|
646
|
-
*
|
|
668
|
+
* Every change type forwards to each overlay IN PLACE — through the overlay's own
|
|
669
|
+
* `alterSchema` / `createIndex` / ordinary writes — so the overlay's layer chain and
|
|
670
|
+
* savepoint snapshots survive the ALTER and `rollback to savepoint` keeps
|
|
671
|
+
* distinguishing rows staged before the savepoint from rows staged after it (see
|
|
672
|
+
* {@link applyIndexChangeToOverlays} for why the old rebuild — copying staged rows
|
|
673
|
+
* into a fresh staging table — destroyed that distinction). Per change type:
|
|
674
|
+
*
|
|
675
|
+
* - ADD / DROP / RENAME COLUMN: {@link forwardColumnShapeToOverlay}. ADD COLUMN
|
|
676
|
+
* backfills each staged row exactly as the committed path does (literal default,
|
|
677
|
+
* per-row `new.<col>` evaluator, or NULL); tombstone rows get NULL.
|
|
678
|
+
* - ALTER COLUMN: {@link forwardAlterColumnToOverlay}. `set data type` / `set collate`
|
|
679
|
+
* / `set default` forward straight through (the overlay module converts / re-keys its
|
|
680
|
+
* open layers itself); `set not null` is withheld from the overlay and the staged
|
|
681
|
+
* live rows' NULLs are backfilled via ordinary overlay writes instead.
|
|
682
|
+
* - ADD / DROP / RENAME CONSTRAINT: {@link forwardAddConstraintToOverlay} /
|
|
683
|
+
* {@link forwardConstraintNameChangeToOverlay}. A UNIQUE lands as a
|
|
684
|
+
* tombstone-narrowed unique index; CHECK forwards verbatim; FOREIGN KEY does not
|
|
685
|
+
* forward at all.
|
|
686
|
+
* - ALTER PRIMARY KEY: no overlay can follow (its layer trees are keyed by the old
|
|
687
|
+
* primary key) — the issuer with staged rows is rejected before the underlying
|
|
688
|
+
* mutates, a foreign overlay with staged rows is poisoned, and a clean overlay is
|
|
689
|
+
* swapped for a fresh staging table ({@link replaceOverlayForPrimaryKeyChange}).
|
|
647
690
|
*
|
|
648
691
|
* **Atomicity guarantee.** DDL through Quereus is not transaction-scoped and the
|
|
649
692
|
* underlying (shared, committed) base auto-commits its mutation immediately —
|
|
650
693
|
* there is no frame to unwind, and `dropColumn` / type-converting `alterColumn`
|
|
651
694
|
* are lossy and not invertible, so "revert the underlying on overlay-migration
|
|
652
695
|
* failure" is not viable. Instead this method **pre-validates** every affected
|
|
653
|
-
* overlay's
|
|
654
|
-
* BEFORE calling `underlying.alterTable`. A rejection therefore fires while the
|
|
696
|
+
* overlay's migration (the per-row NOT NULL check, the per-value retype conversion, and
|
|
697
|
+
* the tombstone-present guard) BEFORE calling `underlying.alterTable`. A rejection therefore fires while the
|
|
655
698
|
* underlying, the schema catalog, and every overlay are still untouched, so the
|
|
656
699
|
* ALTER either fails clean or fully applies — base/catalog can no longer diverge.
|
|
657
700
|
* This mirrors the engine's pre-mutation `validateNotNullBackfill` in
|
|
@@ -668,8 +711,9 @@ export declare class IsolationModule implements VirtualTableModule<IsolatedTable
|
|
|
668
711
|
* satisfy a cross-connection ALTER (see {@link alterTable} tier 3). Names the
|
|
669
712
|
* schema.table and the offending column so the owning connection's eventual
|
|
670
713
|
* read/write/commit error is self-explanatory. Poison arises on the addColumn NOT NULL
|
|
671
|
-
* path (a new NOT-NULL column with no usable default)
|
|
672
|
-
* path (a staged NULL with no usable default)
|
|
714
|
+
* path (a new NOT-NULL column with no usable default), the `set not null` tightening
|
|
715
|
+
* path (a staged NULL with no usable default), and the `set data type` path (a staged value
|
|
716
|
+
* that cannot be converted to the new type); other change types never reach here but
|
|
673
717
|
* are handled defensively.
|
|
674
718
|
*/
|
|
675
719
|
private buildAlterPoisonMessage;
|
|
@@ -731,15 +775,6 @@ export declare class IsolationModule implements VirtualTableModule<IsolatedTable
|
|
|
731
775
|
* Returns how many entries moved.
|
|
732
776
|
*/
|
|
733
777
|
private rekeyConnectionScopedMap;
|
|
734
|
-
/**
|
|
735
|
-
* Rebuilds an overlay table under the post-alter schema, translating each
|
|
736
|
-
* staged row to the new column layout.
|
|
737
|
-
*
|
|
738
|
-
* A row the post-alter schema's constraints reject throws CONSTRAINT out of
|
|
739
|
-
* {@link insertIntoRebuiltOverlay} rather than being silently discarded; the caller
|
|
740
|
-
* ({@link adoptRebuiltOverlay}) maps that to INTERNAL or poison.
|
|
741
|
-
*/
|
|
742
|
-
private migrateOverlayForAlter;
|
|
743
778
|
/**
|
|
744
779
|
* Precomputes the per-ALTER constants an `addColumn` overlay backfill needs:
|
|
745
780
|
* the folded literal DEFAULT (the `tryFoldLiteral` of the DEFAULT expr, or `null`
|
|
@@ -764,12 +799,29 @@ export declare class IsolationModule implements VirtualTableModule<IsolatedTable
|
|
|
764
799
|
* needs no staged-row work, and with no overlays there is nothing to backfill or reject.
|
|
765
800
|
*
|
|
766
801
|
* `change` for `set not null` carries no default expression, so the DEFAULT is read from the
|
|
767
|
-
* column's PRE-alter schema (via a to-be-migrated overlay — the same
|
|
768
|
-
*
|
|
802
|
+
* column's PRE-alter schema (via a to-be-migrated overlay — the same layout every migrated
|
|
803
|
+
* overlay shares). Folded exactly as
|
|
769
804
|
* {@link deriveAddColumnBackfill} folds its DEFAULT, so backfill and reject decisions here
|
|
770
805
|
* cannot drift from what the underlying enforces over its committed rows.
|
|
771
806
|
*/
|
|
772
807
|
private deriveSetNotNullBackfill;
|
|
808
|
+
/**
|
|
809
|
+
* Precomputes the per-ALTER constants an `alter column … set data type` overlay conversion
|
|
810
|
+
* needs: the retyped column's index and a per-value `convert`. Returns undefined unless this
|
|
811
|
+
* is a retype with at least one overlay to convert, and undefined for an ALIAS retype (the
|
|
812
|
+
* new logical type IS the old type object — `inferType` flattens `varchar(50)` to
|
|
813
|
+
* `TEXT_TYPE`) — both underlyings gate their value rewrite on that exact identity
|
|
814
|
+
* comparison, so mirroring it here keeps overlay and committed rows moving together should
|
|
815
|
+
* "what counts as a value-rewriting retype" ever change. A same-storage-class retype between
|
|
816
|
+
* different types (text → date) DOES convert: staged values are validated and normalized to
|
|
817
|
+
* the new type's canonical spelling, exactly as the underlyings treat their committed rows.
|
|
818
|
+
*
|
|
819
|
+
* `inferType` never throws (an unknown type name falls through SQLite-style affinity rules),
|
|
820
|
+
* so deriving this BEFORE the underlying mutation is safe. `convert` is the literal mirror of
|
|
821
|
+
* `MemoryTableManager.alterColumn` / `StoreModule.alterColumnSetDataType`: `validateAndParse`,
|
|
822
|
+
* rethrowing failure as the same MISMATCH message, so the two legs cannot drift.
|
|
823
|
+
*/
|
|
824
|
+
private deriveSetDataTypeConvert;
|
|
773
825
|
/**
|
|
774
826
|
* Dry-runs an overlay's ALTER migration-fallible work without mutating anything,
|
|
775
827
|
* so the caller can run it for every affected overlay BEFORE the irreversible
|
|
@@ -787,14 +839,28 @@ export declare class IsolationModule implements VirtualTableModule<IsolatedTable
|
|
|
787
839
|
* For `set not null` with NO usable DEFAULT (`setNotNullCtx.hasDefault === false`), a staged
|
|
788
840
|
* non-tombstone NULL at the now-NOT-NULL column throws CONSTRAINT here — for the issuer this
|
|
789
841
|
* aborts atomically before the underlying mutates; for a foreign overlay the caller maps it to
|
|
790
|
-
* poison. With a usable DEFAULT the staged NULLs are backfilled by
|
|
791
|
-
* so nothing is rejected here.
|
|
792
|
-
*
|
|
793
|
-
*
|
|
794
|
-
*
|
|
795
|
-
*
|
|
842
|
+
* poison. With a usable DEFAULT the staged NULLs are backfilled by
|
|
843
|
+
* {@link backfillStagedNotNull}, so nothing is rejected here.
|
|
844
|
+
*
|
|
845
|
+
* For `set data type` (`setDataTypeCtx`), every staged non-NULL value is run through the
|
|
846
|
+
* conversion and the result discarded, so an unconvertible one throws MISMATCH here. For the
|
|
847
|
+
* ISSUER this is belt-and-braces — the underlying's own pre-mutation pass walks the same rows
|
|
848
|
+
* via {@link issuerEffectiveRows} — EXCEPT when an outer wrapper supplied `rows`, in which case
|
|
849
|
+
* this is the only check. For a FOREIGN overlay it is the only pass that ever sees those rows,
|
|
850
|
+
* and it must run before the migration so a failure becomes poison rather than a half-migrated
|
|
851
|
+
* overlay.
|
|
852
|
+
*
|
|
853
|
+
* Non-addColumn / non-tightening / non-retype changes (`addColumnCtx === undefined`, no
|
|
854
|
+
* reject-mode `setNotNullCtx`, no `setDataTypeCtx`) only run the tombstone guard; their row
|
|
855
|
+
* translation appends/removes nothing fallible on data grounds.
|
|
796
856
|
*/
|
|
797
857
|
private validateOverlayMigration;
|
|
858
|
+
/**
|
|
859
|
+
* The staged rows an overlay holds that represent LIVE data, i.e. every row except the
|
|
860
|
+
* tombstones — those carry placeholder NULLs at every data column and must never be fed to a
|
|
861
|
+
* per-value check, which would read a NULL that is not the row's real value.
|
|
862
|
+
*/
|
|
863
|
+
private stagedLiveRows;
|
|
798
864
|
/**
|
|
799
865
|
* Computes one staged row's value for a freshly added column, mirroring the
|
|
800
866
|
* committed-row backfill (see `base.ts` `recreatePrimaryTreeWithNewColumn` and
|
|
@@ -810,25 +876,165 @@ export declare class IsolationModule implements VirtualTableModule<IsolatedTable
|
|
|
810
876
|
*/
|
|
811
877
|
private computeAddColumnValue;
|
|
812
878
|
/**
|
|
813
|
-
*
|
|
814
|
-
*
|
|
815
|
-
*
|
|
816
|
-
*
|
|
817
|
-
*
|
|
818
|
-
*
|
|
819
|
-
*
|
|
820
|
-
* `
|
|
821
|
-
*
|
|
822
|
-
*
|
|
823
|
-
*
|
|
879
|
+
* Forwards one column-shape change (ADD / DROP / RENAME COLUMN) to an already-open
|
|
880
|
+
* overlay IN PLACE via the overlay's optional `alterSchema`. The overlay module (the
|
|
881
|
+
* memory module by default) reshapes its open transaction layers with their savepoint
|
|
882
|
+
* snapshots intact, so `rollback to savepoint` keeps distinguishing rows staged before
|
|
883
|
+
* the savepoint from rows staged after it — the rebuild path destroyed that
|
|
884
|
+
* distinction in both directions (see {@link applyIndexChangeToOverlays}).
|
|
885
|
+
*
|
|
886
|
+
* A missing `alterSchema` is treated as a no-op, the way the index paths treat a
|
|
887
|
+
* missing `createIndex` / `dropIndex`.
|
|
888
|
+
*
|
|
889
|
+
* `dropColumn` / `renameColumn` forward the caller's change unchanged. `addColumn`
|
|
890
|
+
* forwards an overlay-flavoured copy — see {@link buildOverlayAddColumnChange}.
|
|
891
|
+
*/
|
|
892
|
+
private forwardColumnShapeToOverlay;
|
|
893
|
+
/**
|
|
894
|
+
* The overlay-flavoured form of one `addColumn` change:
|
|
895
|
+
*
|
|
896
|
+
* - `insertAtIndex` = the overlay's current tombstone column index, so the new data
|
|
897
|
+
* column lands ahead of the tombstone flag and the flag stays LAST — the layout
|
|
898
|
+
* every read/write path of this package assumes. A bare forward would append after
|
|
899
|
+
* the flag and every value written to the new column would be dropped on read.
|
|
900
|
+
* - The column definition is made NULLABLE. The overlay's ADD re-runs the overlay
|
|
901
|
+
* module's own NOT NULL validation against a different row population than the
|
|
902
|
+
* base's: tombstone rows carry placeholder NULL in every non-PK column, so a
|
|
903
|
+
* NOT NULL column the base already accepted would be rejected here. The base's
|
|
904
|
+
* NOT NULL is still enforced where it belongs — by the engine's pre-mutation
|
|
905
|
+
* `validateNotNullBackfill` and the underlying's own ADD (both judged the issuer's
|
|
906
|
+
* effective rows), and per staged row by {@link computeAddColumnValue}'s
|
|
907
|
+
* evaluator-path check.
|
|
908
|
+
* - `backfillEvaluator` receives an OVERLAY row (data columns plus the flag) and
|
|
909
|
+
* routes through {@link computeAddColumnValue} — the same helper
|
|
910
|
+
* {@link validateOverlayMigration} dry-runs, so validation and forward cannot
|
|
911
|
+
* drift: NULL for a tombstone row, else the engine's per-row `new.<col>` evaluator
|
|
912
|
+
* over the flag-stripped row, or the folded literal default.
|
|
913
|
+
*/
|
|
914
|
+
private buildOverlayAddColumnChange;
|
|
915
|
+
/**
|
|
916
|
+
* Forwards one ALTER COLUMN attribute change to an already-open overlay IN PLACE, with the
|
|
917
|
+
* NOT NULL attribute deliberately withheld.
|
|
918
|
+
*
|
|
919
|
+
* `set data type` / `set collate` / `set default` forward through the overlay's own
|
|
920
|
+
* `alterSchema`: the overlay module converts / re-keys its open transaction layers with
|
|
921
|
+
* their savepoint snapshots intact, and NULLs pass a retype untouched, so tombstone rows —
|
|
922
|
+
* placeholder NULLs at every non-key data column — ride through unharmed.
|
|
923
|
+
*
|
|
924
|
+
* `set not null` must NOT forward: the overlay's copy of the column stays nullable.
|
|
925
|
+
* Tombstone rows carry NULL at every non-PK data column, so the overlay module's own
|
|
926
|
+
* tightening would backfill a deletion marker's placeholder NULL from the DEFAULT
|
|
927
|
+
* (corrupting a row that is not a row) or reject it outright when no usable DEFAULT
|
|
928
|
+
* exists. The base's NOT NULL is enforced where it belongs — by the underlying over the
|
|
929
|
+
* issuer's effective rows, and per overlay by {@link validateOverlayMigration} — and the
|
|
930
|
+
* staged LIVE rows' NULLs are filled here via {@link backfillStagedNotNull}. The runtime
|
|
931
|
+
* admits exactly one attribute per ALTER COLUMN, so a `setNotNull` change carries nothing
|
|
932
|
+
* else to forward. A missing overlay `alterSchema` is a no-op, as in
|
|
933
|
+
* {@link forwardColumnShapeToOverlay}.
|
|
934
|
+
*/
|
|
935
|
+
private forwardAlterColumnToOverlay;
|
|
936
|
+
/**
|
|
937
|
+
* Backfills a `set not null` tightening into an overlay's staged LIVE rows: every
|
|
938
|
+
* non-tombstone row holding NULL at the tightened column is rewritten with the column's
|
|
939
|
+
* folded literal DEFAULT through the overlay's ordinary write path, so the overlay's layer
|
|
940
|
+
* chain and savepoint snapshots stay intact — the overlay-side mirror of the value rewrite
|
|
941
|
+
* the underlying applies to its committed rows. Tombstone rows are never touched
|
|
942
|
+
* ({@link stagedLiveRows}).
|
|
943
|
+
*
|
|
944
|
+
* Only called with a usable DEFAULT ({@link SetNotNullBackfillContext.hasDefault}); the
|
|
945
|
+
* no-DEFAULT case rejects (issuer) or poisons (foreign) in {@link validateOverlayMigration}
|
|
946
|
+
* before any overlay is touched.
|
|
947
|
+
*
|
|
948
|
+
* NOTE: these rewrites land in the overlay's CURRENT savepoint frame — each is a normal
|
|
949
|
+
* staged write. A later `rollback to savepoint` taken BEFORE this ALTER therefore restores
|
|
950
|
+
* the pre-backfill NULL while the column stays NOT NULL (DDL is not transactional here).
|
|
951
|
+
* That is the same class of divergence as any rolled-back row violating surviving DDL — a
|
|
952
|
+
* row un-inserted past an ADD CONSTRAINT, say — tracked by the backlog ticket
|
|
953
|
+
* `bug-rolled-back-rows-violate-surviving-ddl`, not a new hole opened by this forward.
|
|
954
|
+
*/
|
|
955
|
+
private backfillStagedNotNull;
|
|
956
|
+
/**
|
|
957
|
+
* Forwards one ADD CONSTRAINT to an already-open overlay, per constraint class:
|
|
958
|
+
*
|
|
959
|
+
* - **UNIQUE** is NOT forwarded as a constraint. The AST `TableConstraint` carries no
|
|
960
|
+
* partial-predicate field, so a bare forward would enforce uniqueness over tombstone rows
|
|
961
|
+
* too — a UNIQUE whose columns sit inside the primary key would see two deleted rows
|
|
962
|
+
* (each carrying its PK and placeholder NULLs elsewhere) as duplicates of each other.
|
|
963
|
+
* Instead it lands as a tombstone-narrowed **unique index** through the same route CREATE
|
|
964
|
+
* INDEX takes ({@link installOverlayUniqueConstraint}).
|
|
965
|
+
* - **CHECK** forwards verbatim: the overlay module appends it schema-only (no row scan, no
|
|
966
|
+
* physical structure). Enforcement is engine-side at DML plan time against the user
|
|
967
|
+
* table; the overlay's copy exists so a later DROP / RENAME CONSTRAINT resolves it.
|
|
968
|
+
* - **FOREIGN KEY** is deliberately NOT forwarded. FK enforcement is engine-side
|
|
969
|
+
* (planner-synthesized EXISTS checks) — the overlay never enforces it — and the overlay
|
|
970
|
+
* module's ADD arm validates existing child rows through a catalog query by table name,
|
|
971
|
+
* which the unregistered `_overlay_*` staging table cannot serve. The presence guard in
|
|
972
|
+
* {@link forwardConstraintNameChangeToOverlay} keeps a later DROP / RENAME of the
|
|
973
|
+
* unforwarded FK a clean no-op on the overlay.
|
|
974
|
+
* - **PRIMARY KEY** cannot reach here — both bundled underlyings reject
|
|
975
|
+
* `add constraint … primary key` with UNSUPPORTED before any overlay work — so it asserts
|
|
976
|
+
* INTERNAL rather than leaving a silent gap for a third-party underlying that accepts it
|
|
977
|
+
* (the overlay could not follow; see the alterPrimaryKey handling in {@link alterTable}).
|
|
824
978
|
*/
|
|
825
|
-
private
|
|
979
|
+
private forwardAddConstraintToOverlay;
|
|
980
|
+
/**
|
|
981
|
+
* Installs one runtime-added UNIQUE constraint on an overlay as a tombstone-narrowed unique
|
|
982
|
+
* index (see {@link forwardAddConstraintToOverlay} for why a bare constraint forward is
|
|
983
|
+
* wrong). Column indices and per-column collations are read from the post-alter underlying
|
|
984
|
+
* schema — the canonical form, positionally identical to the overlay's data columns (the
|
|
985
|
+
* tombstone flag is appended last). The index is named `constraint name ?? '_uc_<cols>'`,
|
|
986
|
+
* the memory module's own covering-index naming rule (`implicitIndexNameFor`), so the
|
|
987
|
+
* derived UNIQUE the overlay module synthesizes from it resolves under the SAME name a
|
|
988
|
+
* later DROP / RENAME CONSTRAINT forward carries.
|
|
989
|
+
*
|
|
990
|
+
* `MemoryTableManager.createIndex` pre-validates the overlay's effective rows against the
|
|
991
|
+
* narrowed predicate before any mutation, so a staged duplicate raises CONSTRAINT with the
|
|
992
|
+
* overlay untouched — routed by the caller to INTERNAL (the issuer, whose merged rows the
|
|
993
|
+
* underlying already judged via {@link issuerEffectiveRows}) or poison (a foreign overlay).
|
|
994
|
+
* A missing overlay `createIndex` is a no-op, as in the index paths.
|
|
995
|
+
*/
|
|
996
|
+
private installOverlayUniqueConstraint;
|
|
997
|
+
/**
|
|
998
|
+
* Forwards DROP / RENAME CONSTRAINT to an already-open overlay, presence-guarded: a
|
|
999
|
+
* constraint the overlay never carried is skipped silently rather than letting the overlay
|
|
1000
|
+
* module's NOTFOUND abort the issuer's already-applied ALTER. The guard is what makes the
|
|
1001
|
+
* unforwarded classes safe ({@link forwardAddConstraintToOverlay}: FOREIGN KEY always, and
|
|
1002
|
+
* UNIQUE under an overlay module without `createIndex`) — their DROP / RENAME is simply a
|
|
1003
|
+
* no-op on the overlay.
|
|
1004
|
+
*
|
|
1005
|
+
* For a UNIQUE the overlay module drops/renames the constraint AND its covering index in
|
|
1006
|
+
* lock-step — both live under the constraint's name (or the `_uc_<cols>` implicit-name
|
|
1007
|
+
* rule), whether copied at overlay creation ({@link createOverlaySchema}) or installed by
|
|
1008
|
+
* {@link installOverlayUniqueConstraint} — so the base and overlay representations stay
|
|
1009
|
+
* resolvable by one name across the whole constraint lifecycle.
|
|
1010
|
+
*/
|
|
1011
|
+
private forwardConstraintNameChangeToOverlay;
|
|
1012
|
+
/** Case-insensitive "does `schema` declare a named constraint of ANY class (CHECK / UNIQUE / FOREIGN KEY)". */
|
|
1013
|
+
private schemaHasNamedConstraint;
|
|
1014
|
+
/**
|
|
1015
|
+
* Carries one overlay across an ALTER PRIMARY KEY, which no overlay can follow in place:
|
|
1016
|
+
* its layer BTrees are keyed by the OLD primary key, and a staged tombstone identifies the
|
|
1017
|
+
* row it deletes BY that key — under a new key a tombstone's identity columns may be
|
|
1018
|
+
* placeholder NULLs, i.e. garbage. So:
|
|
1019
|
+
*
|
|
1020
|
+
* - An overlay WITH staged rows is either the ISSUER's — unreachable, {@link alterTable}
|
|
1021
|
+
* rejected it before the underlying mutated, so assert INTERNAL — or FOREIGN, which is
|
|
1022
|
+
* poisoned exactly like a foreign overlay whose staged values a retype cannot convert.
|
|
1023
|
+
* - A CLEAN overlay stages nothing; it is swapped for a fresh empty staging table built
|
|
1024
|
+
* from the post-alter schema, so later writes in this transaction key by the new primary
|
|
1025
|
+
* key. The fresh table's connection registers lazily at its first write, replaying the
|
|
1026
|
+
* active savepoint stack — correct for a table with no pre-existing staged rows (the
|
|
1027
|
+
* replay hazard is only ever about rows copied beneath it, and there are none).
|
|
1028
|
+
*/
|
|
1029
|
+
private replaceOverlayForPrimaryKeyChange;
|
|
826
1030
|
/**
|
|
827
1031
|
* Creates overlay schema from underlying schema.
|
|
828
1032
|
* Adds tombstone column and uses unique name to avoid conflicts.
|
|
829
1033
|
*
|
|
830
|
-
* Called by IsolatedTable when lazily creating its overlay, and by the
|
|
831
|
-
*
|
|
1034
|
+
* Called by IsolatedTable when lazily creating its overlay, and by the ALTER PRIMARY KEY
|
|
1035
|
+
* clean-overlay swap (`replaceOverlayForPrimaryKeyChange`). Index DDL and every other ALTER
|
|
1036
|
+
* adopt in place — a new UNIQUE arrives through {@link createOverlayIndexSchema} /
|
|
1037
|
+
* {@link overlayPredicate}, which this method shares.
|
|
832
1038
|
*
|
|
833
1039
|
* Every copied secondary index — and every copied UNIQUE constraint, including the ones
|
|
834
1040
|
* a UNIQUE index derives — is narrowed to a PARTIAL structure over live rows only
|
|
@@ -844,6 +1050,31 @@ export declare class IsolationModule implements VirtualTableModule<IsolatedTable
|
|
|
844
1050
|
* these indexes, so narrowing them is what it already expects.
|
|
845
1051
|
*/
|
|
846
1052
|
createOverlaySchema(baseSchema: TableSchema): TableSchema;
|
|
1053
|
+
/**
|
|
1054
|
+
* The overlay-flavored form of one base `IndexSchema`: same name and columns, predicate
|
|
1055
|
+
* narrowed to live rows and rescoped onto the overlay's table name (see
|
|
1056
|
+
* {@link overlayPredicate}).
|
|
1057
|
+
*
|
|
1058
|
+
* Shared by {@link createOverlaySchema}, which maps the whole index set when an overlay is
|
|
1059
|
+
* first created, and {@link createIndex}, which hands a single index to an overlay that is
|
|
1060
|
+
* already open — so both produce structurally identical entries, and the UNIQUE constraint
|
|
1061
|
+
* `MemoryTableManager.createIndex` synthesizes from a unique index inherits the same
|
|
1062
|
+
* predicate either way.
|
|
1063
|
+
*/
|
|
1064
|
+
private createOverlayIndexSchema;
|
|
1065
|
+
/**
|
|
1066
|
+
* `<base predicate, rescoped to the overlay> AND <tombstone> = 0`.
|
|
1067
|
+
*
|
|
1068
|
+
* A partial-index / UNIQUE predicate copied from the base carries a self-qualifier bound to
|
|
1069
|
+
* the base table's name (e.g. `where t.v > 0`). The overlay renames the table to
|
|
1070
|
+
* `overlayName`, so that qualifier now names a DIFFERENT table than the overlay's
|
|
1071
|
+
* MemoryIndex is scoped to — and `compilePredicate` rejects a foreign qualifier at
|
|
1072
|
+
* index-build time (see partial-index-predicate table-qualifier rejection). Rescope the
|
|
1073
|
+
* self-qualifier to the overlay name so it stays a self-reference. A foreign qualifier
|
|
1074
|
+
* cannot occur here: `compilePredicate` already rejected one when the base index/UNIQUE
|
|
1075
|
+
* was created, so every qualifier present is the base name.
|
|
1076
|
+
*/
|
|
1077
|
+
private overlayPredicate;
|
|
847
1078
|
/**
|
|
848
1079
|
* `<tombstoneColumn> = 0` — the partial-structure predicate that scopes an overlay index
|
|
849
1080
|
* or UNIQUE constraint to live rows. Built as an AST rather than parsed from text because
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isolation-module.d.ts","sourceRoot":"","sources":["../../src/isolation-module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,WAAW,EAAE,gBAAgB,IAAI,WAAW,EAAE,kBAAkB,EAAE,YAAY,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,gBAAgB,EAAiB,MAAM,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,WAAW,EAAE,kBAAkB,EAAgB,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"isolation-module.d.ts","sourceRoot":"","sources":["../../src/isolation-module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,WAAW,EAAE,gBAAgB,IAAI,WAAW,EAAE,kBAAkB,EAAE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