@quereus/store 4.4.0 → 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.
Files changed (33) hide show
  1. package/README.md +5 -0
  2. package/dist/src/common/cached-kv-store.js +4 -0
  3. package/dist/src/common/cached-kv-store.js.map +1 -1
  4. package/dist/src/common/encoding.d.ts +32 -1
  5. package/dist/src/common/encoding.d.ts.map +1 -1
  6. package/dist/src/common/encoding.js +42 -10
  7. package/dist/src/common/encoding.js.map +1 -1
  8. package/dist/src/common/index.d.ts +3 -2
  9. package/dist/src/common/index.d.ts.map +1 -1
  10. package/dist/src/common/index.js +3 -1
  11. package/dist/src/common/index.js.map +1 -1
  12. package/dist/src/common/json-key.d.ts +96 -0
  13. package/dist/src/common/json-key.d.ts.map +1 -0
  14. package/dist/src/common/json-key.js +204 -0
  15. package/dist/src/common/json-key.js.map +1 -0
  16. package/dist/src/common/key-builder.d.ts +40 -5
  17. package/dist/src/common/key-builder.d.ts.map +1 -1
  18. package/dist/src/common/key-builder.js +59 -21
  19. package/dist/src/common/key-builder.js.map +1 -1
  20. package/dist/src/common/kv-store.d.ts +12 -2
  21. package/dist/src/common/kv-store.d.ts.map +1 -1
  22. package/dist/src/common/store-module.d.ts +64 -15
  23. package/dist/src/common/store-module.d.ts.map +1 -1
  24. package/dist/src/common/store-module.js +349 -125
  25. package/dist/src/common/store-module.js.map +1 -1
  26. package/dist/src/common/store-table.d.ts +125 -11
  27. package/dist/src/common/store-table.d.ts.map +1 -1
  28. package/dist/src/common/store-table.js +235 -34
  29. package/dist/src/common/store-table.js.map +1 -1
  30. package/dist/src/testing/kv-conformance.d.ts.map +1 -1
  31. package/dist/src/testing/kv-conformance.js +32 -0
  32. package/dist/src/testing/kv-conformance.js.map +1 -1
  33. package/package.json +5 -5
@@ -1 +1 @@
1
- {"version":3,"file":"store-table.d.ts","sourceRoot":"","sources":["../../../src/common/store-table.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;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AC,EAAE,QAAQ,EAAE,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,KAAK,CAAC;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,iBAAiB,CAAC;QAAC,KAAK,CAAC,EAAE,QAAQ,CAAA;KAAE,CAAC,CAAC;CACtF;AAED;;;;;;GAMG;AACH,UAAU,kBAAkB;IAC3B,KAAK,EAAE,gBAAgB,CAAC;IACxB,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC;IACxB,MAAM,EAAE,cAAc,CAAC;CACvB"}
@@ -9,11 +9,12 @@
9
9
  * - Index stores: {schema}.{table}_idx_{name} - one per secondary index
10
10
  * - Stats store: __stats__ - unified store for all table statistics, keyed by {schema}.{table}
11
11
  */
12
- import { VirtualTable, IndexConstraintOp, ConflictResolution, QuereusError, StatusCode, compareSqlValues, compareSqlValuesFast, resolveUniqueEnforcementCollations, BINARY_COLLATION, rowsValueIdentical, validateAndParse, compilePredicate, decodeIdxStr, maintainedTableUniqueViolationError, uniqueEnforcementCollations, logicalTypeCanHoldText, pkKeyCollationName, } from '@quereus/quereus';
12
+ import { VirtualTable, IndexConstraintOp, ConflictResolution, QuereusError, StatusCode, compareSqlValues, compareSqlValuesFast, createTypedComparator, hasSemanticOrdering, semanticKeyTransform, resolveUniqueEnforcementCollations, uniqueEnforcementComparators, BINARY_COLLATION, rowsValueIdentical, coerceRowToSchema, compilePredicate, decodeIdxStr, maintainedTableUniqueViolationError, uniqueEnforcementCollations, logicalTypeCanHoldText, pkKeyCollationName, JSON_TYPE, } from '@quereus/quereus';
13
13
  import { bytesEqual, bytesToHex, compareBytes } from './bytes.js';
14
14
  import { StoreConnection } from './store-connection.js';
15
15
  import { buildDataKey, buildIndexKey, buildIndexPrefixBounds, buildFullScanBounds, buildPkPrefixBounds, buildStatsKey, } from './key-builder.js';
16
16
  import { serializeRow, deserializeRow, serializeStats, deserializeStats, } from './serialization.js';
17
+ import { jsonStructuralKey } from './json-key.js';
17
18
  /** Number of mutations before persisting statistics. */
18
19
  const STATS_FLUSH_INTERVAL = 100;
19
20
  /** True when `key` falls within the (gte/gt/lte/lt) window of `bounds`. */
@@ -87,6 +88,76 @@ export function resolvePkKeyCollations(pkDef, columns, fallback) {
87
88
  return name === undefined ? undefined : (name || fallback).toUpperCase();
88
89
  });
