@quereus/isolation 4.5.0 → 4.7.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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alter-migration.js","sourceRoot":"","sources":["../../src/alter-migration.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEzL,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAuJxD;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,4BAA4B,CAC3C,IAAwB,EACxB,UAAkB,EAClB,SAAiB,EACjB,MAAwB;IAExB,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI;QAClE,CAAC,CAAC,MAAM,CAAC,IAAI,KAAK,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO;YACjD,CAAC,CAAC,SAAS,CAAC;IACb,IAAI,OAAO,EAAE,WAAW,EAAE,KAAK,IAAI,CAAC,eAAe,CAAC,WAAW,EAAE;QAAE,OAAO;IAC1E,MAAM,IAAI,YAAY,CACrB,4BAA4B,UAAU,IAAI,SAAS,MAAM,OAAO,yGAAyG,EACzK,UAAU,CAAC,WAAW,CACtB,CAAC;AACH,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,uBAAuB,CAAC,UAAkB,EAAE,SAAiB,EAAE,MAAwB;IACtG,IAAI,MAAM,CAAC,IAAI,KAAK,WAAW,EAAE,CAAC;QACjC,OAAO,aAAa,UAAU,IAAI,SAAS,mBAAmB,MAAM,CAAC,SAAS,CAAC,IAAI,iGAAiG,CAAC;IAC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AAgB,CAAC,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC;IACvF,IAAI,CAAC,wBAAwB,CAAC,aAAa,EAAE,IAAI,CAAC;QAAE,OAAO;IAC3D,MAAM,YAAY,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;AACxC,CAAC;AAED,+GAA+G;AAC/G,SAAS,wBAAwB,CAAC,MAAmB,EAAE,cAAsB;IAC5E,MAAM,KAAK,GAAG,cAAc,CAAC,WAAW,EAAE,CAAC;IAC3C,OAAO,CAAC,MAAM,CAAC,gBAAgB,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,WAAW,EAAE,KAAK,KAAK,CAAC;WAC7E,CAAC,MAAM,CAAC,iBAAiB,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,WAAW,EAAE,KAAK,KAAK,CAAC;WAC3E,CAAC,MAAM,CAAC,WAAW,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,WAAW,EAAE,KAAK,KAAK,CAAC,CAAC;AAC3E,CAAC"}
@@ -1,7 +1,6 @@
1
1
  export type { MergeEntry, MergeConfig, PKComparator, PKExtractor, SortKeyComparator, SortKeyExtractor } from './merge-types.js';
2
2
  export { mergeStreams, createMergeEntry, createTombstone } from './merge-iterator.js';
3
- export type { IsolationModuleConfig } from './isolation-types.js';
4
- export type { UnderlyingTableState, ConnectionOverlayState } from './isolation-module.js';
3
+ export type { IsolationModuleConfig, UnderlyingTableState, ConnectionOverlayState } from './isolation-types.js';
5
4
  export { IsolationModule } from './isolation-module.js';
6
5
  export { IsolatedTable } from './isolated-table.js';
7
6
  export { IsolatedConnection } from './isolated-connection.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAChI,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAGtF,YAAY,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAClE,YAAY,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAG1F,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAChI,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAGtF,YAAY,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAGhH,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAMtF,0BAA0B;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAKtF,0BAA0B;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC"}
@@ -269,11 +269,12 @@ export declare class IsolatedTable extends VirtualTable implements IsolatedTable
269
269
  * stamped GE); the real OR-of-ranges lives in the idxStr `rangeOps` parameters,
270
270
  * decoded by {@link buildMultiRangeWindowMatcher}.
271
271
  *
