@quereus/isolation 4.5.0 → 4.6.0

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.
@@ -1,6 +1,7 @@
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
- import type { IsolationModuleConfig } from './isolation-types.js';
1
+ import type { Database, VirtualTableModule, BaseModuleConfig, TableSchema, TableIndexSchema as IndexSchema, ModuleCapabilities, BestAccessPlanRequest, BestAccessPlanResult, SchemaChangeInfo, Schema, MappingAdvertisement, LensDeploymentSnapshot, VtabConcurrencyMode, VirtualTableConnection, BackingHost, EffectiveRowSource, CatalogObjectKind, ViewSchema } from '@quereus/quereus';
2
+ import type { ConnectionOverlayState, IsolationModuleConfig, Predicate, UnderlyingTableState } from './isolation-types.js';
3
3
  import { IsolatedTable } from './isolated-table.js';
4
+ import type { AlterMigrationHost } from './alter-migration.js';
4
5
  /**
5
6
  * Generates a unique overlay ID for each overlay table instance.
6
7
  * Used to avoid name conflicts when multiple overlays exist.
@@ -21,44 +22,6 @@ export declare function weakerMode(a: VtabConcurrencyMode, b: VtabConcurrencyMod
21
22
  * invariant is enforced.
22
23
  */
23
24
  export declare function clampToReentrantReads(mode: VtabConcurrencyMode): VtabConcurrencyMode;
24
- /**
25
- * Per-table state tracking the underlying table (shared across all connections).
26
- */
27
- export interface UnderlyingTableState {
28
- underlyingTable: VirtualTable;
29
- }
30
- /**
31
- * Per-connection overlay state for a specific table.
32
- * Each connection gets its own overlay that persists across IsolatedTable instances.
33
- */
34
- export interface ConnectionOverlayState {
35
- overlayTable: VirtualTable;
36
- hasChanges: boolean;
37
- /**
38
- * The `Database` this overlay was created against — carried so
39
- * {@link IsolationModule.releaseOverlayTable} can free the overlay's staging
40
- * table on ANY discard path, including {@link IsolationModule.destroy} and
41
- * {@link IsolationModule.closeAll}, which sweep overlays across multiple db ids
42
- * and so have no single ambient `db` to hand the overlay module's `destroy`.
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.
47
- */
48
- db: Database;
49
- /**
50
- * Set by a cross-connection DDL that left this (foreign) overlay unflushable:
51
- * an ALTER that could not migrate it to the post-alter column layout (the overlay
52
- * still holds PRE-alter rows, structurally inconsistent with the now-committed
53
- * schema), or a DROP TABLE that removed the table it stages rows for. Either way
54
- * any data op that would merge or flush it must throw this message. Undefined =
55
- * healthy. Cleared only by discarding the overlay (rollback / commit-failure →
56
- * rollback).
57
- */
58
- poison?: {
59
- message: string;
60
- };
61
- }
62
25
  /**
63
26
  * A module wrapper that adds transaction isolation to any underlying module.
64
27
  *
@@ -81,7 +44,7 @@ export interface ConnectionOverlayState {
81
44
  * detection). A stable snapshot, if needed, is the underlying module's job.
82
45
  * - Savepoint support via overlay module's transaction support
83
46
  */