89
90
  }
91
+ /**
92
+ * The store's per-type key VALUE TRANSFORM for a semantic-ordering logical type, or
93
+ * `undefined` when raw values already key faithfully.
94
+ *
95
+ * The contract is TWO-sided — identity AND order. `StoreTable` implements no
96
+ * `comparePrimaryKey`, so the isolation layer merges overlay against underlying with
97
+ * its own fallback comparator (the PK type's `compare` via `createTypedComparator`)
98
+ * and needs this table's key BYTE order to agree with it; and byte equality must be
99
+ * exactly the type's equality, or two spellings of one value land on two keys.
100
+ *
101
+ * - JSON → the store-local structural encoder ({@link jsonStructuralKey}): a
102
+ * `Uint8Array` whose memcmp order reproduces the type's structural `compare`
103
+ * (canonical-text bytes are identity-faithful but sort `[10]` before `[2]`,
104
+ * which broke overlay shadowing — see json-key.ts).
105
+ * - Everything else → the engine's {@link semanticKeyTransform} (the type's
106
+ * `groupKey`). Today that is TIMESPAN: total seconds against the same reference
107
+ * date as `TIMESPAN.compare`, so 'PT1H' and 'PT60M' collide on one key AND byte
108
+ * order is elapsed-time order.
109
+ *
110
+ * JSON deliberately gets NO engine `groupKey` — `groupKey` also drives GROUP BY /
111
+ * `IN` / hash-join identity, where canonical-text identity is already correct and a
112
+ * `Uint8Array` key would be a behaviour change for no benefit. Hence this
113
+ * store-local seam. A semantic-ordering type with NEITHER a `groupKey` nor an entry
114
+ * here cannot key a persisted structure soundly; `StoreTable` rejects it at DDL time
115
+ * (see `validateSemanticKeyTransforms`).
116
+ */
117
+ export function storeSemanticKeyTransform(type) {
118
+ // Matched by NAME, not object identity (`type === JSON_TYPE`): the engine and this
119
+ // package can be loaded as two module instances (e.g. the logic suite runs the
120
+ // engine from src via ts-node while the store resolves `@quereus/quereus` to dist),
121
+ // and each instance carries its own JSON_TYPE singleton. The `hasSemanticOrdering`
122
+ // gate keeps a hypothetical plain custom type named 'JSON' out of this branch.
123
+ if (hasSemanticOrdering(type) && type.name === JSON_TYPE.name)
124
+ return jsonStructuralKey;
125
+ return semanticKeyTransform(type);
126
+ }
127
+ /**
128
+ * Resolve the per-column key value transform for each primary-key column —
129
+ * {@link storeSemanticKeyTransform} of the member's logical type. One entry per PK
130
+ * member in `pkDef` order; `undefined` for every type whose raw value already keys
131
+ * faithfully. The companion of {@link resolvePkKeyCollations}: every call site that
132
+ * threads the collations MUST thread these too, or key identity/order drifts
133
+ * between the write path and the rebuild/lookup path.
134
+ */
135
+ export function resolvePkKeyTransforms(pkDef, columns) {
136
+ return pkDef.map(def => storeSemanticKeyTransform(columns[def.index]?.logicalType));
137
+ }
138
+ /**
139
+ * Per-column key value transforms for a secondary index's OWN columns (the
140
+ * index half of `buildIndexKey`), positionally aligned with `index.columns`.
141
+ * Same rule as {@link resolvePkKeyTransforms}: a semantic-ordering member
142
+ * canonicalizes through {@link storeSemanticKeyTransform}, everything else
143
+ * encodes raw.
144
+ */
145
+ export function resolveIndexKeyTransforms(index, columns) {
146
+ return index.columns.map(col => storeSemanticKeyTransform(columns[col.index]?.logicalType));
147
+ }
148
+ /**
149
+ * Per-PK-column typed equality comparator for semantic-ordering members, `undefined`
150
+ * elsewhere. Backs {@link StoreTable.keysEqual}: two PK arrays naming the same
151
+ * physical key under {@link resolvePkKeyTransforms} ('PT1H' / 'PT60M') must also
152
+ * answer "same row" here, or self-PK exclusion in the UNIQUE checks false-conflicts
153
+ * a row against its own differently-spelled image.
154
+ */
155
+ function resolvePkSemanticEquality(pkDef, columns) {
156
+ return pkDef.map(def => {
157
+ const logicalType = columns[def.index]?.logicalType;
158
+ return hasSemanticOrdering(logicalType) ? createTypedComparator(logicalType) : undefined;
159
+ });
160
+ }
90
161
  /**
91
162
  * True when `col` can produce a TEXT value at runtime, and so when its physical
92
163
  * key bytes are produced by a collation normalizer rather than a type-native
@@ -128,6 +199,17 @@ export function columnCanHoldText(col) {
128
199
  * "mark handled" and "build a window" decisions can never disagree.
129
200
  */
