@noy-db/hub 0.2.0-pre.14 → 0.2.0-pre.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/aggregate/index.cjs +56 -56
- package/dist/aggregate/index.cjs.map +1 -1
- package/dist/aggregate/index.d.cts +2 -2
- package/dist/aggregate/index.d.ts +2 -2
- package/dist/aggregate/index.js +3 -3
- package/dist/attestation/index.d.cts +5 -5
- package/dist/attestation/index.d.ts +5 -5
- package/dist/blobs/index.d.cts +6 -6
- package/dist/blobs/index.d.ts +6 -6
- package/dist/bundle/index.cjs +426 -68
- package/dist/bundle/index.cjs.map +1 -1
- package/dist/bundle/index.d.cts +7 -7
- package/dist/bundle/index.d.ts +7 -7
- package/dist/bundle/index.js +1 -1
- package/dist/{chunk-3EWA37FV.js → chunk-3EWXMOK3.js} +7 -266
- package/dist/chunk-3EWXMOK3.js.map +1 -0
- package/dist/{chunk-ACKFRSAH.js → chunk-7EFFHEN5.js} +26 -19
- package/dist/chunk-7EFFHEN5.js.map +1 -0
- package/dist/{chunk-UWNYBOOO.js → chunk-C5T5AFWN.js} +2 -2
- package/dist/chunk-CJORTUJ2.js +524 -0
- package/dist/chunk-CJORTUJ2.js.map +1 -0
- package/dist/{chunk-YNTBADIY.js → chunk-CZI2A4MQ.js} +2 -2
- package/dist/{chunk-KGCORI4L.js → chunk-EYVQHAGH.js} +266 -66
- package/dist/chunk-EYVQHAGH.js.map +1 -0
- package/dist/{chunk-NP6EZT44.js → chunk-IQLVUT37.js} +2 -2
- package/dist/{chunk-4PEFEETV.js → chunk-KIP6JLTF.js} +2 -2
- package/dist/{chunk-ZWTNWAO4.js → chunk-NU6Q3FOR.js} +3 -3
- package/dist/chunk-NU6Q3FOR.js.map +1 -0
- package/dist/{chunk-WIBHRONM.js → chunk-XWH4MXIU.js} +2 -2
- package/dist/consent/index.d.cts +6 -6
- package/dist/consent/index.d.ts +6 -6
- package/dist/derivations/index.d.cts +7 -7
- package/dist/derivations/index.d.ts +7 -7
- package/dist/{dev-unlock-DV7ujTCI.d.ts → dev-unlock-iAS8z9jc.d.ts} +1 -1
- package/dist/{dev-unlock-BF4OSxRv.d.cts → dev-unlock-nVkuRLLe.d.cts} +1 -1
- package/dist/{executor-723ZP6TH.js → executor-HSSRXDOB.js} +4 -4
- package/dist/guards/index.d.cts +7 -7
- package/dist/guards/index.d.ts +7 -7
- package/dist/{hash-BcF5WQXl.d.cts → hash-Cv6byZs7.d.cts} +1 -1
- package/dist/{hash-DswxkLtW.d.ts → hash-DHOnRarj.d.ts} +1 -1
- package/dist/history/index.d.cts +7 -7
- package/dist/history/index.d.ts +7 -7
- package/dist/i18n/index.d.cts +6 -6
- package/dist/i18n/index.d.ts +6 -6
- package/dist/{immutable-guard-C8IYdzfu.d.ts → immutable-guard-BehB1YGB.d.ts} +1 -1
- package/dist/{immutable-guard-7KqslW2K.d.cts → immutable-guard-yBEOYmif.d.cts} +1 -1
- package/dist/{index-CUVOMtgg.d.cts → index-D95VK1Qy.d.cts} +11 -3
- package/dist/{index-Cqzp4tt9.d.ts → index-XNB2r6bX.d.ts} +11 -3
- package/dist/index.cjs +567 -70
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +145 -15
- package/dist/index.d.ts +145 -15
- package/dist/index.js +132 -16
- package/dist/index.js.map +1 -1
- package/dist/indexing/index.cjs +92 -31
- package/dist/indexing/index.cjs.map +1 -1
- package/dist/indexing/index.d.cts +3 -3
- package/dist/indexing/index.d.ts +3 -3
- package/dist/indexing/index.js +3 -3
- package/dist/{lazy-builder-D5GU14TS.d.ts → lazy-builder-ChSqcF5t.d.ts} +1 -1
- package/dist/{lazy-builder-Ci5_YG73.d.cts → lazy-builder-eYZzLEL1.d.cts} +1 -1
- package/dist/materialized-views/index.cjs +2 -2
- package/dist/materialized-views/index.cjs.map +1 -1
- package/dist/materialized-views/index.d.cts +7 -7
- package/dist/materialized-views/index.d.ts +7 -7
- package/dist/materialized-views/index.js +5 -5
- package/dist/{noydb-VZ4JVW55.js → noydb-GZGFBA4E.js} +8 -8
- package/dist/overlay-views/index.d.cts +7 -7
- package/dist/overlay-views/index.d.ts +7 -7
- package/dist/periods/index.d.cts +6 -6
- package/dist/periods/index.d.ts +6 -6
- package/dist/{predicate-Bt5ft-9c.d.cts → predicate-BmhBSPCH.d.cts} +59 -2
- package/dist/{predicate-Bt5ft-9c.d.ts → predicate-BmhBSPCH.d.ts} +59 -2
- package/dist/query/index.cjs +580 -195
- package/dist/query/index.cjs.map +1 -1
- package/dist/query/index.d.cts +3 -3
- package/dist/query/index.d.ts +3 -3
- package/dist/query/index.js +5 -5
- package/dist/session/index.d.cts +7 -7
- package/dist/session/index.d.ts +7 -7
- package/dist/shadow/index.d.cts +6 -6
- package/dist/shadow/index.d.ts +6 -6
- package/dist/snapshots/index.d.cts +6 -6
- package/dist/snapshots/index.d.ts +6 -6
- package/dist/{stale-7FRJVHN6.js → stale-JH67FU57.js} +2 -2
- package/dist/store/index.d.cts +6 -6
- package/dist/store/index.d.ts +6 -6
- package/dist/{strategy-CrS7PnbE.d.ts → strategy-CbneC7bS.d.cts} +1 -1
- package/dist/{strategy-CrS7PnbE.d.cts → strategy-CbneC7bS.d.ts} +1 -1
- package/dist/sync/index.d.cts +5 -5
- package/dist/sync/index.d.ts +5 -5
- package/dist/team/index.d.cts +6 -6
- package/dist/team/index.d.ts +6 -6
- package/dist/tx/index.d.cts +6 -6
- package/dist/tx/index.d.ts +6 -6
- package/dist/{types-BFHQUjdy.d.ts → types-4t1-tWS4.d.ts} +22 -7
- package/dist/{types-V5R2-pd4.d.cts → types-BpPV5uyy.d.cts} +22 -7
- package/dist/{ulid-CwNf9e6-.d.cts → ulid-CiPrpGqm.d.cts} +1 -1
- package/dist/{ulid-p2nKiiKg.d.ts → ulid-DAfenvFd.d.ts} +1 -1
- package/dist/{vault-group-W7QC4UYW.js → vault-group-KOM7QRJG.js} +3 -3
- package/dist/{with-derivation-C9K43BOB.d.cts → with-derivation-DBqJB3dQ.d.cts} +1 -1
- package/dist/{with-derivation-Ds9yZgCj.d.ts → with-derivation-OK9M2sJE.d.ts} +1 -1
- package/dist/{with-materialized-view-DwR4jkV5.d.ts → with-materialized-view-Dt-ufPWQ.d.ts} +1 -1
- package/dist/{with-materialized-view-DgQcAjYv.d.cts → with-materialized-view-NzuxYPDF.d.cts} +1 -1
- package/dist/{with-overlayed-view-7-rUB3vD.d.cts → with-overlayed-view-CC0_ocy-.d.cts} +1 -1
- package/dist/{with-overlayed-view-ByyhHdVr.d.ts → with-overlayed-view-eDvMs6LO.d.ts} +1 -1
- package/package.json +3 -3
- package/dist/chunk-3EWA37FV.js.map +0 -1
- package/dist/chunk-ACKFRSAH.js.map +0 -1
- package/dist/chunk-KGCORI4L.js.map +0 -1
- package/dist/chunk-TV3YZ35S.js +0 -90
- package/dist/chunk-TV3YZ35S.js.map +0 -1
- package/dist/chunk-ZWTNWAO4.js.map +0 -1
- /package/dist/{chunk-UWNYBOOO.js.map → chunk-C5T5AFWN.js.map} +0 -0
- /package/dist/{chunk-YNTBADIY.js.map → chunk-CZI2A4MQ.js.map} +0 -0
- /package/dist/{chunk-NP6EZT44.js.map → chunk-IQLVUT37.js.map} +0 -0
- /package/dist/{chunk-4PEFEETV.js.map → chunk-KIP6JLTF.js.map} +0 -0
- /package/dist/{chunk-WIBHRONM.js.map → chunk-XWH4MXIU.js.map} +0 -0
- /package/dist/{executor-723ZP6TH.js.map → executor-HSSRXDOB.js.map} +0 -0
- /package/dist/{noydb-VZ4JVW55.js.map → noydb-GZGFBA4E.js.map} +0 -0
- /package/dist/{stale-7FRJVHN6.js.map → stale-JH67FU57.js.map} +0 -0
- /package/dist/{vault-group-W7QC4UYW.js.map → vault-group-KOM7QRJG.js.map} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { w as withMaterializedView } from '../with-materialized-view-
|
|
2
|
-
import { aY as Collection, aK as TxContext, bz as MVQueryContext, bA as RegisteredMV, bB as MaterializedViewRegistry } from '../types-
|
|
3
|
-
export { bC as MaterializedFromMeta, bD as MaterializedViewOutput, aV as MaterializedViewStrategy, aW as MaterializedViewStrategyHandle, bE as UnionSource } from '../types-
|
|
4
|
-
import { Q as Query } from '../index-
|
|
5
|
-
export { a3 as MaterializedViewConfigError, a4 as MaterializedViewCycleError, a5 as MaterializedViewSourceUnknownError, a6 as MaterializedViewTooLargeError } from '../strategy-
|
|
6
|
-
import '../lazy-builder-
|
|
7
|
-
import '../predicate-
|
|
1
|
+
export { w as withMaterializedView } from '../with-materialized-view-NzuxYPDF.cjs';
|
|
2
|
+
import { aY as Collection, aK as TxContext, bz as MVQueryContext, bA as RegisteredMV, bB as MaterializedViewRegistry } from '../types-BpPV5uyy.cjs';
|
|
3
|
+
export { bC as MaterializedFromMeta, bD as MaterializedViewOutput, aV as MaterializedViewStrategy, aW as MaterializedViewStrategyHandle, bE as UnionSource } from '../types-BpPV5uyy.cjs';
|
|
4
|
+
import { Q as Query } from '../index-D95VK1Qy.cjs';
|
|
5
|
+
export { a3 as MaterializedViewConfigError, a4 as MaterializedViewCycleError, a5 as MaterializedViewSourceUnknownError, a6 as MaterializedViewTooLargeError } from '../strategy-CbneC7bS.cjs';
|
|
6
|
+
import '../lazy-builder-eYZzLEL1.cjs';
|
|
7
|
+
import '../predicate-BmhBSPCH.cjs';
|
|
8
8
|
import '../strategy-BSxFXGzb.cjs';
|
|
9
9
|
import '@noy-db/attestation';
|
|
10
10
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { w as withMaterializedView } from '../with-materialized-view-
|
|
2
|
-
import { aY as Collection, aK as TxContext, bz as MVQueryContext, bA as RegisteredMV, bB as MaterializedViewRegistry } from '../types-
|
|
3
|
-
export { bC as MaterializedFromMeta, bD as MaterializedViewOutput, aV as MaterializedViewStrategy, aW as MaterializedViewStrategyHandle, bE as UnionSource } from '../types-
|
|
4
|
-
import { Q as Query } from '../index-
|
|
5
|
-
export { a3 as MaterializedViewConfigError, a4 as MaterializedViewCycleError, a5 as MaterializedViewSourceUnknownError, a6 as MaterializedViewTooLargeError } from '../strategy-
|
|
6
|
-
import '../lazy-builder-
|
|
7
|
-
import '../predicate-
|
|
1
|
+
export { w as withMaterializedView } from '../with-materialized-view-Dt-ufPWQ.js';
|
|
2
|
+
import { aY as Collection, aK as TxContext, bz as MVQueryContext, bA as RegisteredMV, bB as MaterializedViewRegistry } from '../types-4t1-tWS4.js';
|
|
3
|
+
export { bC as MaterializedFromMeta, bD as MaterializedViewOutput, aV as MaterializedViewStrategy, aW as MaterializedViewStrategyHandle, bE as UnionSource } from '../types-4t1-tWS4.js';
|
|
4
|
+
import { Q as Query } from '../index-XNB2r6bX.js';
|
|
5
|
+
export { a3 as MaterializedViewConfigError, a4 as MaterializedViewCycleError, a5 as MaterializedViewSourceUnknownError, a6 as MaterializedViewTooLargeError } from '../strategy-CbneC7bS.js';
|
|
6
|
+
import '../lazy-builder-ChSqcF5t.js';
|
|
7
|
+
import '../predicate-BmhBSPCH.js';
|
|
8
8
|
import '../strategy-BSxFXGzb.js';
|
|
9
9
|
import '@noy-db/attestation';
|
|
10
10
|
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
withMaterializedView
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-NU6Q3FOR.js";
|
|
4
4
|
import {
|
|
5
5
|
clearMVStale,
|
|
6
6
|
isMVStale,
|
|
7
7
|
markMVStale,
|
|
8
8
|
resolveStaleMVOnRead
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-KIP6JLTF.js";
|
|
10
10
|
import {
|
|
11
11
|
MaterializedViewExecutor
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-C5T5AFWN.js";
|
|
13
13
|
import {
|
|
14
14
|
MaterializedViewRegistry,
|
|
15
15
|
analyzeDependencies,
|
|
@@ -17,8 +17,8 @@ import {
|
|
|
17
17
|
computeQueryHash,
|
|
18
18
|
summarizeQueryPlan
|
|
19
19
|
} from "../chunk-5LQG6ZO2.js";
|
|
20
|
-
import "../chunk-
|
|
21
|
-
import "../chunk-
|
|
20
|
+
import "../chunk-3EWXMOK3.js";
|
|
21
|
+
import "../chunk-CJORTUJ2.js";
|
|
22
22
|
import {
|
|
23
23
|
MaterializedViewConfigError,
|
|
24
24
|
MaterializedViewCycleError,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Noydb,
|
|
3
3
|
createNoydb
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-7EFFHEN5.js";
|
|
5
5
|
import "./chunk-ZC7J6ZYV.js";
|
|
6
6
|
import "./chunk-EMIGCR7X.js";
|
|
7
7
|
import "./chunk-YHPM5D7Y.js";
|
|
8
8
|
import "./chunk-OHVFWCJP.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-CZI2A4MQ.js";
|
|
10
10
|
import "./chunk-WGHU7BLI.js";
|
|
11
11
|
import "./chunk-DKO2QFSA.js";
|
|
12
12
|
import "./chunk-KI6HAJWL.js";
|
|
@@ -19,11 +19,11 @@ import "./chunk-2QR2PQTT.js";
|
|
|
19
19
|
import "./chunk-FZU343FL.js";
|
|
20
20
|
import "./chunk-56DJ7JVK.js";
|
|
21
21
|
import "./chunk-Z6FNBOTC.js";
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-EYVQHAGH.js";
|
|
23
|
+
import "./chunk-XWH4MXIU.js";
|
|
24
|
+
import "./chunk-IQLVUT37.js";
|
|
25
|
+
import "./chunk-3EWXMOK3.js";
|
|
26
|
+
import "./chunk-CJORTUJ2.js";
|
|
27
27
|
import "./chunk-6AJBSQU4.js";
|
|
28
28
|
import "./chunk-GC4V7RU7.js";
|
|
29
29
|
import "./chunk-YULZKK4F.js";
|
|
@@ -32,4 +32,4 @@ export {
|
|
|
32
32
|
Noydb,
|
|
33
33
|
createNoydb
|
|
34
34
|
};
|
|
35
|
-
//# sourceMappingURL=noydb-
|
|
35
|
+
//# sourceMappingURL=noydb-GZGFBA4E.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { w as withOverlayedView } from '../with-overlayed-view-
|
|
2
|
-
import { aX as OverlayedViewStrategy, aY as Collection } from '../types-
|
|
3
|
-
export { aZ as OverlayedViewRegistry, a_ as OverlayedViewStrategyHandle } from '../types-
|
|
4
|
-
export { P as OverlayBaseIsVirtualError, Q as OverlayCollectionUnavailableError, U as OverlayIdMismatchError, V as OverlayNameCollisionError } from '../strategy-
|
|
5
|
-
import '../lazy-builder-
|
|
6
|
-
import '../predicate-
|
|
1
|
+
export { w as withOverlayedView } from '../with-overlayed-view-CC0_ocy-.cjs';
|
|
2
|
+
import { aX as OverlayedViewStrategy, aY as Collection } from '../types-BpPV5uyy.cjs';
|
|
3
|
+
export { aZ as OverlayedViewRegistry, a_ as OverlayedViewStrategyHandle } from '../types-BpPV5uyy.cjs';
|
|
4
|
+
export { P as OverlayBaseIsVirtualError, Q as OverlayCollectionUnavailableError, U as OverlayIdMismatchError, V as OverlayNameCollisionError } from '../strategy-CbneC7bS.cjs';
|
|
5
|
+
import '../lazy-builder-eYZzLEL1.cjs';
|
|
6
|
+
import '../predicate-BmhBSPCH.cjs';
|
|
7
7
|
import '../strategy-BSxFXGzb.cjs';
|
|
8
|
-
import '../index-
|
|
8
|
+
import '../index-D95VK1Qy.cjs';
|
|
9
9
|
import '@noy-db/attestation';
|
|
10
10
|
|
|
11
11
|
/**
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { w as withOverlayedView } from '../with-overlayed-view-
|
|
2
|
-
import { aX as OverlayedViewStrategy, aY as Collection } from '../types-
|
|
3
|
-
export { aZ as OverlayedViewRegistry, a_ as OverlayedViewStrategyHandle } from '../types-
|
|
4
|
-
export { P as OverlayBaseIsVirtualError, Q as OverlayCollectionUnavailableError, U as OverlayIdMismatchError, V as OverlayNameCollisionError } from '../strategy-
|
|
5
|
-
import '../lazy-builder-
|
|
6
|
-
import '../predicate-
|
|
1
|
+
export { w as withOverlayedView } from '../with-overlayed-view-eDvMs6LO.js';
|
|
2
|
+
import { aX as OverlayedViewStrategy, aY as Collection } from '../types-4t1-tWS4.js';
|
|
3
|
+
export { aZ as OverlayedViewRegistry, a_ as OverlayedViewStrategyHandle } from '../types-4t1-tWS4.js';
|
|
4
|
+
export { P as OverlayBaseIsVirtualError, Q as OverlayCollectionUnavailableError, U as OverlayIdMismatchError, V as OverlayNameCollisionError } from '../strategy-CbneC7bS.js';
|
|
5
|
+
import '../lazy-builder-ChSqcF5t.js';
|
|
6
|
+
import '../predicate-BmhBSPCH.js';
|
|
7
7
|
import '../strategy-BSxFXGzb.js';
|
|
8
|
-
import '../index-
|
|
8
|
+
import '../index-XNB2r6bX.js';
|
|
9
9
|
import '@noy-db/attestation';
|
|
10
10
|
|
|
11
11
|
/**
|
package/dist/periods/index.d.cts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ag as PeriodsStrategy } from '../types-
|
|
2
|
-
export { ah as CarryForwardContext, ai as ClosePeriodOptions, aj as OpenPeriodOptions, ak as PERIODS_COLLECTION, al as PeriodRecord, am as ReadOnlyCollection, an as appendPeriodLedgerEntry, ao as assertTsWritable, ap as chainAnchor, aq as loadPeriods, ar as validatePeriodName } from '../types-
|
|
3
|
-
import '../lazy-builder-
|
|
4
|
-
import '../predicate-
|
|
5
|
-
import '../strategy-
|
|
1
|
+
import { ag as PeriodsStrategy } from '../types-BpPV5uyy.cjs';
|
|
2
|
+
export { ah as CarryForwardContext, ai as ClosePeriodOptions, aj as OpenPeriodOptions, ak as PERIODS_COLLECTION, al as PeriodRecord, am as ReadOnlyCollection, an as appendPeriodLedgerEntry, ao as assertTsWritable, ap as chainAnchor, aq as loadPeriods, ar as validatePeriodName } from '../types-BpPV5uyy.cjs';
|
|
3
|
+
import '../lazy-builder-eYZzLEL1.cjs';
|
|
4
|
+
import '../predicate-BmhBSPCH.cjs';
|
|
5
|
+
import '../strategy-CbneC7bS.cjs';
|
|
6
6
|
import '../strategy-BSxFXGzb.cjs';
|
|
7
|
-
import '../index-
|
|
7
|
+
import '../index-D95VK1Qy.cjs';
|
|
8
8
|
import '@noy-db/attestation';
|
|
9
9
|
|
|
10
10
|
/**
|
package/dist/periods/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ag as PeriodsStrategy } from '../types-
|
|
2
|
-
export { ah as CarryForwardContext, ai as ClosePeriodOptions, aj as OpenPeriodOptions, ak as PERIODS_COLLECTION, al as PeriodRecord, am as ReadOnlyCollection, an as appendPeriodLedgerEntry, ao as assertTsWritable, ap as chainAnchor, aq as loadPeriods, ar as validatePeriodName } from '../types-
|
|
3
|
-
import '../lazy-builder-
|
|
4
|
-
import '../predicate-
|
|
5
|
-
import '../strategy-
|
|
1
|
+
import { ag as PeriodsStrategy } from '../types-4t1-tWS4.js';
|
|
2
|
+
export { ah as CarryForwardContext, ai as ClosePeriodOptions, aj as OpenPeriodOptions, ak as PERIODS_COLLECTION, al as PeriodRecord, am as ReadOnlyCollection, an as appendPeriodLedgerEntry, ao as assertTsWritable, ap as chainAnchor, aq as loadPeriods, ar as validatePeriodName } from '../types-4t1-tWS4.js';
|
|
3
|
+
import '../lazy-builder-ChSqcF5t.js';
|
|
4
|
+
import '../predicate-BmhBSPCH.js';
|
|
5
|
+
import '../strategy-CbneC7bS.js';
|
|
6
6
|
import '../strategy-BSxFXGzb.js';
|
|
7
|
-
import '../index-
|
|
7
|
+
import '../index-XNB2r6bX.js';
|
|
8
8
|
import '@noy-db/attestation';
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -104,12 +104,55 @@ declare class CollectionIndexes {
|
|
|
104
104
|
lookupIn(field: string, values: readonly unknown[]): ReadonlySet<string> | null;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
+
/**
|
|
108
|
+
* Money-aware `where()` comparison (#336).
|
|
109
|
+
*
|
|
110
|
+
* Query clauses evaluate against RAW stored records — money decode
|
|
111
|
+
* happens on output only (#322) — so a money field's stored form is a
|
|
112
|
+
* scaled-integer digit string (`'1000000'`) while the caller naturally
|
|
113
|
+
* writes the operand in major units (`10000`, `'10000.00'`). Without a
|
|
114
|
+
* rewrite the comparison is silently wrong by the scale factor, and a
|
|
115
|
+
* string-vs-number comparison is excluded by `isComparable` anyway.
|
|
116
|
+
*
|
|
117
|
+
* Two halves:
|
|
118
|
+
*
|
|
119
|
+
* - {@link moneyFieldClause} runs at QUERY BUILD time: it quantizes the
|
|
120
|
+
* caller's major-unit operand into stored scaled-int space via the
|
|
121
|
+
* same `parseToScaledInt` path as writes, so a malformed operand
|
|
122
|
+
* throws at `.where()` — not silently filters everything out.
|
|
123
|
+
* - {@link evaluateMoneyClause} runs per record and compares
|
|
124
|
+
* `BigInt`-exact in scaled space (exact past 2^53, like the rest of
|
|
125
|
+
* the money subsystem).
|
|
126
|
+
*
|
|
127
|
+
* Currency semantics (multi mode): an operand carries one currency —
|
|
128
|
+
* explicit via `{ amount, currency }`, or the descriptor's sole allowed
|
|
129
|
+
* currency for a bare amount. A record in a DIFFERENT currency has no
|
|
130
|
+
* defined order against the operand: it matches `!=` and nothing else.
|
|
131
|
+
*/
|
|
132
|
+
|
|
133
|
+
/** One quantized operand value: scaled digit string + its currency. */
|
|
134
|
+
interface MoneyOperandEntry {
|
|
135
|
+
readonly scaled: string;
|
|
136
|
+
readonly currency: string;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* The money payload attached to a {@link FieldClause} over a declared
|
|
140
|
+
* money field. `entries` holds one element for comparison ops, two for
|
|
141
|
+
* `between` (lo, hi — same currency), N for `in`.
|
|
142
|
+
*/
|
|
143
|
+
interface MoneyWhereOperand {
|
|
144
|
+
readonly mode: 'fixed' | 'multi';
|
|
145
|
+
readonly entries: ReadonlyArray<MoneyOperandEntry>;
|
|
146
|
+
}
|
|
147
|
+
|
|
107
148
|
/**
|
|
108
149
|
* Operator implementations for the query DSL.
|
|
109
150
|
*
|
|
110
151
|
* All predicates run client-side, AFTER decryption — they never see ciphertext.
|
|
111
|
-
*
|
|
152
|
+
* The only dependency is the money clause evaluator (#336) — still
|
|
153
|
+
* tree-shakeable through it.
|
|
112
154
|
*/
|
|
155
|
+
|
|
113
156
|
/** Comparison operators supported by the where() builder. */
|
|
114
157
|
type Operator = '==' | '!=' | '<' | '<=' | '>' | '>=' | 'in' | 'contains' | 'startsWith' | 'between';
|
|
115
158
|
/**
|
|
@@ -121,6 +164,14 @@ interface FieldClause {
|
|
|
121
164
|
readonly field: string;
|
|
122
165
|
readonly op: Operator;
|
|
123
166
|
readonly value: unknown;
|
|
167
|
+
/**
|
|
168
|
+
* Present when `field` is a declared money field (#336): the operand
|
|
169
|
+
* quantized into stored scaled-int space at query BUILD time, so the
|
|
170
|
+
* per-record comparison is BigInt-exact against the raw stored value.
|
|
171
|
+
* Built by `moneyFieldClause` — `Query.where()` attaches it when the
|
|
172
|
+
* source declares the field in `moneyFields`.
|
|
173
|
+
*/
|
|
174
|
+
readonly money?: MoneyWhereOperand;
|
|
124
175
|
}
|
|
125
176
|
/**
|
|
126
177
|
* A user-supplied predicate function escape hatch. Not serializable.
|
|
@@ -204,7 +255,13 @@ declare function evaluateFieldClause(record: unknown, clause: FieldClause): bool
|
|
|
204
255
|
* Evaluate any clause (field / filter / group) against a record.
|
|
205
256
|
* The recursion depth is bounded by the user's query expression — no risk of
|
|
206
257
|
* blowing the stack on a 50K-record collection.
|
|
258
|
+
*
|
|
259
|
+
* `fnRecord`, when provided, is the view handed to USER CALLBACK clauses
|
|
260
|
+
* (`filter` / `wherePredicate`) instead of `record` — the executor passes
|
|
261
|
+
* the money-decoded view there (#335) so user code never sees the stored
|
|
262
|
+
* scaled-int form, while field clauses keep evaluating against the raw
|
|
263
|
+
* record (their money operands are pre-quantized to that space, #336).
|
|
207
264
|
*/
|
|
208
|
-
declare function evaluateClause(record: unknown, clause: Clause): boolean;
|
|
265
|
+
declare function evaluateClause(record: unknown, clause: Clause, fnRecord?: unknown): boolean;
|
|
209
266
|
|
|
210
267
|
export { CollectionIndexes as C, type FieldClause as F, type GroupClause as G, type HashIndex as H, type IndexDef as I, type Operator as O, type Clause as a, type FilterClause as b, evaluateFieldClause as c, type CrossJoinClause as d, evaluateClause as e, readPath as r };
|
|
@@ -104,12 +104,55 @@ declare class CollectionIndexes {
|
|
|
104
104
|
lookupIn(field: string, values: readonly unknown[]): ReadonlySet<string> | null;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
+
/**
|
|
108
|
+
* Money-aware `where()` comparison (#336).
|
|
109
|
+
*
|
|
110
|
+
* Query clauses evaluate against RAW stored records — money decode
|
|
111
|
+
* happens on output only (#322) — so a money field's stored form is a
|
|
112
|
+
* scaled-integer digit string (`'1000000'`) while the caller naturally
|
|
113
|
+
* writes the operand in major units (`10000`, `'10000.00'`). Without a
|
|
114
|
+
* rewrite the comparison is silently wrong by the scale factor, and a
|
|
115
|
+
* string-vs-number comparison is excluded by `isComparable` anyway.
|
|
116
|
+
*
|
|
117
|
+
* Two halves:
|
|
118
|
+
*
|
|
119
|
+
* - {@link moneyFieldClause} runs at QUERY BUILD time: it quantizes the
|
|
120
|
+
* caller's major-unit operand into stored scaled-int space via the
|
|
121
|
+
* same `parseToScaledInt` path as writes, so a malformed operand
|
|
122
|
+
* throws at `.where()` — not silently filters everything out.
|
|
123
|
+
* - {@link evaluateMoneyClause} runs per record and compares
|
|
124
|
+
* `BigInt`-exact in scaled space (exact past 2^53, like the rest of
|
|
125
|
+
* the money subsystem).
|
|
126
|
+
*
|
|
127
|
+
* Currency semantics (multi mode): an operand carries one currency —
|
|
128
|
+
* explicit via `{ amount, currency }`, or the descriptor's sole allowed
|
|
129
|
+
* currency for a bare amount. A record in a DIFFERENT currency has no
|
|
130
|
+
* defined order against the operand: it matches `!=` and nothing else.
|
|
131
|
+
*/
|
|
132
|
+
|
|
133
|
+
/** One quantized operand value: scaled digit string + its currency. */
|
|
134
|
+
interface MoneyOperandEntry {
|
|
135
|
+
readonly scaled: string;
|
|
136
|
+
readonly currency: string;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* The money payload attached to a {@link FieldClause} over a declared
|
|
140
|
+
* money field. `entries` holds one element for comparison ops, two for
|
|
141
|
+
* `between` (lo, hi — same currency), N for `in`.
|
|
142
|
+
*/
|
|
143
|
+
interface MoneyWhereOperand {
|
|
144
|
+
readonly mode: 'fixed' | 'multi';
|
|
145
|
+
readonly entries: ReadonlyArray<MoneyOperandEntry>;
|
|
146
|
+
}
|
|
147
|
+
|
|
107
148
|
/**
|
|
108
149
|
* Operator implementations for the query DSL.
|
|
109
150
|
*
|
|
110
151
|
* All predicates run client-side, AFTER decryption — they never see ciphertext.
|
|
111
|
-
*
|
|
152
|
+
* The only dependency is the money clause evaluator (#336) — still
|
|
153
|
+
* tree-shakeable through it.
|
|
112
154
|
*/
|
|
155
|
+
|
|
113
156
|
/** Comparison operators supported by the where() builder. */
|
|
114
157
|
type Operator = '==' | '!=' | '<' | '<=' | '>' | '>=' | 'in' | 'contains' | 'startsWith' | 'between';
|
|
115
158
|
/**
|
|
@@ -121,6 +164,14 @@ interface FieldClause {
|
|
|
121
164
|
readonly field: string;
|
|
122
165
|
readonly op: Operator;
|
|
123
166
|
readonly value: unknown;
|
|
167
|
+
/**
|
|
168
|
+
* Present when `field` is a declared money field (#336): the operand
|
|
169
|
+
* quantized into stored scaled-int space at query BUILD time, so the
|
|
170
|
+
* per-record comparison is BigInt-exact against the raw stored value.
|
|
171
|
+
* Built by `moneyFieldClause` — `Query.where()` attaches it when the
|
|
172
|
+
* source declares the field in `moneyFields`.
|
|
173
|
+
*/
|
|
174
|
+
readonly money?: MoneyWhereOperand;
|
|
124
175
|
}
|
|
125
176
|
/**
|
|
126
177
|
* A user-supplied predicate function escape hatch. Not serializable.
|
|
@@ -204,7 +255,13 @@ declare function evaluateFieldClause(record: unknown, clause: FieldClause): bool
|
|
|
204
255
|
* Evaluate any clause (field / filter / group) against a record.
|
|
205
256
|
* The recursion depth is bounded by the user's query expression — no risk of
|
|
206
257
|
* blowing the stack on a 50K-record collection.
|
|
258
|
+
*
|
|
259
|
+
* `fnRecord`, when provided, is the view handed to USER CALLBACK clauses
|
|
260
|
+
* (`filter` / `wherePredicate`) instead of `record` — the executor passes
|
|
261
|
+
* the money-decoded view there (#335) so user code never sees the stored
|
|
262
|
+
* scaled-int form, while field clauses keep evaluating against the raw
|
|
263
|
+
* record (their money operands are pre-quantized to that space, #336).
|
|
207
264
|
*/
|
|
208
|
-
declare function evaluateClause(record: unknown, clause: Clause): boolean;
|
|
265
|
+
declare function evaluateClause(record: unknown, clause: Clause, fnRecord?: unknown): boolean;
|
|
209
266
|
|
|
210
267
|
export { CollectionIndexes as C, type FieldClause as F, type GroupClause as G, type HashIndex as H, type IndexDef as I, type Operator as O, type Clause as a, type FilterClause as b, evaluateFieldClause as c, type CrossJoinClause as d, evaluateClause as e, readPath as r };
|