272
- * Comparisons run under the index key column's collation (falling back to the table
273
- * column's, then BINARY) with seek semantics for NULL: a NULL operand or a NULL row
274
- * value never matches, mirroring what an index seek returns. Operators the matcher
275
- * does not interpret (LIKE, MATCH, ...) are ignored — that can only let through
276
- * rows a residual Filter above still removes, never drop rows.
272
+ * Comparisons run through {@link constraintComparator} — the index key column's
273
+ * collation, or the declared type's `compare` for a semantic-ordering column — with
274
+ * seek semantics for NULL: a NULL operand or a NULL row value never matches,
275
+ * mirroring what an index seek returns. Operators the matcher does not interpret
276
+ * (LIKE, MATCH, ...) are ignored — that can only let through rows a residual Filter
277
+ * above still removes, never drop rows.
277
278
  */
278
279
  private buildConstraintMatcher;
279
280
  /**
@@ -284,12 +285,29 @@ export declare class IsolatedTable extends VirtualTable implements IsolatedTable
284
285
  */
285
286
  private buildMultiRangeWindowMatcher;
286
287
  /**
287
- * Comparison collation for a window-matcher column: the index key column's declared
288
- * collation when the column is part of the scanned index (the seek's own window
289
- * follows the index collation), else the table column's declared collation, else
290
- * BINARY.
291
- */
292
- private constraintCollation;
288
+ * Comparison function for a window-matcher column, matching the comparison the
289
+ * scanned module applies to its OWN stream (`StoreTableScan.matchesFilters`, the
290
+ * memory backend's typed BTree): a column whose declared logical type carries
291
+ * SEMANTIC ordering (TIMESPAN, JSON — see docs/types.md "Semantic ordering") ranks
292
+ * by the type's `compare`; every other column by storage class + collation. The
293
+ * collation is the index key column's declared one when the column is part of the
294
+ * scanned index (the seek's own window follows the index collation), else the table
295
+ * column's declared collation, else BINARY.
296
+ *
297
+ * The typed arm is a CORRECTNESS requirement, not a refinement: the underlying
298
+ * claimed the window's filters HANDLED, so no residual Filter survives above this
299
+ * merge to re-check an overlay row it lets through or drops. Under a plain text
300
+ * compare a `d > 'PT1H'` window admits a staged 'PT1M' and rejects a staged
301
+ * 'PT180M' — both inversions the type's `compare` exists to remove
302
+ * (`store-semantic-index-window-overlay` in isolation-layer.spec.ts).
303
+ *
304
+ * NOTE: this restates, in a second package, the rule `StoreTableScan.matchesFilters`
305
+ * applies to committed rows — "semantic-ordering type ⇒ the type's compare, else
306
+ * storage class + collation". Two comparison dimensions keep the duplication cheap; if
307
+ * a third ever appears, promote the pair to one shared helper in the engine rather than
308
+ * adding a third arm here.
309
+ */
310
+ private constraintComparator;
293
311
  /**
294
312
  * Queries the overlay table and converts rows to MergeEntry format.
295
313
  *
@@ -327,9 +345,11 @@ export declare class IsolatedTable extends VirtualTable implements IsolatedTable
327
345
  * collation registered *after* a comparator was built is not picked up, the same
328
346
  * contract `Database.registerCollation` documents engine-wide.
329
347
  *
330
- * NOTE: this is the *comparison* collation only. The store's physical key bytes come
331
- * from a separate encoder registry that does not consult the database — see
332
- * `fix/bug-store-key-encoder-ignores-database-collations`.
348
+ * NOTE: this is the *comparison* collation only. The store's physical key bytes are
349
+ * produced by the key NORMALIZER of the same collation, resolved through the same
350
+ * connection's registry (`bug-store-key-encoder-ignores-database-collations`, landed),
351
+ * so the two agree on equality — but only on ORDER for a collation asserting
352
+ * `orderPreserving` (see docs/store.md § Order preservation).
333
353
  */
334
354
  private getPkCollations;
335
355
  /**
@@ -346,9 +366,14 @@ export declare class IsolatedTable extends VirtualTable implements IsolatedTable
346
366
  /**
347
367
  * Per-column comparators derived from an index descriptor's key columns — the
348
368
  * fallback when the underlying exposes no `getIndexComparator` for the index
349
- * (always the case for a module-minted synthetic name). Honors each key column's
369
+ * (always the case for a module-minted synthetic name; a store-backed index scan
370
+ * now supplies its own comparators via `StoreTableScan.getIndexComparator`, so
371
+ * this fallback no longer decides its merge order). Honors each key column's
350
372
  * declared direction and collation so the merge walks the underlying's emission
351
- * order.
373
+ * order. NOTE: a key column with no descriptor collation falls back to BINARY,
374
+ * not the table column's declared collation — widening that would also change
375
+ * merge order for memory-backed tables, whose index BTrees genuinely order by
376
+ * `specCol.collation ?? BINARY`.
352
377
  */
353
378
  private buildDescriptorComparators;
354
379
  /**
@@ -518,16 +543,34 @@ export declare class IsolatedTable extends VirtualTable implements IsolatedTable
518
543
  *
519
544
  * Seek only when the constraint was synthesized from a `CREATE UNIQUE INDEX`
520
545
  * (`derivedFromIndex` names a live entry in `tableSchema.indexes`) AND every key
521
- * column's effective enforcement collation is BINARY.
522
- *
523
- * NOTE: the BINARY gate is load-bearing, not an optimisation choice. The store's
524
- * physical index key bytes come from a separate encoder registry that does NOT
525
- * consult the database's collation registry
526
- * (backlog/debt-store-index-keys-use-column-collation, see the comment at
527
- * getPkKeyShape above). Seeking a NOCASE index for 'B@X' would miss the committed
528
- * 'b@x' that the full scan catches, turning this perf fix into a LOST UNIQUE
529
- * violation. Widen this gate (to per-column enforcement collations generally) only
530
- * once that encoder defect is fixed.
546
+ * column's index bytes are keyed under the collation this check ENFORCES under. A
547
+ * table-level `unique(a, b)` still falls back to the full scan: it has no index in the
548
+ * engine-facing schema at all (the store's `_uc_*` is enforcement-only and invisible
549
+ * here), so there is nothing to name in the seek.
550
+ *
551
+ * The collation half of the gate is what makes the seek sound rather than merely fast:
552
+ * the seek REPLACES the full scan, so a window narrower than the enforcement-equal set
553
+ * silently loses a UNIQUE violation. It used to demand BINARY outright, because the
554
+ * store keyed every index column under the table-wide key collation and ignored the
555
+ * connection's collation registry. Index bytes now encode under the index column's own
556
+ * effective collation, which for an index-derived UNIQUE IS the enforcement collation
557
+ * — so a collated index is seekable, and this asks per column:
558
+ *
559
+ * - never-text column (`integer`, `real`, `blob`) → seekable; its key bytes are
560
+ * type-native and no collation is involved.
561
+ * - enforcement collation BINARY → seekable; BINARY equality is byte identity, which
562
+ * every backend's index key preserves.
563
+ * - otherwise seekable only when a key-encoding backend keys the column under that
564
+ * same collation, which is exactly what `pkKeyCollationName` answers: a
565
+ * collation-aware column (`text`, `any` — `compare` honors the handed collation)
566
+ * keys under its own collation (seekable), while a collation-blind text-capable
567
+ * column — `json`, the temporal types — keys hard-`BINARY` while this check still
568
+ * compares under the declared name (NOT seekable; a probe for `'B@X'` would
569
+ * byte-miss the committed `'b@x'`).
570
+ *
571
+ * Equality is all the seek needs — order preservation is a RANGE concern and no range
572
+ * is built here (`makeSecondaryIndexEqSeekFilter` emits one EQ per key column and
573
+ * nothing else), so a custom equality-only collation is fine.
531
574
  */
532
575
  private canSeekForConstraint;
533
576
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"isolated-table.d.ts","sourceRoot":"","sources":["../../src/isolated-table.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAwC,QAAQ,EAAoB,YAAY,EAAE,GAAG,EAAY,gBAAgB,IAAI,WAAW,EAAE,UAAU,EAAE,gBAAgB,EAA0D,UAAU,EAAE,sBAAsB,EAAE,YAAY,EAA+C,MAAM,kBAAkB,CAAC;AAC5V,OAAO,EAAE,YAAY,EAA+d,MAAM,kBAAkB,CAAC;AAC7gB,OAAO,KAAK,EAAE,kBAAkB,EAAyB,MAAM,kBAAkB,CAAC;AAClF,OAAO,KAAK,EAAE,eAAe,EAA0B,MAAM,uBAAuB,CAAC;AACrF,OAAO,EAAsB,KAAK,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAe1F;;;;;;;;;;;;;;GAcG;AACH,q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;;OAWG;IACG,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAOzD;;OAEG;IACG,4BAA4B,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKhE;;;;;;OAMG;IACG,+BAA+B,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAanE"}
@@ -414,10 +414,13 @@ export class IsolatedTable extends VirtualTable {
414
414
  // string values, so the collation cannot affect how such a key buckets. Asking
415
415
  // the resolver for it would reject `n integer collate mycoll` under a
416
416
  // comparator-only collation, which the engine's own hash sites accept (they gate
417
- // through `hashKeyCollationName`, the same predicate). A text-capable-but-not-
418
- // `isTextual` column (`any`, `json`, the temporal types) is keyed under `'BINARY'`
419
- // regardless of its declared collation, since PK equality compares those types
420
- // through `logicalType.compare`, which ignores collation entirely.
417
+ // through `hashKeyCollationName`, the same predicate). A collation-aware column
418
+ // (`text`, `any` — types whose `compare` honors the collation it is handed) keys
419
+ // under its own declared collation; a collation-blind text-capable column
420
+ // (`json`, the temporal types) is keyed under `'BINARY'` regardless, since PK
421
+ // equality compares those types through `logicalType.compare`, which is not the
422
+ // generic collation comparison (the temporals ignore the argument; JSON ranks
423
+ // structurally).
421
424
  const pkNormalizers = pkIndices.map(i => {
422
425
  const column = this.tableSchema.columns[i];
423
426
  return this.keyNormalizerResolver(pkKeyCollationName(column));
@@ -578,11 +581,12 @@ export class IsolatedTable extends VirtualTable {
578
581
  * stamped GE); the real OR-of-ranges lives in the idxStr `rangeOps` parameters,
579
582
  * decoded by {@link buildMultiRangeWindowMatcher}.
580
583
  *
581
- * Comparisons run under the index key column's collation (falling back to the table
582
- * column's, then BINARY) with seek semantics for NULL: a NULL operand or a NULL row
583
- * value never matches, mirroring what an index seek returns. Operators the matcher
584
- * does not interpret (LIKE, MATCH, ...) are ignored — that can only let through
585
- * rows a residual Filter above still removes, never drop rows.
584
+ * Comparisons run through {@link constraintComparator} — the index key column's
585
+ * collation, or the declared type's `compare` for a semantic-ordering column — with
586
+ * seek semantics for NULL: a NULL operand or a NULL row value never matches,
587
+ * mirroring what an index seek returns. Operators the matcher does not interpret
588
+ * (LIKE, MATCH, ...) are ignored — that can only let through rows a residual Filter
589
+ * above still removes, never drop rows.
586
590
  */
587
591
  buildConstraintMatcher(filterInfo) {
588
592
  const path = filterInfo.accessPath;
@@ -598,7 +602,7 @@ export class IsolatedTable extends VirtualTable {
598
602
  const windowFor = (columnIndex) => {
599
603
  let window = windows.get(columnIndex);
600
604
  if (!window) {
601
- window = { collation: this.constraintCollation(columnIndex, path.index), eqValues: [], ranges: [] };
605
+ window = { compare: this.constraintComparator(columnIndex, path.index), eqValues: [], ranges: [] };
602
606
  windows.set(columnIndex, window);
603
607
  }
604
608
  return window;
@@ -630,11 +634,11 @@ export class IsolatedTable extends VirtualTable {
630
634
  if (rowValue === null)
631
635
  return false;
632
636
  if (window.eqValues.length > 0
633
- && !window.eqValues.some(v => v !== null && compareSqlValuesFast(rowValue, v, window.collation) === 0)) {
637
+ && !window.eqValues.some(v => v !== null && window.compare(rowValue, v) === 0)) {
634
638
  return false;
635
639
  }
636
640
  for (const { op, value } of window.ranges) {
637
- if (value === null || !satisfiesBound(compareSqlValuesFast(rowValue, value, window.collation), op)) {
641
+ if (value === null || !satisfiesBound(window.compare(rowValue, value), op)) {
638
642
  return false;
639
643
  }
640
644
  }
@@ -673,7 +677,7 @@ export class IsolatedTable extends VirtualTable {
673
677
  if (ranges.length === 0)
674
678
  return () => true;
675
679
  const columnIndex = keyColumn.columnIndex;
676
- const collation = this.constraintCollation(columnIndex, index);
680
+ const compare = this.constraintComparator(columnIndex, index);
677
681
  return (row) => {
678
682
  const rowValue = row[columnIndex];
679
683
  if (rowValue === null)
@@ -682,14 +686,14 @@ export class IsolatedTable extends VirtualTable {
682
686
  if (lower) {
683
687
  if (lower.value === null)
684
688
  return false;
685
- const cmp = compareSqlValuesFast(rowValue, lower.value, collation);
689
+ const cmp = compare(rowValue, lower.value);
686
690
  if (lower.strict ? cmp <= 0 : cmp < 0)
687
691
  return false;
688
692
  }
689
693
  if (upper) {
690
694
  if (upper.value === null)
691
695
  return false;
692
- const cmp = compareSqlValuesFast(rowValue, upper.value, collation);
696
+ const cmp = compare(rowValue, upper.value);
693
697
  if (upper.strict ? cmp >= 0 : cmp > 0)
694
698
  return false;
695
699
  }
@@ -698,15 +702,36 @@ export class IsolatedTable extends VirtualTable {
698
702
  };
699
703
  }
700
704
  /**
701
- * Comparison collation for a window-matcher column: the index key column's declared
702
- * collation when the column is part of the scanned index (the seek's own window
703
- * follows the index collation), else the table column's declared collation, else
704
- * BINARY.
705
+ * Comparison function for a window-matcher column, matching the comparison the
706
+ * scanned module applies to its OWN stream (`StoreTableScan.matchesFilters`, the
707
+ * memory backend's typed BTree): a column whose declared logical type carries
708
+ * SEMANTIC ordering (TIMESPAN, JSON — see docs/types.md "Semantic ordering") ranks
709
+ * by the type's `compare`; every other column by storage class + collation. The
710
+ * collation is the index key column's declared one when the column is part of the
711
+ * scanned index (the seek's own window follows the index collation), else the table
712
+ * column's declared collation, else BINARY.
713
+ *
714
+ * The typed arm is a CORRECTNESS requirement, not a refinement: the underlying
715
+ * claimed the window's filters HANDLED, so no residual Filter survives above this
716
+ * merge to re-check an overlay row it lets through or drops. Under a plain text
717
+ * compare a `d > 'PT1H'` window admits a staged 'PT1M' and rejects a staged
718
+ * 'PT180M' — both inversions the type's `compare` exists to remove
719
+ * (`store-semantic-index-window-overlay` in isolation-layer.spec.ts).
720
+ *
721
+ * NOTE: this restates, in a second package, the rule `StoreTableScan.matchesFilters`
722
+ * applies to committed rows — "semantic-ordering type ⇒ the type's compare, else
723
+ * storage class + collation". Two comparison dimensions keep the duplication cheap; if
724
+ * a third ever appears, promote the pair to one shared helper in the engine rather than
725
+ * adding a third arm here.
705
726
  */
706
- constraintCollation(columnIndex, index) {
727
+ constraintComparator(columnIndex, index) {
707
728
  const name = index.keyColumns.find(kc => kc.columnIndex === columnIndex)?.collation
708
729
  ?? this.tableSchema?.columns[columnIndex]?.collation;
709
- return name ? this.collationResolver(name) : BINARY_COLLATION;
730
+ const collation = name ? this.collationResolver(name) : BINARY_COLLATION;
731
+ const logicalType = this.tableSchema?.columns[columnIndex]?.logicalType;
732
+ return hasSemanticOrdering(logicalType)
733
+ ? createTypedComparator(logicalType, collation)
734
+ : (a, b) => compareSqlValuesFast(a, b, collation);
710
735
  }
711
736
  /**
712
737
  * Queries the overlay table and converts rows to MergeEntry format.
@@ -778,7 +803,9 @@ export class IsolatedTable extends VirtualTable {
778
803
  const pk = pkIndices.map(i => row[i]);
779
804
  return [...indexKey, ...pk];
780
805
  };
781
- // Prefer the underlying table's per-column index comparators; when it exposes
806
+ // Prefer the underlying table's per-column index comparators — both the memory
807
+ // and store backends supply them, each stating its own physical index order
808
+ // (the store's per-column key collations included). When the underlying exposes
782
809
  // none for this index (always the case for a module-minted synthetic name),
783
810
  // derive them from the descriptor's key columns so a DESC or collated key
784
811
  // column still merges in the underlying's emission order rather than a
@@ -815,9 +842,11 @@ export class IsolatedTable extends VirtualTable {
815
842
  * collation registered *after* a comparator was built is not picked up, the same
816
843
  * contract `Database.registerCollation` documents engine-wide.
817
844
  *
818
- * NOTE: this is the *comparison* collation only. The store's physical key bytes come
819
- * from a separate encoder registry that does not consult the database — see
820
- * `fix/bug-store-key-encoder-ignores-database-collations`.
845
+ * NOTE: this is the *comparison* collation only. The store's physical key bytes are
846
+ * produced by the key NORMALIZER of the same collation, resolved through the same
847
+ * connection's registry (`bug-store-key-encoder-ignores-database-collations`, landed),
848
+ * so the two agree on equality — but only on ORDER for a collation asserting
849
+ * `orderPreserving` (see docs/store.md § Order preservation).
821
850
  */
822
851
  getPkCollations() {
823
852
  return this.getPkKeyShape().functions;
@@ -880,9 +909,14 @@ export class IsolatedTable extends VirtualTable {
880
909
  /**
881
910
  * Per-column comparators derived from an index descriptor's key columns — the
882
911
  * fallback when the underlying exposes no `getIndexComparator` for the index
883
- * (always the case for a module-minted synthetic name). Honors each key column's
912
+ * (always the case for a module-minted synthetic name; a store-backed index scan
913
+ * now supplies its own comparators via `StoreTableScan.getIndexComparator`, so
914
+ * this fallback no longer decides its merge order). Honors each key column's
884
915
  * declared direction and collation so the merge walks the underlying's emission
885
- * order.
916
+ * order. NOTE: a key column with no descriptor collation falls back to BINARY,
917
+ * not the table column's declared collation — widening that would also change
918
+ * merge order for memory-backed tables, whose index BTrees genuinely order by
919
+ * `specCol.collation ?? BINARY`.
886
920
  */
887
921
  buildDescriptorComparators(keyColumns) {
888
922
  return keyColumns.map(kc => {
@@ -1544,16 +1578,34 @@ export class IsolatedTable extends VirtualTable {
1544
1578
  *
1545
1579
  * Seek only when the constraint was synthesized from a `CREATE UNIQUE INDEX`
1546
1580
  * (`derivedFromIndex` names a live entry in `tableSchema.indexes`) AND every key
1547
- * column's effective enforcement collation is BINARY.
1581
+ * column's index bytes are keyed under the collation this check ENFORCES under. A
1582
+ * table-level `unique(a, b)` still falls back to the full scan: it has no index in the
1583
+ * engine-facing schema at all (the store's `_uc_*` is enforcement-only and invisible
1584
+ * here), so there is nothing to name in the seek.
1585
+ *
1586
+ * The collation half of the gate is what makes the seek sound rather than merely fast:
1587
+ * the seek REPLACES the full scan, so a window narrower than the enforcement-equal set
1588
+ * silently loses a UNIQUE violation. It used to demand BINARY outright, because the
1589
+ * store keyed every index column under the table-wide key collation and ignored the
1590
+ * connection's collation registry. Index bytes now encode under the index column's own
1591
+ * effective collation, which for an index-derived UNIQUE IS the enforcement collation
1592
+ * — so a collated index is seekable, and this asks per column:
1593
+ *
1594
+ * - never-text column (`integer`, `real`, `blob`) → seekable; its key bytes are
1595
+ * type-native and no collation is involved.
1596
+ * - enforcement collation BINARY → seekable; BINARY equality is byte identity, which
1597
+ * every backend's index key preserves.
1598
+ * - otherwise seekable only when a key-encoding backend keys the column under that
1599
+ * same collation, which is exactly what `pkKeyCollationName` answers: a
1600
+ * collation-aware column (`text`, `any` — `compare` honors the handed collation)
1601
+ * keys under its own collation (seekable), while a collation-blind text-capable
1602
+ * column — `json`, the temporal types — keys hard-`BINARY` while this check still
1603
+ * compares under the declared name (NOT seekable; a probe for `'B@X'` would
1604
+ * byte-miss the committed `'b@x'`).
1548
1605
  *
1549
- * NOTE: the BINARY gate is load-bearing, not an optimisation choice. The store's
1550
- * physical index key bytes come from a separate encoder registry that does NOT
1551
- * consult the database's collation registry
1552
- * (backlog/debt-store-index-keys-use-column-collation, see the comment at
1553
- * getPkKeyShape above). Seeking a NOCASE index for 'B@X' would miss the committed
1554
- * 'b@x' that the full scan catches, turning this perf fix into a LOST UNIQUE
1555
- * violation. Widen this gate (to per-column enforcement collations generally) only
1556
- * once that encoder defect is fixed.
1606
+ * Equality is all the seek needs — order preservation is a RANGE concern and no range
1607
+ * is built here (`makeSecondaryIndexEqSeekFilter` emits one EQ per key column and
1608
+ * nothing else), so a custom equality-only collation is fine.
1557
1609
  */
1558
1610
  canSeekForConstraint(uc) {
1559
1611
  if (!uc.derivedFromIndex)
@@ -1564,8 +1616,20 @@ export class IsolatedTable extends VirtualTable {
1564
1616
  // Enforcement collation per constrained column, positionally aligned with the
1565
1617
  // index key columns (appendIndexToTableSchema guarantees the alignment).
1566
1618
  const enforcement = uniqueEnforcementCollations(this.tableSchema, uc);
1567
- const allBinary = enforcement.every(c => normalizeCollationName(c ?? 'BINARY') === 'BINARY');
1568
- return allBinary ? index : null;
1619
+ const seekable = uc.columns.every((colIdx, i) => {
1620
+ const column = this.tableSchema.columns[colIdx];
1621
+ const name = normalizeCollationName(enforcement[i] ?? 'BINARY');
1622
+ if (name === 'BINARY')
1623
+ return true;
1624
+ const keyed = pkKeyCollationName(column === undefined ? undefined : {
1625
+ logicalType: column.logicalType,
1626
+ collation: name,
1627
+ });
1628
+ if (keyed === undefined)
1629
+ return true; // never-text: key bytes are type-native
1630
+ return normalizeCollationName(keyed || 'BINARY') === name;
1631
+ });
1632
+ return seekable ? index : null;
1569
1633
  }
1570
1634
  /**
1571
1635
  * Checks all non-PK UNIQUE constraints against the merged view.