130
201
  export function keyOrderMatchesCollation(db, column, keyCollation, compareCollation) {
202
+ // A semantic-ordering logical type (TIMESPAN, JSON — see docs/types.md "Semantic
203
+ // ordering") is ordered by its `compare` (elapsed time / structural), which the
204
+ // engine's Sort, comparison operators, and the memory backend all use. Both types'
205
+ // key bytes now encode through an order-preserving transform (TIMESPAN's `groupKey`
206
+ // total seconds; JSON's structural encoding — see `storeSemanticKeyTransform`), so
207
+ // byte order DOES match the type's `compare` for every well-formed value and this
208
+ // blanket decline is conservative, costing the seek/sort-elision, never a row.
209
+ // Re-opening the window/advertisement (and the byte-EQ arms in `analyzePKAccess` /
210
+ // `analyzeIndexAccess`) is tracked in backlog `feat-reopen-timespan-store-seeks`.
211
+ if (hasSemanticOrdering(column?.logicalType))
212
+ return false;
131
213
  if (!columnCanHoldText(column))
132
214
  return true;
133
215
  if (compareCollation.toUpperCase() !== keyCollation.toUpperCase())
@@ -145,13 +227,12 @@ export function keyOrderMatchesCollation(db, column, keyCollation, compareCollat
145
227
  * already aligned with the key collation for every *textual* PK member.
146
228
  *
147
229
  * What the advertisement is measured against is the order the planner's `Sort` would have
148
- * produced, and `Sort` (like every scalar comparison) orders under the operand's COLLATION via
149
- * `compareSqlValuesFast` never through `logicalType.compare`. So a collation match is the
150
- * whole question, even for a member whose type declares a `compare` that orders differently
151
- * (`TIMESPAN.compare` ranks by `Temporal.Duration` total, `JSON_TYPE.compare` structurally).
152
- * `MemoryTable`, whose primary-key BTree *is* keyed by `createTypedComparator`, advertises the
153
- * type's order instead and so disagrees with its own `Sort` tracked as
154
- * `bug-memory-pk-btree-orders-by-logical-type-compare`, not something the store should copy.
230
+ * produced. For most members Sort orders under the operand's COLLATION, so a collation match
231
+ * is the question; for a member whose logical type carries SEMANTIC ordering (TIMESPAN, JSON
232
+ * see docs/types.md "Semantic ordering") Sort now ranks by `logicalType.compare`, which no
233
+ * text-byte encoding reproduces, and {@link keyOrderMatchesCollation} closes the gate for
234
+ * such members outright (the memory backend's typed BTree order is the canonical order under
235
+ * that ruling; the store declines rather than advertising a divergent byte order).
155
236
  *
156
237
  * `0` ⇒ even the leading member is unsafe: no range seek, no PK-order advertisement.
157
238
  * A prefix shorter than the PK truncates the ordering advertisement rather than voiding it.
@@ -279,6 +360,21 @@ export class StoreTable extends VirtualTable {
279
360
  * {@link updateSchema} (an ALTER COLUMN SET COLLATE on a PK member changes it).
280
361
  */
281
362
  pkKeyCollations;
363
+ /**
364
+ * Per-PK-column key-identity value transform (see {@link resolvePkKeyTransforms}).
365
+ * Threaded alongside {@link pkKeyCollations} into every data-key / PK-suffix /
366
+ * PK-prefix-bounds encode, so a semantic-ordering PK member (TIMESPAN) keys
367
+ * semantically-equal spellings to one physical key. Recomputed on every
368
+ * {@link updateSchema}.
369
+ */
370
+ pkKeyTransforms;
371
+ /**
372
+ * Per-PK-column typed EQUALITY comparator for the semantic-ordering members only —
373
+ * `undefined` for every other member, which {@link keysEqual} still compares with
374
+ * strict `!==` as before. Keeps self-PK exclusion and PK-identity questions in
375
+ * agreement with the physical key identity above ('PT1H' row IS the 'PT60M' row).
376
+ */
377
+ pkSemanticEquality;
282
378
  /**
283
379
  * `db.getCollationResolver()`, bound once at construction. Every collation-aware
284
380
  * VALUE comparison this table makes — pushed-constraint re-check, UNIQUE conflict
@@ -345,9 +441,12 @@ export class StoreTable extends VirtualTable {
345
441
  };
346
442
  this.pkDirections = tableSchema.primaryKeyDefinition.map(pk => !!pk.desc);
347
443
  this.pkKeyCollations = resolvePkKeyCollations(tableSchema.primaryKeyDefinition, tableSchema.columns, this.encodeOptions.collation ?? 'NOCASE');
444
+ this.pkKeyTransforms = resolvePkKeyTransforms(tableSchema.primaryKeyDefinition, tableSchema.columns);
445
+ this.pkSemanticEquality = resolvePkSemanticEquality(tableSchema.primaryKeyDefinition, tableSchema.columns);
348
446
  // Validate the MATERIALIZED schema, so a `_uc_*` over a text column that needs the
349
447
  // table key collation K is rejected up front just like an explicit index would be.
350
448
  this.validateKeyCollations(this.materializedSchema, this.pkKeyCollations);
449
+ this.validateSemanticKeyTransforms(this.materializedSchema);
351
450
  this.ddlSaved = isConnected;
352
451
  }
353
452
  /**
@@ -397,6 +496,47 @@ export class StoreTable extends VirtualTable {
397
496
  + `— pass { normalizer } to registerCollation`, StatusCode.ERROR);
398
497
  }
399
498
  }
499
+ /**
500
+ * Reject, at DDL time, a key member whose semantic-ordering logical type has no
501
+ * store key transform — before a single row is keyed under bytes whose order the
502
+ * type's `compare` (and so the isolation merge, the memory oracle, and Sort)
503
+ * disagrees with.
504
+ *
505
+ * A semantic-ordering type keys soundly only through an order- and
506
+ * identity-preserving transform ({@link storeSemanticKeyTransform}: the type's
507
+ * `groupKey`, or a store-local encoder like JSON's structural one). This gap used
508
+ * to be undetectable — JSON sat here transform-less for a release, keying in
509
+ * canonical-text order while every comparator ordered structurally, and the only
510
+ * symptom was a misaligned overlay merge deep inside a transaction. Unreachable
511
+ * today (TIMESPAN and JSON are both covered); it exists so the NEXT
512
+ * semantic-ordering type fails loudly at CREATE TABLE instead.
513
+ *
514
+ * Checked over the same materialized schema as {@link validateKeyCollations}:
515
+ * every PK member and every (explicit or hidden `_uc_*`) index column.
516
+ *
517
+ * CAVEAT: this can only check that a transform EXISTS — a `groupKey` that is
518
+ * identity-faithful but not order-preserving passes undetected, so a new type's
519
+ * transform still needs its byte order argued against its `compare` (see
520
+ * json-key.ts for the shape of that argument).
521
+ */
522
+ validateSemanticKeyTransforms(schema) {
523
+ const check = (colIndex, member) => {
524
+ const col = schema.columns[colIndex];
525
+ const type = col?.logicalType;
526
+ if (!hasSemanticOrdering(type) || storeSemanticKeyTransform(type) !== undefined)
527
+ return;
528
+ throw new QuereusError(`column ${col?.name ?? String(colIndex)} (${member}): semantic-ordering type `
529
+ + `${type.name} cannot key a persisted structure: its raw encoding would not `
530
+ + `reproduce the type's compare order — the type needs an order-preserving `
531
+ + `groupKey or a store key encoder (see storeSemanticKeyTransform)`, StatusCode.ERROR);
532
+ };
533
+ for (const def of schema.primaryKeyDefinition)
534
+ check(def.index, 'primary key');
535
+ for (const index of schema.indexes ?? []) {
536
+ for (const col of index.columns)
537
+ check(col.index, `index ${index.name}`);
538
+ }
539
+ }
400
540
  /** Get the table configuration. */
401
541
  getConfig() {
402
542
  return this.config;
@@ -427,10 +567,13 @@ export class StoreTable extends VirtualTable {
427
567
  const materialized = withImplicitUniqueIndexes(newSchema);
428
568
  const pkKeyCollations = resolvePkKeyCollations(newSchema.primaryKeyDefinition, newSchema.columns, this.encodeOptions.collation ?? 'NOCASE');
429
569
  this.validateKeyCollations(materialized, pkKeyCollations);
570
+ this.validateSemanticKeyTransforms(materialized);
430
571
  this.tableSchema = newSchema;
431
572
  this.materializedSchema = materialized;
432
573
  this.pkDirections = newSchema.primaryKeyDefinition.map(pk => !!pk.desc);
433
574
  this.pkKeyCollations = pkKeyCollations;
575
+ this.pkKeyTransforms = resolvePkKeyTransforms(newSchema.primaryKeyDefinition, newSchema.columns);
576
+ this.pkSemanticEquality = resolvePkSemanticEquality(newSchema.primaryKeyDefinition, newSchema.columns);
434
577
  }
435
578
  /**
436
579
  * Mark the table's DDL as already persisted to the catalog, so the lazy
@@ -566,9 +709,13 @@ export class StoreTable extends VirtualTable {
566
709
  const bounds = buildFullScanBounds();
567
710
  const newPkDirections = newPkDef.map(pk => !!pk.desc);
568
711
  const newPkCollations = resolvePkKeyCollations(newPkDef, newColumns, this.encodeOptions.collation ?? 'NOCASE');
712
+ // Post-ALTER key-identity transforms too: an ALTER PRIMARY KEY onto (or a SET
713
+ // DATA TYPE creating) a semantic-ordering member must collapse equal spellings
714
+ // — pass 1 then rejects 'PT1H'/'PT60M' as a duplicate PK, all-or-nothing.
715
+ const newPkTransforms = resolvePkKeyTransforms(newPkDef, newColumns);
569
716
  // Both passes key rows through this one helper, so a collision judged in pass 1
570
717
  // is byte-identical to the key pass 2 writes.
571
- const computeNewKey = (row) => buildDataKey(newPkDef.map(pk => row[pk.index]), this.encodeOptions, newPkDirections, newPkCollations);
718
+ const computeNewKey = (row) => buildDataKey(newPkDef.map(pk => row[pk.index]), this.encodeOptions, newPkDirections, newPkCollations, newPkTransforms);
572
719
  // Pass 1 — collision detection only. Hold one hex signature per new key, never
573
720
  // the row or old key. On a repeat, reject before any write; the store is
574
721
  // untouched on rejection.
@@ -783,11 +930,7 @@ export class StoreTable extends VirtualTable {
783
930
  * objects before PK extraction, serialization, and index-key construction.
784
931
  */
785
932
  coerceRow(row) {
786
- const cols = this.tableSchema.columns;
787
- if (row.length > cols.length) {
788
- throw new QuereusError(`Too many values for ${this.schemaName}.${this.tableName}: expected ${cols.length}, got ${row.length}`, StatusCode.ERROR);
789
- }
790
- return row.map((v, i) => validateAndParse(v, cols[i].logicalType, cols[i].name));
933
+ return coerceRowToSchema(row, this.tableSchema.columns, `${this.schemaName}.${this.tableName}`);
791
934
  }
792
935
  /**
793
936
  * Query the table with optional filters.
@@ -891,6 +1034,22 @@ export class StoreTable extends VirtualTable {
891
1034
  leadingPkRangeIsOrderSafe() {
892
1035
  return pkOrderPreservingPrefixLength(this.db, this.tableSchema, this.pkKeyCollations, this.encodeOptions.collation ?? 'NOCASE') >= 1;
893
1036
  }
1037
+ /**
1038
+ * True when some PK member's logical type carries semantic ordering (TIMESPAN,
1039
+ * JSON). Such PKs decline the point arm and full-scan, where
1040
+ * {@link matchesFilters} applies the type's compare. Historically required —
1041
+ * byte-key equality was a strict subset of the type's equality ('PT1H' ≡
1042
+ * 'PT60M' elapsed-time-equal, byte-distinct) and a point window under-fetched
1043
+ * with no residual able to resurrect a skipped row. Both types' key transforms
1044
+ * (see {@link storeSemanticKeyTransform}) now make byte equality the type's
1045
+ * equality, so the decline is conservative; re-opening is tracked in backlog
1046
+ * `feat-reopen-timespan-store-seeks`. (Range windows and ordering
1047
+ * advertisements are already declined by {@link keyOrderMatchesCollation}.)
1048
+ */
1049
+ pkHasSemanticOrderingMember() {
1050
+ const schema = this.tableSchema;
1051
+ return schema.primaryKeyDefinition.some(def => hasSemanticOrdering(schema.columns[def.index]?.logicalType));
1052
+ }
894
1053
  /** Analyze filter info to determine PK access pattern. */
895
1054
  analyzePKAccess(filterInfo) {
896
1055
  const schema = this.tableSchema;
@@ -912,7 +1071,7 @@ export class StoreTable extends VirtualTable {
912
1071
  break;
913
1072
  }
914
1073
  }
915
- if (allEq) {
1074
+ if (allEq && !this.pkHasSemanticOrderingMember()) {
916
1075
  return { type: 'point', values: eqValues };
917
1076
  }
918
1077
  // Check for range constraints on first PK column
@@ -1068,9 +1227,14 @@ export class StoreTable extends VirtualTable {
1068
1227
  return null;
1069
1228
  const indexCols = index.columns.map(c => c.index);
1070
1229
  const indexDirections = index.columns.map(c => !!c.desc);
1071
- // Contiguous leading-prefix EQ → point/prefix window.
1230
+ // Contiguous leading-prefix EQ → point/prefix window. A prefix member whose
1231
+ // logical type carries semantic ordering stops the prefix: its byte-equality
1232
+ // window under-fetches the type's equality (see pkHasSemanticOrderingMember),
1233
+ // and a skipped row cannot be resurrected by the residual.
1072
1234
  const eqValues = [];
1073
1235
  for (let i = 0; i < indexCols.length; i++) {
1236
+ if (hasSemanticOrdering(this.tableSchema.columns[indexCols[i]]?.logicalType))
1237
+ break;
1074
1238
  const eq = filterInfo.constraints?.find(c => c.constraint.iColumn === indexCols[i]
1075
1239
  && c.constraint.op === IndexConstraintOp.EQ
1076
1240
  && c.argvIndex > 0);
@@ -1225,7 +1389,16 @@ export class StoreTable extends VirtualTable {
1225
1389
  const rowValue = row[constraint.iColumn];
1226
1390
  const filterValue = filterInfo.args[argvIndex - 1];
1227
1391
  const collation = collations.get(constraint.iColumn) ?? BINARY_COLLATION;
1228
- if (!this.compareValues(rowValue, constraint.op, filterValue, collation)) {
1392
+ // A semantic-ordering column (TIMESPAN, JSON) must filter under the type's
1393
+ // compare — the same order the engine's operators and Sort use — or a pushed
1394
+ // `d > 'PT90M'` would text-compare and drop rows the predicate admits. The
1395
+ // comparator is built per row only on this rare column kind; if a profile
1396
+ // ever shows it, resolve it once per scan alongside the collations.
1397
+ const logicalType = this.tableSchema.columns[constraint.iColumn]?.logicalType;
1398
+ const compare = hasSemanticOrdering(logicalType)
1399
+ ? createTypedComparator(logicalType, collation)
1400
+ : undefined;
1401
+ if (!this.compareValues(rowValue, constraint.op, filterValue, collation, compare)) {
1229
1402
  return false;
1230
1403
  }
1231
1404
  }
@@ -1296,11 +1469,11 @@ export class StoreTable extends VirtualTable {
1296
1469
  * NULL on either side fails every operator except EQ-with-both-NULL (the
1297
1470
  * internal point-lookup convention; the planner never pushes `= NULL`).
1298
1471
  */
1299
- compareValues(a, op, b, collationFunc) {
1472
+ compareValues(a, op, b, collationFunc, semanticCompare) {
1300
1473
  if (a === null || b === null) {
1301
1474
  return op === IndexConstraintOp.EQ ? a === b : false;
1302
1475
  }
1303
- const cmp = compareSqlValuesFast(a, b, collationFunc);
1476
+ const cmp = semanticCompare ? semanticCompare(a, b) : compareSqlValuesFast(a, b, collationFunc);
1304
1477
  switch (op) {
1305
1478
  case IndexConstraintOp.EQ: return cmp === 0;
1306
1479
  case IndexConstraintOp.NE: return cmp !== 0;
@@ -1324,7 +1497,7 @@ export class StoreTable extends VirtualTable {
1324
1497
  throw new QuereusError('INSERT requires values', StatusCode.MISUSE);
1325
1498
  const coerced = args.preCoerced ? values : this.coerceRow(values);
1326
1499
  const pk = this.extractPK(coerced);
1327
- const key = buildDataKey(pk, this.encodeOptions, this.pkDirections, this.pkKeyCollations);
1500
+ const key = this.encodeDataKey(pk);
1328
1501
  // Check for existing row (for conflict handling).
1329
1502
  // Resolve PK-conflict action: statement OR > per-constraint default > ABORT.
1330
1503
  const pkEffective = args.onConflict ?? resolvePkDefaultConflict(schema) ?? ConflictResolution.ABORT;
@@ -1442,8 +1615,8 @@ export class StoreTable extends VirtualTable {
1442
1615
  const coerced = args.preCoerced ? values : this.coerceRow(values);
1443
1616
  const oldPk = this.extractPK(oldKeyValues);
1444
1617
  const newPk = this.extractPK(coerced);
1445
- const oldKey = buildDataKey(oldPk, this.encodeOptions, this.pkDirections, this.pkKeyCollations);
1446
- const newKey = buildDataKey(newPk, this.encodeOptions, this.pkDirections, this.pkKeyCollations);
1618
+ const oldKey = this.encodeDataKey(oldPk);
1619
+ const newKey = this.encodeDataKey(newPk);
1447
1620
  // Get old row for index updates. Read the effective
1448
1621
  // (pending-over-committed) image UNCONDITIONALLY — including the trusted
1449
1622
  // flush path — so an old image written earlier in the same transaction is
@@ -1558,7 +1731,7 @@ export class StoreTable extends VirtualTable {
1558
1731
  if (!oldKeyValues)
1559
1732
  throw new QuereusError('DELETE requires oldKeyValues', StatusCode.MISUSE);
1560
1733
  const pk = this.extractPK(oldKeyValues);
1561
- const key = buildDataKey(pk, this.encodeOptions, this.pkDirections, this.pkKeyCollations);
1734
+ const key = this.encodeDataKey(pk);
1562
1735
  // Get old row for index cleanup. Read the effective
1563
1736
  // (pending-over-committed) image so a row inserted earlier in the same
1564
1737
  // transaction is seen: this fixes index cleanup, the `-1` stats delta
@@ -1614,6 +1787,9 @@ export class StoreTable extends VirtualTable {
1614
1787
  const indexStore = await this.ensureIndexStore(index.name);
1615
1788
  const indexCols = index.columns.map(c => c.index);
1616
1789
  const indexDirections = index.columns.map(c => !!c.desc);
1790
+ // Canonicalize semantic-ordering index members ('PT1H'/'PT60M' → one key) so a
1791
+ // UNIQUE enforcement seek and delete-then-insert maintenance address one entry.
1792
+ const indexTransforms = resolveIndexKeyTransforms(index, this.tableSchema.columns);
1617
1793
  // Partial index: only rows the predicate unambiguously accepts are
1618
1794
  // indexed (mirrors buildIndexEntries' build-time filtering). Guarding both
1619
1795
  // halves keeps a row that transitions across the predicate scope on UPDATE
@@ -1624,7 +1800,7 @@ export class StoreTable extends VirtualTable {
1624
1800
  // Remove old index entry (only if the old row was within scope).
1625
1801
  if (oldRow && (!predicate || predicate.evaluate(oldRow) === true)) {
1626
1802
  const oldIndexValues = indexCols.map(i => oldRow[i]);
1627
- const oldIndexKey = buildIndexKey(oldIndexValues, oldPk, this.encodeOptions, indexDirections, this.pkDirections, this.pkKeyCollations);
1803
+ const oldIndexKey = buildIndexKey(oldIndexValues, oldPk, this.encodeOptions, indexDirections, this.pkDirections, this.pkKeyCollations, indexTransforms, this.pkKeyTransforms);
1628
1804
  if (inTransaction && this.coordinator) {
1629
1805
  this.coordinator.delete(oldIndexKey, indexStore);
1630
1806
  }
@@ -1635,7 +1811,7 @@ export class StoreTable extends VirtualTable {
1635
1811
  // Add new index entry (only if the new row is within scope).
1636
1812
  if (newRow && (!predicate || predicate.evaluate(newRow) === true)) {
1637
1813
  const newIndexValues = indexCols.map(i => newRow[i]);
1638
- const newIndexKey = buildIndexKey(newIndexValues, newPk, this.encodeOptions, indexDirections, this.pkDirections, this.pkKeyCollations);
1814
+ const newIndexKey = buildIndexKey(newIndexValues, newPk, this.encodeOptions, indexDirections, this.pkDirections, this.pkKeyCollations, indexTransforms, this.pkKeyTransforms);
1639
1815
  // Index value = the row's encoded DATA key. The index-entry key can
1640
1816
  // locate a row's byte window, but its PK suffix is not losslessly
1641
1817
  // recoverable to SqlValues (a NOCASE/RTRIM PK column encodes lossily)
@@ -1684,16 +1860,36 @@ export class StoreTable extends VirtualTable {
1684
1860
  }
1685
1861
  return compiled;
1686
1862
  }
1687
- /** Check if two PK arrays are equal. */
1863
+ /**
1864
+ * Check if two PK arrays name the same row. A semantic-ordering member compares
1865
+ * through its type's `compare` (see {@link resolvePkSemanticEquality}) so
1866
+ * differently-spelled equal values ('PT1H' / 'PT60M') answer "same row",
1867
+ * agreeing with the physical key identity {@link encodeDataKey} produces; every
1868
+ * other member keeps the original strict `!==`.
1869
+ */
1688
1870
  keysEqual(a, b) {
1689
1871
  if (a.length !== b.length)
1690
1872
  return false;
1691
1873
  for (let i = 0; i < a.length; i++) {
1692
- if (a[i] !== b[i])
1874
+ const semantic = this.pkSemanticEquality[i];
1875
+ if (semantic ? semantic(a[i], b[i]) !== 0 : a[i] !== b[i])
1693
1876
  return false;
1694
1877
  }
1695
1878
  return true;
1696
1879
  }
1880
+ /**
1881
+ * Per-constrained-column comparison functions for one UNIQUE constraint: the
1882
+ * type's `compare` for a semantic-ordering column (so 'PT1H' conflicts with
1883
+ * 'PT60M', matching the memory backend's typed BTree), else the enforcement
1884
+ * collation the caller resolved (`resolveUniqueEnforcementCollations`) through
1885
+ * `compareSqlValuesFast` — the exact comparison every finder used before.
1886
+ *
1887
+ * Thin wrapper over the engine's `uniqueEnforcementComparators`, which memory
1888
+ * and the isolation overlay share so the three backends cannot drift.
1889
+ */
1890
+ uniqueColumnComparators(uc, collations) {
1891
+ return uniqueEnforcementComparators(this.tableSchema.columns, uc.columns, collations);
1892
+ }
1697
1893
  /**
1698
1894
  * Returns true if any column covered by a UNIQUE constraint differs between
1699
1895
  * oldRow and newRow, or — for partial UNIQUE — any column referenced by the
@@ -1927,7 +2123,10 @@ export class StoreTable extends VirtualTable {
1927
2123
  // unregistered name and cannot be inlined, so a per-candidate call would be
1928
2124
  // pure overhead.
1929
2125
  const collations = resolveUniqueEnforcementCollations(this.tableSchema, uc, this.collationResolver);
1930
- const bounds = buildIndexPrefixBounds(uc.columns.map(c => newRow[c]), this.encodeOptions, index.columns.map(c => !!c.desc));
2126
+ const compares = this.uniqueColumnComparators(uc, collations);
2127
+ // Same per-column transforms `updateSecondaryIndexes` wrote the entries under, so
2128
+ // the probe for 'PT60M' lands on the window holding the 'PT1H' entry.
2129
+ const bounds = buildIndexPrefixBounds(uc.columns.map(c => newRow[c]), this.encodeOptions, index.columns.map(c => !!c.desc), resolveIndexKeyTransforms(index, this.tableSchema.columns));
1931
2130
  for await (const entry of this.iterateEffective(indexStore, bounds)) {
1932
2131
  // A legacy index store (written before index values carried the data key)
1933
2132
  // holds EMPTY values. `scanIndex` may skip such an entry — a read that
@@ -1944,7 +2143,7 @@ export class StoreTable extends VirtualTable {
1944
2143
  const pk = this.extractPK(candidate);
1945
2144
  if (selfPks.some(skip => this.keysEqual(pk, skip)))
1946
2145
  continue;
1947
- if (uc.columns.some((c, i) => compareSqlValuesFast(newRow[c], candidate[c], collations[i]) !== 0))
2146
+ if (uc.columns.some((c, i) => compares[i](newRow[c], candidate[c]) !== 0))
1948
2147
  continue;
1949
2148
  if (predicate && predicate.evaluate(candidate) !== true)
1950
2149
  continue;
@@ -1971,6 +2170,7 @@ export class StoreTable extends VirtualTable {
1971
2170
  // COLLATE for an index-derived UNIQUE, else the declared column collation.
1972
2171
  // Resolved once here, not per candidate row.
1973
2172
  const collations = resolveUniqueEnforcementCollations(this.tableSchema, uc, this.collationResolver);
2173
+ const compares = this.uniqueColumnComparators(uc, collations);
1974
2174
  const matches = (candidate) => {
1975
2175
  const pk = this.extractPK(candidate);
1976
2176
  for (const skip of selfPks) {
@@ -1979,7 +2179,7 @@ export class StoreTable extends VirtualTable {
1979
2179
  }
1980
2180
  for (let i = 0; i < constrainedCols.length; i++) {
1981
2181
  const idx = constrainedCols[i];
1982
- if (compareSqlValuesFast(newRow[idx], candidate[idx], collations[i]) !== 0)
2182
+ if (compares[i](newRow[idx], candidate[idx]) !== 0)
1983
2183
  return null;
1984
2184
  }
1985
2185
  // Partial UNIQUE: candidate must also be in the predicate's scope to conflict.
@@ -2024,6 +2224,7 @@ export class StoreTable extends VirtualTable {
2024
2224
  const newSourcePk = this.extractPK(newRow);
2025
2225
  // Resolved once, above the candidate loop.
2026
2226
  const collations = resolveUniqueEnforcementCollations(this.tableSchema, uc, this.collationResolver);
2227
+ const compares = this.uniqueColumnComparators(uc, collations);
2027
2228
  const candidates = await this.db._lookupCoveringConflicts(mv, uc, newRow, newSourcePk);
2028
2229
  for (const cand of candidates) {
2029
2230
  const liveRow = await this.readLiveRowByPk(cand.pk);
@@ -2041,7 +2242,7 @@ export class StoreTable extends VirtualTable {
2041
2242
  // index over a BINARY column) is declined upstream by the collation gate in
2042
2243
  // findRowTimeCoveringStructure, so only BINARY-floor or equal-collation MVs
2043
2244
  // reach here — the superset this re-validation can soundly filter.
2044
- if (uc.columns.some((c, i) => compareSqlValuesFast(newRow[c], liveRow[c], collations[i]) !== 0))
2245
+ if (uc.columns.some((c, i) => compares[i](newRow[c], liveRow[c]) !== 0))
2045
2246
  continue;
2046
2247
  if (predicate && predicate.evaluate(liveRow) !== true)
2047
2248
  continue;
@@ -2065,7 +2266,7 @@ export class StoreTable extends VirtualTable {
2065
2266
  // the table's own read/write paths.
2066
2267
  /** Encode `pkValues` (in PK-definition order) exactly as the data store keys rows. */
2067
2268
  encodeDataKey(pkValues) {
2068
- return buildDataKey(pkValues, this.encodeOptions, this.pkDirections, this.pkKeyCollations);
2269
+ return buildDataKey(pkValues, this.encodeOptions, this.pkDirections, this.pkKeyCollations, this.pkKeyTransforms);
2069
2270
  }
2070
2271
  /**
2071
2272
  * Byte bounds covering every data key whose leading PK columns equal
@@ -2074,7 +2275,7 @@ export class StoreTable extends VirtualTable {
2074
2275
  * exact slice. An empty prefix yields full-scan bounds.
2075
2276
  */
2076
2277
  encodePkPrefixBounds(prefixValues) {
2077
- return buildPkPrefixBounds(prefixValues, this.encodeOptions, this.pkDirections.slice(0, prefixValues.length), this.pkKeyCollations.slice(0, prefixValues.length));
2278
+ return buildPkPrefixBounds(prefixValues, this.encodeOptions, this.pkDirections.slice(0, prefixValues.length), this.pkKeyCollations.slice(0, prefixValues.length), this.pkKeyTransforms.slice(0, prefixValues.length));
2078
2279
  }
2079
2280
  /**
2080
2281
  * Effective (pending-over-committed) point read by encoded data key: a pending
@@ -2284,7 +2485,7 @@ export class StoreTable extends VirtualTable {
2284
2485
  */
2285
2486
  async deleteRowAt(inTransaction, pk, oldRow) {
2286
2487
  const store = await this.ensureStore();
2287
- const key = buildDataKey(pk, this.encodeOptions, this.pkDirections, this.pkKeyCollations);
2488
+ const key = this.encodeDataKey(pk);
2288
2489
  if (inTransaction && this.coordinator) {
2289
2490
  this.coordinator.delete(key, store);
2290
2491
  }