84
- export declare class IsolationModule implements VirtualTableModule<IsolatedTable, BaseModuleConfig> {
47
+ export declare class IsolationModule implements VirtualTableModule<IsolatedTable, BaseModuleConfig>, AlterMigrationHost {
85
48
  readonly underlying: VirtualTableModule<any, any>;
86
49
  readonly overlayModule: VirtualTableModule<any, any>;
87
50
  readonly tombstoneColumn: string;
@@ -410,6 +373,19 @@ export declare class IsolationModule implements VirtualTableModule<IsolatedTable
410
373
  * basis module would silently never hear the deployment.
411
374
  */
412
375
  notifyLensDeployment(db: Database, logicalSchemaName: string, snapshot: LensDeploymentSnapshot): Promise<void>;
376
+ /**
377
+ * Forwards module registration to the underlying module.
378
+ *
379
+ * `Database.registerModule` calls `onRegister` on the REGISTERED module, which is this
380
+ * wrapper when a store is isolated. The underlying module uses it to subscribe to the
381
+ * database's schema-change notifier before any statement runs; without this forward an
382
+ * isolation-wrapped store would fall back to subscribing lazily at its first table
383
+ * hook and would silently drop a view created ahead of that.
384
+ *
385
+ * Which `Database` the module serves is isolation-transparent, so a straight delegate
386
+ * is correct; a throw must propagate (it fails the registration by contract).
387
+ */
388
+ onRegister(db: Database, moduleName: string): void;
413
389
  /**
414
390
  * Forwards the view / materialized-view catalog-persistability veto to the underlying
415
391
  * module.
@@ -608,8 +584,8 @@ export declare class IsolationModule implements VirtualTableModule<IsolatedTable
608
584
  private assertIndexPresent;
609
585
  /** `schema`'s index named `indexName` (case-insensitively), if it declares one. */
610
586
  private findSchemaIndex;
611
- /** Case-insensitive "does `schema` declare an index named `indexName`". */
612
- private schemaHasIndex;
587
+ /** Case-insensitive "does `schema` declare an index named `indexName`". Part of {@link AlterMigrationHost}. */
588
+ schemaHasIndex(schema: TableSchema, indexName: string): boolean;
613
589
  /**
614
590
  * Drops an index on the underlying table, then drops it from every per-connection overlay.
615
591
  *
@@ -674,31 +650,20 @@ export declare class IsolationModule implements VirtualTableModule<IsolatedTable
674
650
  * Delegates ALTER TABLE to the underlying module and carries any per-connection
675
651
  * overlays to the post-alter schema without discarding staged rows.
676
652
  *
677
- * Every change type forwards to each overlay IN PLACE — through the overlay's own
653
+ * The migration machinery itself — deriving the per-change-type constants, dry-running
654
+ * one overlay against them, and reshaping it forward — lives in `alter-migration.ts`;
655
+ * this method owns the surrounding lifecycle. Every change type but one forwards to each
656
+ * overlay IN PLACE via {@link migrateOverlayForward} — through the overlay's own
678
657
  * `alterSchema` / `createIndex` / ordinary writes — so the overlay's layer chain and
679
658
  * savepoint snapshots survive the ALTER and `rollback to savepoint` keeps
680
659
  * distinguishing rows staged before the savepoint from rows staged after it (see
681
660
  * {@link applyIndexChangeToOverlays} for why the old rebuild — copying staged rows
682
- * into a fresh staging table — destroyed that distinction). Per change type:
683
- *
684
- * - ADD / DROP / RENAME COLUMN: {@link forwardColumnShapeToOverlay}. ADD COLUMN
685
- * backfills each staged row exactly as the committed path does (literal default,
686
- * per-row `new.<col>` evaluator, or NULL); tombstone rows get NULL.
687
- * - ALTER COLUMN: {@link forwardAlterColumnToOverlay}. `set data type` / `set collate`
688
- * / `set default` forward through the overlay's `alterSchema` (the overlay module
689
- * converts / re-keys its open layers itself), with one preparation step: a `set collate`
690
- * that re-keys the PRIMARY KEY first discards any deletion markers the new key collapses
691
- * onto another staged row ({@link dropCollapsedPkRekeyMarkers}). `set not null` is
692
- * withheld from the overlay and the staged live rows' NULLs are backfilled via ordinary
693
- * overlay writes instead.
694
- * - ADD / DROP / RENAME CONSTRAINT: {@link forwardAddConstraintToOverlay} /
695
- * {@link forwardConstraintNameChangeToOverlay}. A UNIQUE lands as a
696
- * tombstone-narrowed unique index; CHECK forwards verbatim; FOREIGN KEY does not
697
- * forward at all.
698
- * - ALTER PRIMARY KEY: no overlay can follow (its layer trees are keyed by the old
699
- * primary key) — the issuer with staged rows is rejected before the underlying
700
- * mutates, a foreign overlay with staged rows is poisoned, and a clean overlay is
701
- * swapped for a fresh staging table ({@link replaceOverlayForPrimaryKeyChange}).
661
+ * into a fresh staging table — destroyed that distinction).
662
+ *
663
+ * ALTER PRIMARY KEY is the exception: no overlay can follow it (its layer trees are keyed
664
+ * by the old primary key), so the issuer with staged rows is rejected before the underlying
665
+ * mutates, a foreign overlay with staged rows is poisoned, and a clean overlay is swapped
666
+ * for a fresh staging table ({@link replaceOverlayForPrimaryKeyChange}).
702
667
  *
703
668
  * **Atomicity guarantee.** DDL through Quereus is not transaction-scoped and the
704
669
  * underlying (shared, committed) base auto-commits its mutation immediately —
@@ -718,37 +683,6 @@ export declare class IsolationModule implements VirtualTableModule<IsolatedTable
718
683
  * check before it mutates anything, so the atomic-abort guarantee above still holds.
719
684
  */
720
685
  alterTable(db: Database, schemaName: string, tableName: string, change: SchemaChangeInfo, rows?: EffectiveRowSource): Promise<TableSchema>;
721
- /**
722
- * Rejects an ADD / RENAME COLUMN that would give a base column the same name as the
723
- * overlay's private tombstone flag, BEFORE `underlying.alterTable` runs.
724
- *
725
- * Every overlay carries one extra column named {@link tombstoneColumn}, so a base column
726
- * of that name collides with it. Forwarding the change to an open overlay makes the
727
- * overlay module raise a duplicate-name `ERROR`, which is not a data condition and so
728
- * rethrows out of {@link applyInPlaceOverlayChange} — after the underlying has already
729
- * (irreversibly) applied. The catalog then keeps the pre-alter column set while the base
730
- * holds the new one, and the next write to the table lands values against the wrong
731
- * columns. Rejecting up front keeps the atomic-abort guarantee this method documents.
732
- *
733
- * NOTE: the check is unconditional — not gated on an overlay existing — so the answer
734
- * does not depend on whether some connection happens to have a transaction open. That
735
- * also stops a table from acquiring the colliding name while idle and hitting
736
- * {@link createOverlaySchema}'s (silent) duplicate at the next BEGIN. A CREATE TABLE
737
- * declaring the name still gets that duplicate — tracked separately.
738
- */
739
- private assertColumnNameNotTombstone;
740
- /**
741
- * Builds the poison message stamped onto a foreign overlay whose backfill could not
742
- * satisfy a cross-connection ALTER (see {@link alterTable} tier 3). Names the
743
- * schema.table and the offending column so the owning connection's eventual
744
- * read/write/commit error is self-explanatory. Poison arises on the addColumn NOT NULL
745
- * path (a new NOT-NULL column with no usable default), the `set not null` tightening
746
- * path (a staged NULL with no usable default), the `set data type` path (a staged value
747
- * that cannot be converted to the new type), and the primary-key `set collate` path (two
748
- * staged live rows colliding under the new collation); other change types never reach
749
- * here but are handled defensively.
750
- */
751
- private buildAlterPoisonMessage;
752
686
  /**
753
687
  * Renames a table through the isolation layer.
754
688
  *
@@ -807,342 +741,6 @@ export declare class IsolationModule implements VirtualTableModule<IsolatedTable
807
741
  * Returns how many entries moved.
808
742
  */
809
743
  private rekeyConnectionScopedMap;
810
- /**
811
- * Precomputes the per-ALTER constants an `addColumn` overlay backfill needs:
812
- * the folded literal DEFAULT (the `tryFoldLiteral` of the DEFAULT expr, or `null`
813
- * when there is no DEFAULT or it folds to NULL), the engine-supplied per-row
814
- * evaluator (present only for a non-foldable `new.<col>` default), and whether
815
- * the new column is NOT NULL. Returns undefined for every non-`addColumn` change
816
- * so the row loop appends nothing.
817
- *
818
- * The new column's nullability is resolved exactly as both underlyings resolve it
819
- * (`columnDefToSchema(columnDef, default_column_nullability === 'not_null')`) so the
820
- * pre-validation cannot drift from what the underlying will enforce. Because it is
821
- * derived purely from `change` + the session option — not the post-alter schema,
822
- * which does not exist until `underlying.alterTable` runs — this can be built
823
- * BEFORE the irreversible underlying mutation and reused by the migration after.
824
- */
825
- private deriveAddColumnBackfill;
826
- /**
827
- * Precomputes the per-ALTER constants an `alter column … set not null` overlay migration needs:
828
- * the now-NOT-NULL column's index and the folded literal DEFAULT (with `hasDefault` gating
829
- * backfill vs reject). Returns undefined unless this is a NOT NULL *tightening*
830
- * (`setNotNull: true`) with at least one overlay to migrate — a DROP NOT NULL loosens and
831
- * needs no staged-row work, and with no overlays there is nothing to backfill or reject.
832
- *
833
- * `change` for `set not null` carries no default expression, so the DEFAULT is read from the
834
- * column's PRE-alter schema (via a to-be-migrated overlay — the same layout every migrated
835
- * overlay shares). Folded exactly as
836
- * {@link deriveAddColumnBackfill} folds its DEFAULT, so backfill and reject decisions here
837
- * cannot drift from what the underlying enforces over its committed rows.
838
- */
839
- private deriveSetNotNullBackfill;
840
- /**
841
- * Precomputes the per-ALTER constants an `alter column … set data type` overlay conversion
842
- * needs: the retyped column's index and a per-value `convert`. Returns undefined unless this
843
- * is a retype with at least one overlay to convert, and undefined for an ALIAS retype (the
844
- * new logical type IS the old type object — `inferType` flattens `varchar(50)` to
845
- * `TEXT_TYPE`) — both underlyings gate their value rewrite on that exact identity
846
- * comparison, so mirroring it here keeps overlay and committed rows moving together should
847
- * "what counts as a value-rewriting retype" ever change. A same-storage-class retype between
848
- * different types (text → date) DOES convert: staged values are validated and normalized to
849
- * the new type's canonical spelling, exactly as the underlyings treat their committed rows.
850
- *
851
- * `inferType` never throws (an unknown type name falls through SQLite-style affinity rules),
852
- * so deriving this BEFORE the underlying mutation is safe. `convert` is the literal mirror of
853
- * `MemoryTableManager.alterColumn` / `StoreModule.alterColumnSetDataType`: `validateAndParse`,
854
- * rethrowing failure as the same MISMATCH message, so the two legs cannot drift.
855
- */
856
- private deriveSetDataTypeConvert;
857
- /**
858
- * Precomputes the per-ALTER constants a primary-key re-keying `alter column … set collate`
859
- * overlay migration needs: the PK column positions and a key serializer built over the
860
- * POST-change collation — the PRE-alter overlay schema with the named column's collation
861
- * replaced. The overlay's PK definition mirrors the base's (the tombstone flag is appended
862
- * after the data columns), so the synthesized schema keys exactly as the re-keyed base will.
863
- *
864
- * Returns undefined unless the named column is a PRIMARY KEY member and the normalized
865
- * collation actually differs from the column's current one — mirroring the underlying's
866
- * metadata-only gate (`MemoryTableManager.alterColumn`'s `nameMatches`), so overlay and
867
- * committed rows re-key together or not at all. `validateCollationForType` can throw for an
868
- * unknown collation, but the engine already validated the name before dispatching the ALTER,
869
- * and a direct module caller gets the same pre-mutation rejection the underlying would give.
870
- */
871
- private derivePkRekey;
872
- /**
873
- * Buckets an overlay's staged rows by their PRIMARY KEY as the pending `set collate` will
874
- * re-key it: one {@link PkRekeyGroup} per post-change key. Shared by the validation dry run
875
- * (which refuses a group holding two live rows) and the migrate-step marker drop (which
876
- * discards collapsed markers), so the two passes cannot disagree about what collapses.
877
- *
878
- * NOTE: materializes one serialized key + one PK tuple per staged row (plus the marker rows
879
- * themselves), once per pass of one ALTER. If an overlay with very many staged rows ever
880
- * makes this ALTER slow, group lazily or reuse the merge `effectiveRowsFor` already builds.
881
- */
882
- private collectPkRekeyGroups;
883
- /**
884
- * Dry-runs an overlay's ALTER migration-fallible work without mutating anything,
885
- * so the caller can run it for every affected overlay BEFORE the irreversible
886
- * `underlying.alterTable` (see {@link alterTable}). It exercises the EXACT code
887
- * paths the real migration uses — the tombstone-present guard and, for addColumn,
888
- * `computeAddColumnValue` per staged row — so a dry-run pass and the subsequent
889
- * migrate pass cannot diverge:
890
- *
891
- * - A clean overlay (`!hasChanges`) stages no rows, so there is nothing to validate.
892
- * - A missing tombstone column throws INTERNAL here, before the underlying is touched.
893
- * - For addColumn, each staged row runs through `computeAddColumnValue`: tombstone
894
- * rows short-circuit to `null` (the evaluator never runs), and a NOT-NULL-violating
895
- * evaluated row throws CONSTRAINT here, atomically. Computed values are discarded.
896
- *
897
- * For `set not null` with NO usable DEFAULT (`setNotNullCtx.hasDefault === false`), a staged
898
- * non-tombstone NULL at the now-NOT-NULL column throws CONSTRAINT here — for the issuer this
899
- * aborts atomically before the underlying mutates; for a foreign overlay the caller maps it to
900
- * poison. With a usable DEFAULT the staged NULLs are backfilled by
901
- * {@link backfillStagedNotNull}, so nothing is rejected here.
902
- *
903
- * For `set data type` (`setDataTypeCtx`), every staged non-NULL value is run through the
904
- * conversion and the result discarded, so an unconvertible one throws MISMATCH here. For the
905
- * ISSUER this is belt-and-braces — the underlying's own pre-mutation pass walks the same rows
906
- * via {@link issuerEffectiveRows} — EXCEPT when an outer wrapper supplied `rows`, in which case
907
- * this is the only check. For a FOREIGN overlay it is the only pass that ever sees those rows,
908
- * and it must run before the migration so a failure becomes poison rather than a half-migrated
909
- * overlay.
910
- *
911
- * For a primary-key re-keying `set collate` (`pkRekeyCtx`), the staged rows are grouped by
912
- * their POST-change key: a deletion marker sharing a key with one live row is that row's
913
- * before-image (the migrate step discards it — {@link dropCollapsedPkRekeyMarkers}), and
914
- * markers alone on one key are one deletion — neither is a duplicate. Two LIVE rows on one
915
- * key ARE, so that throws CONSTRAINT here, mirroring the underlying's own collision message.
916
- * For the ISSUER this is belt-and-braces (the underlying's pre-mutation pass judges the same
917
- * staged rows via {@link issuerEffectiveRows}, though this check fires first); for a FOREIGN
918
- * overlay it is the only pass that sees those rows, and its throw becomes poison.
919
- *
920
- * Non-addColumn / non-tightening / non-retype / non-re-key changes (`addColumnCtx ===
921
- * undefined`, no reject-mode `setNotNullCtx`, no `setDataTypeCtx`, no `pkRekeyCtx`) only run
922
- * the tombstone guard; their row translation appends/removes nothing fallible on data grounds.
923
- */
924
- private validateOverlayMigration;
925
- /**
926
- * The staged rows an overlay holds that represent LIVE data, i.e. every row except the
927
- * tombstones — those carry placeholder NULLs at every data column and must never be fed to a
928
- * per-value check, which would read a NULL that is not the row's real value.
929
- */
930
- private stagedLiveRows;
931
- /**
932
- * Computes one staged row's value for a freshly added column, mirroring the
933
- * committed-row backfill (see `base.ts` `recreatePrimaryTreeWithNewColumn` and
934
- * `store-module.ts` `migrateRows`):
935
- *
936
- * - Tombstone rows carry NULL placeholders and their appended value is never read,
937
- * so append `null` and never run the evaluator against them (it could reference
938
- * NULL siblings or spuriously trip the NOT NULL check).
939
- * - With a per-row evaluator, derive the value from the existing-columns slice and
940
- * enforce NOT NULL on that path only (a literal/NULL default's nullability is gated
941
- * up-front by the engine, exactly as `base.ts` does).
942
- * - Otherwise use the folded literal default.
943
- */
944
- private computeAddColumnValue;
945
- /**
946
- * Forwards one column-shape change (ADD / DROP / RENAME COLUMN) to an already-open
947
- * overlay IN PLACE via the overlay's optional `alterSchema`. The overlay module (the
948
- * memory module by default) reshapes its open transaction layers with their savepoint
949
- * snapshots intact, so `rollback to savepoint` keeps distinguishing rows staged before
950
- * the savepoint from rows staged after it — the rebuild path destroyed that
951
- * distinction in both directions (see {@link applyIndexChangeToOverlays}).
952
- *
953
- * A missing `alterSchema` is treated as a no-op, the way the index paths treat a
954
- * missing `createIndex` / `dropIndex`.
955
- *
956
- * `dropColumn` / `renameColumn` forward the caller's change unchanged. `addColumn`
957
- * forwards an overlay-flavoured copy — see {@link buildOverlayAddColumnChange}.
958
- */
959
- private forwardColumnShapeToOverlay;
960
- /**
961
- * The overlay-flavoured form of one `addColumn` change:
962
- *
963
- * - `insertAtIndex` = the overlay's current tombstone column index, so the new data
964
- * column lands ahead of the tombstone flag and the flag stays LAST — the layout
965
- * every read/write path of this package assumes. A bare forward would append after
966
- * the flag and every value written to the new column would be dropped on read.
967
- * A caller that named its own position keeps it: the overlay's data columns mirror
968
- * the base's one-for-one below the flag, so the base's index is the overlay's too.
969
- * (SQL always appends, so today the caller never names one — but silently ignoring
970
- * it would diverge the two layouts.)
971
- * - The column definition is made NULLABLE. The overlay's ADD re-runs the overlay
972
- * module's own NOT NULL validation against a different row population than the
973
- * base's: tombstone rows carry placeholder NULL in every non-PK column, so a
974
- * NOT NULL column the base already accepted would be rejected here. The base's
975
- * NOT NULL is still enforced where it belongs — by the engine's pre-mutation
976
- * `validateNotNullBackfill` and the underlying's own ADD (both judged the issuer's
977
- * effective rows), and per staged row by {@link computeAddColumnValue}'s
978
- * evaluator-path check.
979
- * - `backfillEvaluator` receives an OVERLAY row (data columns plus the flag) and
980
- * routes through {@link computeAddColumnValue} — the same helper
981
- * {@link validateOverlayMigration} dry-runs, so validation and forward cannot
982
- * drift: NULL for a tombstone row, else the engine's per-row `new.<col>` evaluator
983
- * over the flag-stripped row, or the folded literal default.
984
- */
985
- private buildOverlayAddColumnChange;
986
- /**
987
- * Forwards one ALTER COLUMN attribute change to an already-open overlay IN PLACE, with the
988
- * NOT NULL attribute deliberately withheld.
989
- *
990
- * `set data type` / `set collate` / `set default` forward through the overlay's own
991
- * `alterSchema`: the overlay module converts / re-keys its open transaction layers with
992
- * their savepoint snapshots intact, and NULLs pass a retype untouched, so tombstone rows —
993
- * placeholder NULLs at every non-key data column — ride through unharmed. One preparation
994
- * step precedes a PRIMARY-KEY re-keying `set collate` (`pkRekeyCtx`): deletion markers the
995
- * re-key collapses onto another staged row are discarded first
996
- * ({@link dropCollapsedPkRekeyMarkers}) — the overlay's PK deliberately covers markers, so
997
- * without the drop its own `alterSchema` would reject the collapsed pair as a PK collision.
998
- *
999
- * Neither NOT NULL direction forwards, and the overlay's `notNull` flag is left where it
1000
- * stood when the overlay was created:
1001
- *
1002
- * - **Tightening (`set not null`).** Forwarding would have the overlay module tighten a
1003
- * column whose tombstone rows carry NULL at every non-PK data column, so it would either
1004
- * backfill a deletion marker's placeholder NULL from the DEFAULT (corrupting a row that
1005
- * is not a row) or reject it outright when no usable DEFAULT exists. The base's NOT NULL
1006
- * is enforced where it belongs — by the underlying over the issuer's effective rows, and
1007
- * per overlay by {@link validateOverlayMigration} — and the staged LIVE rows' NULLs are
1008
- * filled here via {@link backfillStagedNotNull}.
1009
- * - **Relaxing (`drop not null`).** Nothing to do: the overlay never enforced the flag, and
1010
- * the rows it stages are written with `preCoerced: true` through the overlay module's own
1011
- * write path, which does not consult column nullability at all.
1012
- *
1013
- * NOTE: both directions therefore leave the overlay's `notNull` flag drifted from the base
1014
- * for the rest of the transaction. Inert today — nothing on the overlay path reads it. The
1015
- * one consumer that would, `MemoryTableModule.getBestAccessPlan` (which prunes `IS NULL` on
1016
- * a NOT NULL column to an empty result), is unreachable because the isolation layer builds
1017
- * the overlay's `FilterInfo` itself (see `filter-info.ts`) instead of planning against the
1018
- * overlay module. If overlay scans ever route through the overlay module's planner hook, or
1019
- * its write path starts enforcing nullability, this has to become a real forward that
1020
- * excludes tombstones.
1021
- *
1022
- * The runtime admits exactly one attribute per ALTER COLUMN, so a `setNotNull` change
1023
- * carries nothing else to forward. A missing overlay `alterSchema` is a no-op, as in
1024
- * {@link forwardColumnShapeToOverlay}.
1025
- */
1026
- private forwardAlterColumnToOverlay;
1027
- /**
1028
- * Discards the deletion markers a pending PRIMARY-KEY re-key collapses onto another staged
1029
- * row, through the overlay's ordinary write path so its layer chain and savepoint snapshots
1030
- * stay intact. Two shapes collapse (see {@link PkRekeyContext}): a marker sharing its
1031
- * post-change key with a live row is that row's before-image — the live row's flush upsert
1032
- * is the complete net effect, so the marker is dropped; markers alone together on one key
1033
- * are one deletion, so all but the first are dropped. A group holding two live rows was
1034
- * already refused by {@link validateOverlayMigration} before the underlying mutated.
1035
- *
1036
- * Runs BEFORE the re-key is forwarded to the overlay, and deletes by each marker's OLD
1037
- * primary key — the overlay is still keyed under the old collation at that moment.
1038
- *
1039
- * NOTE: like {@link backfillStagedNotNull}'s rewrites, the drops land in the overlay's
1040
- * CURRENT savepoint frame. A later `rollback to savepoint` taken BEFORE this ALTER restores
1041
- * the marker while the table stays re-keyed — the same divergence class that method's NOTE
1042
- * documents (`bug-rolled-back-rows-violate-surviving-ddl`), not a new hole opened here.
1043
- */
1044
- private dropCollapsedPkRekeyMarkers;
1045
- /**
1046
- * The whole overlay rows of every deletion marker {@link dropCollapsedPkRekeyMarkers} will
1047
- * discard, computed without mutating anything. Re-planning after the drops finds nothing
1048
- * (each group then holds at most one marker and no marker beside a live row), so the
1049
- * issuer path — which drops in tier 2 for the pre-flight — can safely run the shared
1050
- * migrate-step drop again as a no-op.
1051
- */
1052
- private planPkRekeyMarkerDrops;
1053
- /** Deletes each planned marker by its OLD primary key through the overlay's ordinary write path. */
1054
- private applyPkRekeyMarkerDrops;
1055
- /**
1056
- * Undoes {@link applyPkRekeyMarkerDrops} after a refusal that aborts the whole ALTER —
1057
- * the overlay pre-flight's or the underlying's (see the tier-2 re-key block in
1058
- * {@link alterTable}). Reinserts each marker row verbatim: a marker minted for a committed
1059
- * row carries NULL at every non-key data column, but one made by deleting a row this
1060
- * transaction had already staged keeps that row's values (the convert-to-tombstone branch
1061
- * of `IsolatedTable.update`), so a reconstructed-from-PK row would not restore what was
1062
- * dropped. The reinserts land in the same savepoint frame the drops did, so the pair nets
1063
- * to nothing.
1064
- */
1065
- private reinsertPkRekeyMarkers;
1066
- /** The overlay's tombstone-flag column index, or INTERNAL if the schema lost it. */
1067
- private requireTombstoneIndex;
1068
- /**
1069
- * Backfills a `set not null` tightening into an overlay's staged LIVE rows: every
1070
- * non-tombstone row holding NULL at the tightened column is rewritten with the column's
1071
- * folded literal DEFAULT through the overlay's ordinary write path, so the overlay's layer
1072
- * chain and savepoint snapshots stay intact — the overlay-side mirror of the value rewrite
1073
- * the underlying applies to its committed rows. Tombstone rows are never touched
1074
- * ({@link stagedLiveRows}).
1075
- *
1076
- * Only called with a usable DEFAULT ({@link SetNotNullBackfillContext.hasDefault}); the
1077
- * no-DEFAULT case rejects (issuer) or poisons (foreign) in {@link validateOverlayMigration}
1078
- * before any overlay is touched.
1079
- *
1080
- * NOTE: these rewrites land in the overlay's CURRENT savepoint frame — each is a normal
1081
- * staged write. A later `rollback to savepoint` taken BEFORE this ALTER therefore restores
1082
- * the pre-backfill NULL while the column stays NOT NULL (DDL is not transactional here).
1083
- * That is the same class of divergence as any rolled-back row violating surviving DDL — a
1084
- * row un-inserted past an ADD CONSTRAINT, say — tracked by the backlog ticket
1085
- * `bug-rolled-back-rows-violate-surviving-ddl`, not a new hole opened by this forward.
1086
- */
1087
- private backfillStagedNotNull;
1088
- /**
1089
- * Forwards one ADD CONSTRAINT to an already-open overlay, per constraint class:
1090
- *
1091
- * - **UNIQUE** is NOT forwarded as a constraint. The AST `TableConstraint` carries no
1092
- * partial-predicate field, so a bare forward would enforce uniqueness over tombstone rows
1093
- * too — a UNIQUE whose columns sit inside the primary key would see two deleted rows
1094
- * (each carrying its PK and placeholder NULLs elsewhere) as duplicates of each other.
1095
- * Instead it lands as a tombstone-narrowed **unique index** through the same route CREATE
1096
- * INDEX takes ({@link installOverlayUniqueConstraint}).
1097
- * - **CHECK** forwards verbatim: the overlay module appends it schema-only (no row scan, no
1098
- * physical structure). Enforcement is engine-side at DML plan time against the user
1099
- * table; the overlay's copy exists so a later DROP / RENAME CONSTRAINT resolves it.
1100
- * - **FOREIGN KEY** is deliberately NOT forwarded. FK enforcement is engine-side
1101
- * (planner-synthesized EXISTS checks) — the overlay never enforces it — and the overlay
1102
- * module's ADD arm validates existing child rows through a catalog query by table name,
1103
- * which the unregistered `_overlay_*` staging table cannot serve. The presence guard in
1104
- * {@link forwardConstraintNameChangeToOverlay} keeps a later DROP / RENAME of the
1105
- * unforwarded FK a clean no-op on the overlay.
1106
- * - **PRIMARY KEY** cannot reach here — both bundled underlyings reject
1107
- * `add constraint … primary key` with UNSUPPORTED before any overlay work — so it asserts
1108
- * INTERNAL rather than leaving a silent gap for a third-party underlying that accepts it
1109
- * (the overlay could not follow; see the alterPrimaryKey handling in {@link alterTable}).
1110
- */
1111
- private forwardAddConstraintToOverlay;
1112
- /**
1113
- * Installs one runtime-added UNIQUE constraint on an overlay as a tombstone-narrowed unique
1114
- * index (see {@link forwardAddConstraintToOverlay} for why a bare constraint forward is
1115
- * wrong). Column indices and per-column collations are read from the post-alter underlying
1116
- * schema — the canonical form, positionally identical to the overlay's data columns (the
1117
- * tombstone flag is appended last). The index is named `constraint name ?? '_uc_<cols>'`,
1118
- * the memory module's own covering-index naming rule (`implicitIndexNameFor`), so the
1119
- * derived UNIQUE the overlay module synthesizes from it resolves under the SAME name a
1120
- * later DROP / RENAME CONSTRAINT forward carries.
1121
- *
1122
- * `MemoryTableManager.createIndex` pre-validates the overlay's effective rows against the
1123
- * narrowed predicate before any mutation, so a staged duplicate raises CONSTRAINT with the
1124
- * overlay untouched — routed by the caller to INTERNAL (the issuer, whose merged rows the
1125
- * underlying already judged via {@link issuerEffectiveRows}) or poison (a foreign overlay).
1126
- * A missing overlay `createIndex` is a no-op, as in the index paths.
1127
- */
1128
- private installOverlayUniqueConstraint;
1129
- /**
1130
- * Forwards DROP / RENAME CONSTRAINT to an already-open overlay, presence-guarded: a
1131
- * constraint the overlay never carried is skipped silently rather than letting the overlay
1132
- * module's NOTFOUND abort the issuer's already-applied ALTER. The guard is what makes the
1133
- * unforwarded classes safe ({@link forwardAddConstraintToOverlay}: FOREIGN KEY always, and
1134
- * UNIQUE under an overlay module without `createIndex`) — their DROP / RENAME is simply a
1135
- * no-op on the overlay.
1136
- *
1137
- * For a UNIQUE the overlay module drops/renames the constraint AND its covering index in
1138
- * lock-step — both live under the constraint's name (or the `_uc_<cols>` implicit-name
1139
- * rule), whether copied at overlay creation ({@link createOverlaySchema}) or installed by
1140
- * {@link installOverlayUniqueConstraint} — so the base and overlay representations stay
1141
- * resolvable by one name across the whole constraint lifecycle.
1142
- */
1143
- private forwardConstraintNameChangeToOverlay;
1144
- /** Case-insensitive "does `schema` declare a named constraint of ANY class (CHECK / UNIQUE / FOREIGN KEY)". */
1145
- private schemaHasNamedConstraint;
1146
744
  /**
1147
745
  * Carries one overlay across an ALTER PRIMARY KEY, which no overlay can follow in place:
1148
746
  * its layer BTrees are keyed by the OLD primary key, and a staged tombstone identifies the
@@ -1215,8 +813,11 @@ export declare class IsolationModule implements VirtualTableModule<IsolatedTable
1215
813
  * self-qualifier to the overlay name so it stays a self-reference. A foreign qualifier
1216
814
  * cannot occur here: `compilePredicate` already rejected one when the base index/UNIQUE
1217
815
  * was created, so every qualifier present is the base name.
816
+ *
817
+ * Part of {@link AlterMigrationHost} — `alter-migration.ts` builds an overlay UNIQUE index
818
+ * through this same seam.
1218
819
  */
1219
- private overlayPredicate;
820
+ overlayPredicate(base: Predicate | undefined, baseName: string, overlayName: string): Predicate;
1220
821
  /**
1221
822
  * `<tombstoneColumn> = 0` — the partial-structure predicate that scopes an overlay index
1222
823
  * 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,iBAAiB,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEta,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAUpD;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C;AAcD;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,mBAAmB,EAAE,CAAC,EAAE,mBA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