@noy-db/hub 0.3.0-pre.8 → 0.3.0-pre.9
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/adapter/index.d.ts +2 -3
- package/dist/adapter/index.js +1 -1
- package/dist/aggregate/index.d.ts +3 -4
- package/dist/aggregate/index.js +9 -8
- package/dist/aggregate/index.js.map +1 -1
- package/dist/api-HV4PDUWF.js +20 -0
- package/dist/as/index.d.ts +4 -5
- package/dist/as/index.js +11 -11
- package/dist/at/index.d.ts +2 -3
- package/dist/attestation/index.d.ts +3 -4
- package/dist/attestation/index.js +18 -18
- package/dist/{backup-WRGNTGJF.js → backup-ODXO7OGA.js} +12 -12
- package/dist/blobs/index.d.ts +4 -5
- package/dist/blobs/index.js +11 -11
- package/dist/blobs/index.js.map +1 -1
- package/dist/bundle/index.d.ts +5 -6
- package/dist/bundle/index.js +20 -20
- package/dist/{bundle-DzWtVw7w.d.ts → bundle-DlSxo31R.d.ts} +1 -1
- package/dist/by/index.js +2 -2
- package/dist/cargo/index.d.ts +4 -5
- package/dist/cargo/index.js +23 -22
- package/dist/{chunk-X6VNIRHS.js → chunk-2644KEGW.js} +18 -10
- package/dist/chunk-2644KEGW.js.map +1 -0
- package/dist/{chunk-XW5LZYV4.js → chunk-2HVUKRNE.js} +2 -2
- package/dist/{chunk-VFQOE76I.js → chunk-2KOSJTMU.js} +2 -2
- package/dist/{chunk-2PJB6H3H.js → chunk-2UQ4RMHV.js} +4 -4
- package/dist/{chunk-5GQE5IDB.js → chunk-2XE6LIXT.js} +13 -11
- package/dist/chunk-2XE6LIXT.js.map +1 -0
- package/dist/{chunk-VIWOGJ2O.js → chunk-34RRRIC3.js} +2 -2
- package/dist/{chunk-BASCPHNM.js → chunk-3C5CKXFI.js} +289 -48
- package/dist/chunk-3C5CKXFI.js.map +1 -0
- package/dist/{chunk-LFGJG4XZ.js → chunk-3I4KYWNP.js} +2 -2
- package/dist/{chunk-723XB5NX.js → chunk-42KVY3OC.js} +4 -4
- package/dist/{chunk-56JB2BGI.js → chunk-4C4WBS4V.js} +1739 -920
- package/dist/chunk-4C4WBS4V.js.map +1 -0
- package/dist/{chunk-62APEMF3.js → chunk-4G3IT7J7.js} +7 -7
- package/dist/{chunk-W3JABOVB.js → chunk-4RQ62VSR.js} +2 -2
- package/dist/{chunk-WPNP3NF5.js → chunk-4ZSGSRBI.js} +8 -8
- package/dist/{chunk-C4NOLA5X.js → chunk-5GAX2QOH.js} +2 -2
- package/dist/{chunk-5HRJQSKN.js → chunk-5SAZMBW7.js} +7 -7
- package/dist/{chunk-II6DLDZM.js → chunk-5TZZUL5X.js} +2 -2
- package/dist/{chunk-TUL5YQWF.js → chunk-6CU3FN74.js} +8 -8
- package/dist/chunk-6G2SCQYS.js +29 -0
- package/dist/chunk-6G2SCQYS.js.map +1 -0
- package/dist/{chunk-UWZ7O4NR.js → chunk-6MWUANRF.js} +2 -2
- package/dist/{chunk-U7LV2DUN.js → chunk-6ULCYCMU.js} +2 -2
- package/dist/{chunk-6Z435B6N.js → chunk-7HAPHVRJ.js} +131 -92
- package/dist/chunk-7HAPHVRJ.js.map +1 -0
- package/dist/{chunk-GDOOG5YQ.js → chunk-7IZQTCTR.js} +3 -3
- package/dist/chunk-7ZANJ6JZ.js +265 -0
- package/dist/chunk-7ZANJ6JZ.js.map +1 -0
- package/dist/{chunk-VVLOWY74.js → chunk-A2APWS32.js} +6 -6
- package/dist/chunk-A2APWS32.js.map +1 -0
- package/dist/{chunk-TIAYXOEI.js → chunk-A4MAD6PO.js} +5 -5
- package/dist/chunk-ANDBBA2P.js +36 -0
- package/dist/chunk-ANDBBA2P.js.map +1 -0
- package/dist/{chunk-5HZULLHE.js → chunk-AUR7MRHA.js} +2 -2
- package/dist/{chunk-44DV37ZV.js → chunk-AYGZMQP5.js} +3 -3
- package/dist/chunk-AYGZMQP5.js.map +1 -0
- package/dist/{chunk-P2PEPSPK.js → chunk-CJEMA2Z6.js} +2 -2
- package/dist/{chunk-L6Q5NA22.js → chunk-CTSFKDGA.js} +2 -2
- package/dist/{chunk-OJ64XMPJ.js → chunk-CU62BBRB.js} +32 -1
- package/dist/chunk-CU62BBRB.js.map +1 -0
- package/dist/{chunk-J5YUA6JB.js → chunk-CWCCYH34.js} +2 -2
- package/dist/{chunk-NTPWQH4S.js → chunk-DEYAO3N6.js} +10 -10
- package/dist/{chunk-M3OYTM5Z.js → chunk-DFIBOSOQ.js} +8 -8
- package/dist/{chunk-FZK3JJJK.js → chunk-E5AHO65E.js} +7 -7
- package/dist/{chunk-F3EKFGUS.js → chunk-FC3XK5JT.js} +8 -8
- package/dist/{chunk-XBPUVQDO.js → chunk-FGOGS7CE.js} +10 -12
- package/dist/chunk-FGOGS7CE.js.map +1 -0
- package/dist/{chunk-3KBK5LU4.js → chunk-GX2BYNCT.js} +7 -7
- package/dist/{chunk-YTCCC6NG.js → chunk-GZ2MOPVX.js} +34 -63
- package/dist/chunk-GZ2MOPVX.js.map +1 -0
- package/dist/chunk-H57P2SJB.js +126 -0
- package/dist/chunk-H57P2SJB.js.map +1 -0
- package/dist/{chunk-55LSDABW.js → chunk-HBTT7YQX.js} +2 -2
- package/dist/{chunk-PYIUDUGS.js → chunk-HOCEGVGQ.js} +2 -2
- package/dist/{chunk-5JQMX2EH.js → chunk-ICV32FPK.js} +2 -2
- package/dist/{chunk-PMMV5SQC.js → chunk-IIP5WFVT.js} +138 -92
- package/dist/chunk-IIP5WFVT.js.map +1 -0
- package/dist/{chunk-37JZR7CY.js → chunk-IUKGIB2Q.js} +4 -4
- package/dist/{chunk-OWGAXPRE.js → chunk-IWTYFS3D.js} +2 -2
- package/dist/{chunk-FCOZ7DEC.js → chunk-JC5R7P44.js} +3 -3
- package/dist/{chunk-IARAK3PK.js → chunk-KBBWY46Y.js} +2 -2
- package/dist/{chunk-RNYDHIQL.js → chunk-KBF5GSGX.js} +3 -3
- package/dist/{chunk-6P5AJ2ZS.js → chunk-KCG3BHFG.js} +2 -23
- package/dist/chunk-KCG3BHFG.js.map +1 -0
- package/dist/{chunk-GLVXQU3E.js → chunk-KNXN47MO.js} +3 -3
- package/dist/{chunk-VK6OC22R.js → chunk-KWLD2D75.js} +4 -3
- package/dist/chunk-KWLD2D75.js.map +1 -0
- package/dist/{chunk-J7OH6R4K.js → chunk-KXKLKJW4.js} +6 -6
- package/dist/{chunk-PAJCRV7O.js → chunk-KYC4LIEU.js} +2 -2
- package/dist/{chunk-R4IVPJHN.js → chunk-LEOXZY36.js} +8 -8
- package/dist/{chunk-25G7PUTA.js → chunk-M5I354EE.js} +9 -9
- package/dist/{chunk-26FSVNBL.js → chunk-MK2BSS44.js} +2 -2
- package/dist/{chunk-UMH35AQV.js → chunk-MSVY7ULZ.js} +3 -3
- package/dist/{chunk-5YBUFCFF.js → chunk-NNWK3PSY.js} +9 -9
- package/dist/{chunk-X5QZAJDB.js → chunk-NSZ6J5DF.js} +7 -7
- package/dist/{chunk-I6URUNTD.js → chunk-NUEFXLZU.js} +7 -7
- package/dist/{chunk-PPPZIBKY.js → chunk-NYVQCZ54.js} +5 -5
- package/dist/chunk-NYVQCZ54.js.map +1 -0
- package/dist/{chunk-DCVVCJVB.js → chunk-OQAODTYR.js} +2 -2
- package/dist/{chunk-QYMMMKOO.js → chunk-OV4CMJGR.js} +5 -5
- package/dist/{chunk-V76PHWLE.js → chunk-PEDZFFKW.js} +2 -2
- package/dist/chunk-PF3FQCCF.js +164 -0
- package/dist/chunk-PF3FQCCF.js.map +1 -0
- package/dist/{chunk-BJ2XF2RC.js → chunk-Q2KVKTC2.js} +5 -5
- package/dist/{chunk-RUIMKQTA.js → chunk-QJR3W3MF.js} +1 -1
- package/dist/chunk-QJR3W3MF.js.map +1 -0
- package/dist/{chunk-QABECTNN.js → chunk-QTXQ6RNZ.js} +3 -3
- package/dist/{chunk-P6TZ3IVN.js → chunk-RJ5522XX.js} +12 -12
- package/dist/{chunk-BM6E4MUT.js → chunk-RMUXPHIH.js} +56 -7
- package/dist/chunk-RMUXPHIH.js.map +1 -0
- package/dist/{chunk-CHK5VVMI.js → chunk-S6AQXDN4.js} +2 -2
- package/dist/{chunk-4VDFUBTS.js → chunk-SSFC3IYA.js} +9 -9
- package/dist/chunk-SSFC3IYA.js.map +1 -0
- package/dist/{chunk-MOQ5M46U.js → chunk-SZCHEDML.js} +2 -2
- package/dist/{chunk-UB3XHGFG.js → chunk-TDPEJINP.js} +14 -7
- package/dist/chunk-TDPEJINP.js.map +1 -0
- package/dist/{chunk-REWTMYSF.js → chunk-UNJU345Q.js} +1 -1
- package/dist/chunk-UNJU345Q.js.map +1 -0
- package/dist/chunk-V7RNIND6.js +265 -0
- package/dist/chunk-V7RNIND6.js.map +1 -0
- package/dist/{chunk-FWART3VA.js → chunk-VJ3NQK4K.js} +5 -5
- package/dist/{chunk-3YKBGS3I.js → chunk-WNA6T3MA.js} +8 -8
- package/dist/{chunk-7CZ6YXMO.js → chunk-WVCQ75OK.js} +2 -2
- package/dist/{chunk-BTFTHF6Q.js → chunk-X66MXMR5.js} +2 -2
- package/dist/{chunk-7TAV3BFQ.js → chunk-XHD3L3JO.js} +199 -35
- package/dist/chunk-XHD3L3JO.js.map +1 -0
- package/dist/{chunk-6PALJTC2.js → chunk-XJK2WIYN.js} +3 -3
- package/dist/{chunk-5UOPIPZC.js → chunk-XQ7UYPVN.js} +3 -3
- package/dist/{chunk-HU55NPHZ.js → chunk-Y2OCKFZ3.js} +2 -2
- package/dist/{chunk-TCGVRKOS.js → chunk-YBFOBRTO.js} +3 -3
- package/dist/{chunk-I6JJ6VJS.js → chunk-YLN33ADH.js} +2 -2
- package/dist/{chunk-PVC2FBCQ.js → chunk-Z5YFRMG5.js} +2 -2
- package/dist/{chunk-EU7HDMT3.js → chunk-ZWQFOXBR.js} +2 -2
- package/dist/classified/index.d.ts +4 -5
- package/dist/classified/index.js +5 -3
- package/dist/{config-drift-RFEVGBKR.js → classified-marker-IO5EBW7Q.js} +4 -4
- package/dist/classified-marker-IO5EBW7Q.js.map +1 -0
- package/dist/collection-facade-3RAXG2OU.js +38 -0
- package/dist/{computed-6FOFXQPE.js → computed-R62HGCO4.js} +3 -3
- package/dist/consent/index.d.ts +3 -4
- package/dist/consent/index.js +9 -9
- package/dist/crdt/index.d.ts +3 -4
- package/dist/{dead-filter-RHMNYOXP.js → dead-filter-VNA4M3GP.js} +2 -2
- package/dist/delegation-ZKII5UBI.js +25 -0
- package/dist/derivations/index.d.ts +4 -5
- package/dist/derivations/index.js +12 -11
- package/dist/derive-5D2C3WG4.js +21 -0
- package/dist/describe/index.d.ts +4 -1
- package/dist/{dev-unlock-wgQ7Ci5I.d.ts → dev-unlock-DDTafVO6.d.ts} +1 -1
- package/dist/{enclave-KGEUW2GL.js → enclave-EUBEJGPG.js} +11 -9
- package/dist/executor-IL7SRNUZ.js +23 -0
- package/dist/executor-OUA2Y6YC.js +9 -0
- package/dist/executor-WAEI6PDV.js +9 -0
- package/dist/export-accessible-O55RKAGC.js +23 -0
- package/dist/extract-partition-VBGCBA6Q.js +36 -0
- package/dist/{fanout-sidecar-NBDKKCHT.js → fanout-sidecar-CI5BCMQM.js} +11 -11
- package/dist/find-FISGUWSK.js +11 -0
- package/dist/forget/index.d.ts +2 -2
- package/dist/forget/index.js +9 -9
- package/dist/guards/index.d.ts +4 -5
- package/dist/guards/index.js +4 -4
- package/dist/{hash-CwHnoKyW.d.ts → hash-DBkZfIBW.d.ts} +1 -1
- package/dist/history/index.d.ts +4 -5
- package/dist/history/index.js +11 -11
- package/dist/i18n/index.d.ts +24 -5
- package/dist/i18n/index.js +45 -34
- package/dist/i18n/index.js.map +1 -1
- package/dist/in/index.d.ts +2 -3
- package/dist/{index-CTvUp94-.d.ts → index-CyclmyDr.d.ts} +2 -3
- package/dist/{index-Dn5GzPg_.d.ts → index-DzhNI2vE.d.ts} +7114 -5992
- package/dist/index.d.ts +51 -17
- package/dist/index.js +403 -125
- package/dist/index.js.map +1 -1
- package/dist/indexing/index.d.ts +3 -4
- package/dist/indexing/index.js +4 -4
- package/dist/issue-EQAWIYFQ.js +19 -0
- package/dist/kernel/index.d.ts +3 -4
- package/dist/kernel/index.js +13 -12
- package/dist/lazy/index.d.ts +3 -4
- package/dist/{ledger-3LR3YO2W.js → ledger-AJA2SR3C.js} +11 -11
- package/dist/liberate-SEGR4JLY.js +24 -0
- package/dist/{link-set-NSUIX6BR.js → link-set-YBAC2DQT.js} +11 -11
- package/dist/materialized-views/index.d.ts +14 -5
- package/dist/materialized-views/index.js +17 -15
- package/dist/{mime-magic-CYbFNQ4h.d.ts → mime-magic-CbV1quyp.d.ts} +1 -1
- package/dist/noydb-AMEOU456.js +65 -0
- package/dist/on/index.d.ts +2 -3
- package/dist/on/index.js +9 -9
- package/dist/overlay-views/index.d.ts +4 -5
- package/dist/overlay-views/index.js +4 -4
- package/dist/periods/index.d.ts +3 -4
- package/dist/periods/index.js +12 -12
- package/dist/pod/index.d.ts +3 -4
- package/dist/pod/index.js +11 -11
- package/dist/{policy-Y7HL2KGA.js → policy-SDGRWVIL.js} +5 -5
- package/dist/portability/index.d.ts +3 -4
- package/dist/portability/index.js +8 -8
- package/dist/{post-register-KOFRTCDD.js → post-register-MROIUA5O.js} +6 -6
- package/dist/{public-envelope-NC7SPNMV.js → public-envelope-J5PLQOW2.js} +4 -4
- package/dist/query/index.d.ts +2 -3
- package/dist/query/index.js +9 -6
- package/dist/{read-only-facade-5ADRJVTM.js → read-only-facade-UCYNRE56.js} +2 -2
- package/dist/register-OVJKW7BS.js +23 -0
- package/dist/registry-5RJSK5AJ.js +9 -0
- package/dist/registry-DQRNTWRL.js +18 -0
- package/dist/registry-LTGLERS7.js +19 -0
- package/dist/request-withdrawal-27O77D2V.js +31 -0
- package/dist/{reveal-5Y777N5Q.js → reveal-LT3I2K4P.js} +6 -6
- package/dist/revoke-4N45G7D2.js +24 -0
- package/dist/satellites/index.d.ts +2 -3
- package/dist/satellites/index.js +1 -1
- package/dist/sealed-record/index.d.ts +3 -4
- package/dist/sealed-record/index.js +12 -12
- package/dist/session/index.d.ts +4 -5
- package/dist/session/index.js +9 -9
- package/dist/shadow/index.d.ts +3 -4
- package/dist/shadow/index.js +2 -2
- package/dist/signer-XJCOV7JD.js +25 -0
- package/dist/snapshots/index.d.ts +3 -4
- package/dist/snapshots/index.js +10 -10
- package/dist/{stale-77LP2EEF.js → stale-IYYXEH3U.js} +2 -2
- package/dist/storage-Y44CAPE6.js +23 -0
- package/dist/{store-coordination-provider-NJDDZ264.js → store-coordination-provider-WKGAE2WI.js} +3 -3
- package/dist/{subject-index-O75wKshW.d.ts → subject-index-CyOgGMJL.d.ts} +18 -0
- package/dist/sync/index.d.ts +2 -3
- package/dist/sync/index.js +9 -9
- package/dist/team/index.d.ts +3 -4
- package/dist/team/index.js +15 -15
- package/dist/tiers/index.d.ts +2 -3
- package/dist/tiers/index.js +10 -10
- package/dist/to/index.d.ts +2 -3
- package/dist/to/index.js +1 -1
- package/dist/{transition-guard-D5RLJv8S.d.ts → transition-guard-BOUkzQU4.d.ts} +1 -1
- package/dist/tx/index.d.ts +3 -4
- package/dist/tx/index.js +3 -3
- package/dist/ui/index.d.ts +4 -1
- package/dist/util/index.js +1 -1
- package/dist/{validators-C3lrVF-c.d.ts → validators-B3SalxlJ.d.ts} +1 -1
- package/dist/{vault-diff-_LSIcOMv.d.ts → vault-diff-Dt9NkLzw.d.ts} +1 -1
- package/dist/{verify-CAYGXYNO.js → verify-GH6CWVSW.js} +5 -5
- package/dist/{walk-SMAE4IEI.js → walk-76UCFXYV.js} +11 -11
- package/dist/with/index.d.ts +3 -4
- package/dist/with/index.js +11 -11
- package/dist/{with-materialized-view-Xv1-9Bh0.d.ts → with-materialized-view-BP33v1Z6.d.ts} +1 -1
- package/dist/{with-overlayed-view-CuWhq_-C.d.ts → with-overlayed-view-DntFpOKN.d.ts} +1 -1
- package/dist/{with-rollup-K_iwal4b.d.ts → with-rollup-ClCHO6-4.d.ts} +1 -1
- package/dist/withdraw-accessible-6J2UH3IN.js +28 -0
- package/package.json +3 -3
- package/dist/api-JDWL67WL.js +0 -20
- package/dist/chunk-44DV37ZV.js.map +0 -1
- package/dist/chunk-47C4CI7R.js +0 -108
- package/dist/chunk-47C4CI7R.js.map +0 -1
- package/dist/chunk-4VDFUBTS.js.map +0 -1
- package/dist/chunk-56JB2BGI.js.map +0 -1
- package/dist/chunk-5GQE5IDB.js.map +0 -1
- package/dist/chunk-6P5AJ2ZS.js.map +0 -1
- package/dist/chunk-6Z435B6N.js.map +0 -1
- package/dist/chunk-7KTL4RHZ.js +0 -120
- package/dist/chunk-7KTL4RHZ.js.map +0 -1
- package/dist/chunk-7TAV3BFQ.js.map +0 -1
- package/dist/chunk-BASCPHNM.js.map +0 -1
- package/dist/chunk-BM6E4MUT.js.map +0 -1
- package/dist/chunk-OJ64XMPJ.js.map +0 -1
- package/dist/chunk-PMMV5SQC.js.map +0 -1
- package/dist/chunk-PPPZIBKY.js.map +0 -1
- package/dist/chunk-REWTMYSF.js.map +0 -1
- package/dist/chunk-RUIMKQTA.js.map +0 -1
- package/dist/chunk-UB3XHGFG.js.map +0 -1
- package/dist/chunk-VK6OC22R.js.map +0 -1
- package/dist/chunk-VVLOWY74.js.map +0 -1
- package/dist/chunk-X6VNIRHS.js.map +0 -1
- package/dist/chunk-XBPUVQDO.js.map +0 -1
- package/dist/chunk-YTCCC6NG.js.map +0 -1
- package/dist/collection-facade-EJVIN2BY.js +0 -39
- package/dist/config-drift-RFEVGBKR.js.map +0 -1
- package/dist/delegation-IHXOASHV.js +0 -25
- package/dist/derive-CD3ZVIXK.js +0 -21
- package/dist/describe-C6iHNlqJ.d.ts +0 -162
- package/dist/executor-EUPYHCLU.js +0 -9
- package/dist/executor-KZ4B3PRT.js +0 -9
- package/dist/executor-MHUM2VZK.js +0 -21
- package/dist/export-accessible-Z3NSZZHN.js +0 -23
- package/dist/extract-partition-VSKT35JG.js +0 -36
- package/dist/find-OH4BEULF.js +0 -11
- package/dist/issue-AEOL6RXA.js +0 -19
- package/dist/liberate-XSEPRWEA.js +0 -24
- package/dist/noydb-POVTIVQ6.js +0 -62
- package/dist/register-3D6R2MKN.js +0 -23
- package/dist/registry-AI4E46PD.js +0 -19
- package/dist/registry-HSNQ4NBP.js +0 -9
- package/dist/registry-WIX6QCV5.js +0 -17
- package/dist/request-withdrawal-GU4XS2R5.js +0 -31
- package/dist/revoke-ZFETCLYV.js +0 -24
- package/dist/signer-GAIMQQ2J.js +0 -25
- package/dist/storage-KEXIXLGM.js +0 -23
- package/dist/withdraw-accessible-Q7BULAN5.js +0 -28
- /package/dist/{api-JDWL67WL.js.map → api-HV4PDUWF.js.map} +0 -0
- /package/dist/{backup-WRGNTGJF.js.map → backup-ODXO7OGA.js.map} +0 -0
- /package/dist/{chunk-XW5LZYV4.js.map → chunk-2HVUKRNE.js.map} +0 -0
- /package/dist/{chunk-VFQOE76I.js.map → chunk-2KOSJTMU.js.map} +0 -0
- /package/dist/{chunk-2PJB6H3H.js.map → chunk-2UQ4RMHV.js.map} +0 -0
- /package/dist/{chunk-VIWOGJ2O.js.map → chunk-34RRRIC3.js.map} +0 -0
- /package/dist/{chunk-LFGJG4XZ.js.map → chunk-3I4KYWNP.js.map} +0 -0
- /package/dist/{chunk-723XB5NX.js.map → chunk-42KVY3OC.js.map} +0 -0
- /package/dist/{chunk-62APEMF3.js.map → chunk-4G3IT7J7.js.map} +0 -0
- /package/dist/{chunk-W3JABOVB.js.map → chunk-4RQ62VSR.js.map} +0 -0
- /package/dist/{chunk-WPNP3NF5.js.map → chunk-4ZSGSRBI.js.map} +0 -0
- /package/dist/{chunk-C4NOLA5X.js.map → chunk-5GAX2QOH.js.map} +0 -0
- /package/dist/{chunk-5HRJQSKN.js.map → chunk-5SAZMBW7.js.map} +0 -0
- /package/dist/{chunk-II6DLDZM.js.map → chunk-5TZZUL5X.js.map} +0 -0
- /package/dist/{chunk-TUL5YQWF.js.map → chunk-6CU3FN74.js.map} +0 -0
- /package/dist/{chunk-UWZ7O4NR.js.map → chunk-6MWUANRF.js.map} +0 -0
- /package/dist/{chunk-U7LV2DUN.js.map → chunk-6ULCYCMU.js.map} +0 -0
- /package/dist/{chunk-GDOOG5YQ.js.map → chunk-7IZQTCTR.js.map} +0 -0
- /package/dist/{chunk-TIAYXOEI.js.map → chunk-A4MAD6PO.js.map} +0 -0
- /package/dist/{chunk-5HZULLHE.js.map → chunk-AUR7MRHA.js.map} +0 -0
- /package/dist/{chunk-P2PEPSPK.js.map → chunk-CJEMA2Z6.js.map} +0 -0
- /package/dist/{chunk-L6Q5NA22.js.map → chunk-CTSFKDGA.js.map} +0 -0
- /package/dist/{chunk-J5YUA6JB.js.map → chunk-CWCCYH34.js.map} +0 -0
- /package/dist/{chunk-NTPWQH4S.js.map → chunk-DEYAO3N6.js.map} +0 -0
- /package/dist/{chunk-M3OYTM5Z.js.map → chunk-DFIBOSOQ.js.map} +0 -0
- /package/dist/{chunk-FZK3JJJK.js.map → chunk-E5AHO65E.js.map} +0 -0
- /package/dist/{chunk-F3EKFGUS.js.map → chunk-FC3XK5JT.js.map} +0 -0
- /package/dist/{chunk-3KBK5LU4.js.map → chunk-GX2BYNCT.js.map} +0 -0
- /package/dist/{chunk-55LSDABW.js.map → chunk-HBTT7YQX.js.map} +0 -0
- /package/dist/{chunk-PYIUDUGS.js.map → chunk-HOCEGVGQ.js.map} +0 -0
- /package/dist/{chunk-5JQMX2EH.js.map → chunk-ICV32FPK.js.map} +0 -0
- /package/dist/{chunk-37JZR7CY.js.map → chunk-IUKGIB2Q.js.map} +0 -0
- /package/dist/{chunk-OWGAXPRE.js.map → chunk-IWTYFS3D.js.map} +0 -0
- /package/dist/{chunk-FCOZ7DEC.js.map → chunk-JC5R7P44.js.map} +0 -0
- /package/dist/{chunk-IARAK3PK.js.map → chunk-KBBWY46Y.js.map} +0 -0
- /package/dist/{chunk-RNYDHIQL.js.map → chunk-KBF5GSGX.js.map} +0 -0
- /package/dist/{chunk-GLVXQU3E.js.map → chunk-KNXN47MO.js.map} +0 -0
- /package/dist/{chunk-J7OH6R4K.js.map → chunk-KXKLKJW4.js.map} +0 -0
- /package/dist/{chunk-PAJCRV7O.js.map → chunk-KYC4LIEU.js.map} +0 -0
- /package/dist/{chunk-R4IVPJHN.js.map → chunk-LEOXZY36.js.map} +0 -0
- /package/dist/{chunk-25G7PUTA.js.map → chunk-M5I354EE.js.map} +0 -0
- /package/dist/{chunk-26FSVNBL.js.map → chunk-MK2BSS44.js.map} +0 -0
- /package/dist/{chunk-UMH35AQV.js.map → chunk-MSVY7ULZ.js.map} +0 -0
- /package/dist/{chunk-5YBUFCFF.js.map → chunk-NNWK3PSY.js.map} +0 -0
- /package/dist/{chunk-X5QZAJDB.js.map → chunk-NSZ6J5DF.js.map} +0 -0
- /package/dist/{chunk-I6URUNTD.js.map → chunk-NUEFXLZU.js.map} +0 -0
- /package/dist/{chunk-DCVVCJVB.js.map → chunk-OQAODTYR.js.map} +0 -0
- /package/dist/{chunk-QYMMMKOO.js.map → chunk-OV4CMJGR.js.map} +0 -0
- /package/dist/{chunk-V76PHWLE.js.map → chunk-PEDZFFKW.js.map} +0 -0
- /package/dist/{chunk-BJ2XF2RC.js.map → chunk-Q2KVKTC2.js.map} +0 -0
- /package/dist/{chunk-QABECTNN.js.map → chunk-QTXQ6RNZ.js.map} +0 -0
- /package/dist/{chunk-P6TZ3IVN.js.map → chunk-RJ5522XX.js.map} +0 -0
- /package/dist/{chunk-CHK5VVMI.js.map → chunk-S6AQXDN4.js.map} +0 -0
- /package/dist/{chunk-MOQ5M46U.js.map → chunk-SZCHEDML.js.map} +0 -0
- /package/dist/{chunk-FWART3VA.js.map → chunk-VJ3NQK4K.js.map} +0 -0
- /package/dist/{chunk-3YKBGS3I.js.map → chunk-WNA6T3MA.js.map} +0 -0
- /package/dist/{chunk-7CZ6YXMO.js.map → chunk-WVCQ75OK.js.map} +0 -0
- /package/dist/{chunk-BTFTHF6Q.js.map → chunk-X66MXMR5.js.map} +0 -0
- /package/dist/{chunk-6PALJTC2.js.map → chunk-XJK2WIYN.js.map} +0 -0
- /package/dist/{chunk-5UOPIPZC.js.map → chunk-XQ7UYPVN.js.map} +0 -0
- /package/dist/{chunk-HU55NPHZ.js.map → chunk-Y2OCKFZ3.js.map} +0 -0
- /package/dist/{chunk-TCGVRKOS.js.map → chunk-YBFOBRTO.js.map} +0 -0
- /package/dist/{chunk-I6JJ6VJS.js.map → chunk-YLN33ADH.js.map} +0 -0
- /package/dist/{chunk-PVC2FBCQ.js.map → chunk-Z5YFRMG5.js.map} +0 -0
- /package/dist/{chunk-EU7HDMT3.js.map → chunk-ZWQFOXBR.js.map} +0 -0
- /package/dist/{collection-facade-EJVIN2BY.js.map → collection-facade-3RAXG2OU.js.map} +0 -0
- /package/dist/{computed-6FOFXQPE.js.map → computed-R62HGCO4.js.map} +0 -0
- /package/dist/{dead-filter-RHMNYOXP.js.map → dead-filter-VNA4M3GP.js.map} +0 -0
- /package/dist/{delegation-IHXOASHV.js.map → delegation-ZKII5UBI.js.map} +0 -0
- /package/dist/{derive-CD3ZVIXK.js.map → derive-5D2C3WG4.js.map} +0 -0
- /package/dist/{enclave-KGEUW2GL.js.map → enclave-EUBEJGPG.js.map} +0 -0
- /package/dist/{executor-EUPYHCLU.js.map → executor-IL7SRNUZ.js.map} +0 -0
- /package/dist/{executor-KZ4B3PRT.js.map → executor-OUA2Y6YC.js.map} +0 -0
- /package/dist/{executor-MHUM2VZK.js.map → executor-WAEI6PDV.js.map} +0 -0
- /package/dist/{export-accessible-Z3NSZZHN.js.map → export-accessible-O55RKAGC.js.map} +0 -0
- /package/dist/{extract-partition-VSKT35JG.js.map → extract-partition-VBGCBA6Q.js.map} +0 -0
- /package/dist/{fanout-sidecar-NBDKKCHT.js.map → fanout-sidecar-CI5BCMQM.js.map} +0 -0
- /package/dist/{find-OH4BEULF.js.map → find-FISGUWSK.js.map} +0 -0
- /package/dist/{issue-AEOL6RXA.js.map → issue-EQAWIYFQ.js.map} +0 -0
- /package/dist/{ledger-3LR3YO2W.js.map → ledger-AJA2SR3C.js.map} +0 -0
- /package/dist/{liberate-XSEPRWEA.js.map → liberate-SEGR4JLY.js.map} +0 -0
- /package/dist/{link-set-NSUIX6BR.js.map → link-set-YBAC2DQT.js.map} +0 -0
- /package/dist/{noydb-POVTIVQ6.js.map → noydb-AMEOU456.js.map} +0 -0
- /package/dist/{policy-Y7HL2KGA.js.map → policy-SDGRWVIL.js.map} +0 -0
- /package/dist/{post-register-KOFRTCDD.js.map → post-register-MROIUA5O.js.map} +0 -0
- /package/dist/{public-envelope-NC7SPNMV.js.map → public-envelope-J5PLQOW2.js.map} +0 -0
- /package/dist/{read-only-facade-5ADRJVTM.js.map → read-only-facade-UCYNRE56.js.map} +0 -0
- /package/dist/{register-3D6R2MKN.js.map → register-OVJKW7BS.js.map} +0 -0
- /package/dist/{registry-AI4E46PD.js.map → registry-5RJSK5AJ.js.map} +0 -0
- /package/dist/{registry-HSNQ4NBP.js.map → registry-DQRNTWRL.js.map} +0 -0
- /package/dist/{registry-WIX6QCV5.js.map → registry-LTGLERS7.js.map} +0 -0
- /package/dist/{request-withdrawal-GU4XS2R5.js.map → request-withdrawal-27O77D2V.js.map} +0 -0
- /package/dist/{reveal-5Y777N5Q.js.map → reveal-LT3I2K4P.js.map} +0 -0
- /package/dist/{revoke-ZFETCLYV.js.map → revoke-4N45G7D2.js.map} +0 -0
- /package/dist/{signer-GAIMQQ2J.js.map → signer-XJCOV7JD.js.map} +0 -0
- /package/dist/{stale-77LP2EEF.js.map → stale-IYYXEH3U.js.map} +0 -0
- /package/dist/{storage-KEXIXLGM.js.map → storage-Y44CAPE6.js.map} +0 -0
- /package/dist/{store-coordination-provider-NJDDZ264.js.map → store-coordination-provider-WKGAE2WI.js.map} +0 -0
- /package/dist/{verify-CAYGXYNO.js.map → verify-GH6CWVSW.js.map} +0 -0
- /package/dist/{walk-SMAE4IEI.js.map → walk-76UCFXYV.js.map} +0 -0
- /package/dist/{withdraw-accessible-Q7BULAN5.js.map → withdraw-accessible-6J2UH3IN.js.map} +0 -0
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
reducerBuilder
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2XE6LIXT.js";
|
|
4
4
|
import {
|
|
5
5
|
evaluateClause,
|
|
6
6
|
hasFnClause,
|
|
7
|
-
moneyRuntime,
|
|
8
7
|
readPath
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import {
|
|
11
|
-
applyI18nLocale
|
|
12
|
-
} from "./chunk-BASCPHNM.js";
|
|
8
|
+
} from "./chunk-KCG3BHFG.js";
|
|
13
9
|
import {
|
|
14
10
|
CrossJoinSourceUnknownError,
|
|
15
11
|
CrossJoinTooLargeError,
|
|
16
12
|
DanglingReferenceError,
|
|
13
|
+
FieldNotQueryableError,
|
|
17
14
|
JoinTooLargeError
|
|
18
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-CU62BBRB.js";
|
|
19
16
|
|
|
20
17
|
// src/kernel/query/join.ts
|
|
21
18
|
var DEFAULT_JOIN_MAX_ROWS = 5e4;
|
|
@@ -109,26 +106,26 @@ function applyOneJoin(leftRows, leg, context, locale) {
|
|
|
109
106
|
warnCeilingApproaching(leg.target, "right", rightSnapshot.length, maxRows);
|
|
110
107
|
}
|
|
111
108
|
const effLocale = locale ?? context.defaultLocale;
|
|
112
|
-
const
|
|
109
|
+
const presentResolve = effLocale !== void 0 && source.presentForJoin !== void 0 ? (right) => right !== null && typeof right === "object" ? source.presentForJoin(right, effLocale) : right : void 0;
|
|
113
110
|
const strategy = leg.strategy ?? (source.lookupById ? "nested" : "hash");
|
|
114
111
|
if (strategy === "nested" && source.lookupById) {
|
|
115
112
|
const lookup = (id) => source.lookupById?.(id);
|
|
116
|
-
return nestedLoopJoin(leftRows, leg, lookup,
|
|
113
|
+
return nestedLoopJoin(leftRows, leg, lookup, presentResolve);
|
|
117
114
|
}
|
|
118
|
-
return hashJoin(leftRows, leg, rightSnapshot,
|
|
115
|
+
return hashJoin(leftRows, leg, rightSnapshot, presentResolve);
|
|
119
116
|
}
|
|
120
|
-
function nestedLoopJoin(leftRows, leg, lookupById,
|
|
117
|
+
function nestedLoopJoin(leftRows, leg, lookupById, presentResolve) {
|
|
121
118
|
const out = [];
|
|
122
119
|
for (const left of leftRows) {
|
|
123
120
|
const rawId = readPath(left, leg.field);
|
|
124
121
|
const key = coerceRefKey(rawId);
|
|
125
122
|
let right = key === null ? void 0 : lookupById(key);
|
|
126
|
-
if (
|
|
123
|
+
if (presentResolve && right !== void 0) right = presentResolve(right);
|
|
127
124
|
out.push(attachJoin(left, leg, right, rawId));
|
|
128
125
|
}
|
|
129
126
|
return out;
|
|
130
127
|
}
|
|
131
|
-
function hashJoin(leftRows, leg, rightSnapshot,
|
|
128
|
+
function hashJoin(leftRows, leg, rightSnapshot, presentResolve) {
|
|
132
129
|
const rightMap = /* @__PURE__ */ new Map();
|
|
133
130
|
for (const record of rightSnapshot) {
|
|
134
131
|
const rawId = readPath(record, "id");
|
|
@@ -142,7 +139,7 @@ function hashJoin(leftRows, leg, rightSnapshot, i18nResolve) {
|
|
|
142
139
|
const rawId = readPath(left, leg.field);
|
|
143
140
|
const key = coerceRefKey(rawId);
|
|
144
141
|
let right = key === null ? void 0 : rightMap.get(key);
|
|
145
|
-
if (
|
|
142
|
+
if (presentResolve && right !== void 0) right = presentResolve(right);
|
|
146
143
|
out.push(attachJoin(left, leg, right, rawId));
|
|
147
144
|
}
|
|
148
145
|
return out;
|
|
@@ -396,10 +393,28 @@ var Query = class _Query {
|
|
|
396
393
|
* quantized into stored scaled-int space at build time and evaluated
|
|
397
394
|
* BigInt-exact per record. A malformed operand or a string operator
|
|
398
395
|
* (`contains`/`startsWith`) throws here, at the call site.
|
|
396
|
+
*
|
|
397
|
+
* Consults the Via pipeline's posture before building a clause (#629
|
|
398
|
+
* Task 8): a field whose posture is `queryable: 'none'` (e.g. a
|
|
399
|
+
* `blobFields` slot) throws `FieldNotQueryableError` here, at the call
|
|
400
|
+
* site. Every other posture is unaffected — the existing per-binding
|
|
401
|
+
* `buildClause` machinery runs exactly as before.
|
|
399
402
|
*/
|
|
400
403
|
where(field, op, value) {
|
|
401
|
-
const
|
|
402
|
-
|
|
404
|
+
const via = this.source.via;
|
|
405
|
+
if (via?.postureFor(field)?.queryable === "none") throw new FieldNotQueryableError(field);
|
|
406
|
+
const viaClause = via?.buildClause(field, op, value);
|
|
407
|
+
const clause = viaClause ? {
|
|
408
|
+
type: "field",
|
|
409
|
+
field,
|
|
410
|
+
op,
|
|
411
|
+
value,
|
|
412
|
+
via: {
|
|
413
|
+
brand: viaClause.brand,
|
|
414
|
+
payload: viaClause.payload,
|
|
415
|
+
evaluate: (actual, evalOp) => via.evaluateClause(viaClause, actual, evalOp)
|
|
416
|
+
}
|
|
417
|
+
} : { type: "field", field, op, value };
|
|
403
418
|
return new _Query(
|
|
404
419
|
this.source,
|
|
405
420
|
{ ...this.plan, clauses: [...this.plan.clauses, clause] },
|
|
@@ -469,8 +484,13 @@ var Query = class _Query {
|
|
|
469
484
|
* Sort by a field. Subsequent calls are tie-breakers. Pass
|
|
470
485
|
* `{ by: 'label' }` to sort a `dictKey`/`staticDict` field by its resolved
|
|
471
486
|
* label at the query locale instead of the stored code.
|
|
487
|
+
*
|
|
488
|
+
* Consults the Via pipeline's posture (#629 Task 8): a field whose posture
|
|
489
|
+
* is `queryable: 'none'` throws `FieldNotQueryableError` here, at the call
|
|
490
|
+
* site — same gate as `where()`.
|
|
472
491
|
*/
|
|
473
492
|
orderBy(field, direction = "asc", opts) {
|
|
493
|
+
if (this.source.via?.postureFor(field)?.queryable === "none") throw new FieldNotQueryableError(field);
|
|
474
494
|
const entry = opts?.by === "label" ? { field, direction, by: "label" } : { field, direction };
|
|
475
495
|
return new _Query(
|
|
476
496
|
this.source,
|
|
@@ -684,7 +704,7 @@ var Query = class _Query {
|
|
|
684
704
|
* (Left/base i18n fields are resolved by `get`/`list`, not here.)
|
|
685
705
|
*/
|
|
686
706
|
toArray(opts) {
|
|
687
|
-
const base = this.
|
|
707
|
+
const base = this.decodeVia(executePlanWithSource(this.source, this.plan, this.joinContext, opts?.locale));
|
|
688
708
|
if (this.plan.joins.length === 0) return base;
|
|
689
709
|
if (!this.joinContext) {
|
|
690
710
|
throw new Error(
|
|
@@ -694,21 +714,23 @@ var Query = class _Query {
|
|
|
694
714
|
return applyJoins(base, this.plan.joins, this.joinContext, opts?.locale);
|
|
695
715
|
}
|
|
696
716
|
/**
|
|
697
|
-
* Decode this source's
|
|
698
|
-
* decimal), so `query().toArray()` agrees with
|
|
699
|
-
* No-op when the source
|
|
717
|
+
* Decode this source's Via-covered fields on read (e.g. money: stored
|
|
718
|
+
* scaled-int → canonical decimal), so `query().toArray()` agrees with
|
|
719
|
+
* `get()`/`sum()` on the value. No-op when the source's Via pipeline
|
|
720
|
+
* declares no result decode.
|
|
700
721
|
*
|
|
701
|
-
* The query layer carries no locale context, so
|
|
702
|
-
* canonical decimal, WITHOUT fabricating locale-formatted
|
|
703
|
-
* / `<field>Number` virtuals. Producing a
|
|
704
|
-
* reintroduce a "two read paths
|
|
705
|
-
* field (e.g. it-IT via `get()` vs
|
|
706
|
-
*
|
|
722
|
+
* The query layer carries no locale context, so money decodes with
|
|
723
|
+
* `'raw'` — canonical decimal, WITHOUT fabricating locale-formatted
|
|
724
|
+
* `<field>Formatted` / `<field>Number` virtuals. Producing a
|
|
725
|
+
* guessed-locale string here would reintroduce a "two read paths
|
|
726
|
+
* disagree" failure on the virtual field (e.g. it-IT via `get()` vs
|
|
727
|
+
* en-US here). Consumers who need formatted money read through
|
|
728
|
+
* `get()`/`list()` with a locale.
|
|
707
729
|
*/
|
|
708
|
-
|
|
709
|
-
const
|
|
710
|
-
if (!
|
|
711
|
-
return records.map((r) =>
|
|
730
|
+
decodeVia(records) {
|
|
731
|
+
const via = this.source.via;
|
|
732
|
+
if (!via || !via.hasResultDecode) return records;
|
|
733
|
+
return records.map((r) => via.decodeResults(r));
|
|
712
734
|
}
|
|
713
735
|
/** Return the first matching record, or null. Joins are applied. `opts.locale` resolves joined i18n fields. */
|
|
714
736
|
first(opts) {
|
|
@@ -739,10 +761,7 @@ var Query = class _Query {
|
|
|
739
761
|
}
|
|
740
762
|
aggregate(specOrBuild) {
|
|
741
763
|
let spec = typeof specOrBuild === "function" ? specOrBuild(reducerBuilder) : specOrBuild;
|
|
742
|
-
|
|
743
|
-
if (moneyFields) {
|
|
744
|
-
spec = moneyRuntime().wrapMoneyReducers(spec, moneyFields);
|
|
745
|
-
}
|
|
764
|
+
spec = this.source.via?.wrapReducers(spec) ?? spec;
|
|
746
765
|
const source = this.source;
|
|
747
766
|
const clauses = this.plan.clauses;
|
|
748
767
|
const joinCtx = this.joinContext;
|
|
@@ -791,14 +810,14 @@ var Query = class _Query {
|
|
|
791
810
|
field,
|
|
792
811
|
upstreams,
|
|
793
812
|
dictLabelResolver,
|
|
794
|
-
this.source.
|
|
813
|
+
this.source.via
|
|
795
814
|
);
|
|
796
815
|
}
|
|
797
816
|
return this.aggregateStrategy.groupByN(
|
|
798
817
|
executeRecords,
|
|
799
818
|
fields,
|
|
800
819
|
upstreams,
|
|
801
|
-
this.source.
|
|
820
|
+
this.source.via
|
|
802
821
|
);
|
|
803
822
|
}
|
|
804
823
|
/**
|
|
@@ -931,8 +950,8 @@ function executePlanWithSource(source, plan, joinContext, locale) {
|
|
|
931
950
|
result = remainingClauses.length === 0 ? [...candidates] : filterRecords(candidates, remainingClauses, fnViewDecoder(source));
|
|
932
951
|
}
|
|
933
952
|
if (plan.orderBy.length > 0) {
|
|
934
|
-
const labelMaps = buildOrderLabelMaps(plan.orderBy, joinContext, locale);
|
|
935
|
-
result = sortRecords(result, plan.orderBy, source.
|
|
953
|
+
const labelMaps = buildOrderLabelMaps(plan.orderBy, joinContext, locale, source.via);
|
|
954
|
+
result = sortRecords(result, plan.orderBy, source.via, labelMaps);
|
|
936
955
|
}
|
|
937
956
|
if (plan.offset > 0) {
|
|
938
957
|
result = result.slice(plan.offset);
|
|
@@ -952,7 +971,7 @@ function candidateRecords(source, clauses) {
|
|
|
952
971
|
const clause = clauses[i];
|
|
953
972
|
if (clause.type !== "field") continue;
|
|
954
973
|
if (!indexes.has(clause.field)) continue;
|
|
955
|
-
if (clause.
|
|
974
|
+
if (clause.via) continue;
|
|
956
975
|
let ids = null;
|
|
957
976
|
if (clause.op === "==") {
|
|
958
977
|
ids = indexes.lookupEqual(clause.field, clause.value);
|
|
@@ -999,9 +1018,9 @@ function executePlan(records, plan) {
|
|
|
999
1018
|
return result;
|
|
1000
1019
|
}
|
|
1001
1020
|
function fnViewDecoder(source) {
|
|
1002
|
-
const
|
|
1003
|
-
if (!
|
|
1004
|
-
return (r) =>
|
|
1021
|
+
const via = source.via;
|
|
1022
|
+
if (!via || !via.hasResultDecode) return void 0;
|
|
1023
|
+
return (r) => via.decodeResults(r);
|
|
1005
1024
|
}
|
|
1006
1025
|
function filterRecords(records, clauses, decodeForFns) {
|
|
1007
1026
|
if (clauses.length === 0) return [...records];
|
|
@@ -1089,55 +1108,55 @@ function applyCrossJoin(leftRel, clause, rightSource) {
|
|
|
1089
1108
|
}
|
|
1090
1109
|
return expanded;
|
|
1091
1110
|
}
|
|
1092
|
-
function sortRecords(records, orderBy,
|
|
1111
|
+
function sortRecords(records, orderBy, via, labelMaps) {
|
|
1093
1112
|
return [...records].sort((a, b) => {
|
|
1094
1113
|
for (const { field, direction, by } of orderBy) {
|
|
1095
1114
|
let av = readField(a, field);
|
|
1096
1115
|
let bv = readField(b, field);
|
|
1097
|
-
const
|
|
1098
|
-
if (
|
|
1099
|
-
av = (typeof av === "string" ?
|
|
1100
|
-
bv = (typeof bv === "string" ?
|
|
1116
|
+
const labelResolver = by === "label" ? labelMaps?.get(field) : void 0;
|
|
1117
|
+
if (labelResolver) {
|
|
1118
|
+
av = (typeof av === "string" ? labelResolver(av) : void 0) ?? av;
|
|
1119
|
+
bv = (typeof bv === "string" ? labelResolver(bv) : void 0) ?? bv;
|
|
1101
1120
|
const cmp2 = compareValues(av, bv);
|
|
1102
1121
|
if (cmp2 !== 0) return direction === "asc" ? cmp2 : -cmp2;
|
|
1103
1122
|
continue;
|
|
1104
1123
|
}
|
|
1105
|
-
const
|
|
1106
|
-
const cmp =
|
|
1124
|
+
const viaCmp = via?.compareForOrder(field, av, bv);
|
|
1125
|
+
const cmp = viaCmp !== void 0 ? viaCmp : compareValues(av, bv);
|
|
1107
1126
|
if (cmp !== 0) return direction === "asc" ? cmp : -cmp;
|
|
1108
1127
|
}
|
|
1109
1128
|
return 0;
|
|
1110
1129
|
});
|
|
1111
1130
|
}
|
|
1112
|
-
function buildOrderLabelMaps(orderBy, joinContext, locale) {
|
|
1113
|
-
if (!joinContext?.resolveDictSource) return void 0;
|
|
1114
|
-
const resolveDict = joinContext.resolveDictSource.bind(joinContext);
|
|
1131
|
+
function buildOrderLabelMaps(orderBy, joinContext, locale, via) {
|
|
1115
1132
|
let maps;
|
|
1116
1133
|
for (const { field, by } of orderBy) {
|
|
1117
1134
|
if (by !== "label") continue;
|
|
1118
|
-
const dictSource =
|
|
1119
|
-
if (
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1135
|
+
const dictSource = joinContext?.resolveDictSource?.(field);
|
|
1136
|
+
if (dictSource) {
|
|
1137
|
+
const loc = locale ?? dictSource.displayLocale;
|
|
1138
|
+
if (loc === void 0) continue;
|
|
1139
|
+
const codeToLabel = /* @__PURE__ */ new Map();
|
|
1140
|
+
for (const entry of dictSource.snapshot()) {
|
|
1141
|
+
const k = entry["key"];
|
|
1142
|
+
const labels = entry["labels"];
|
|
1143
|
+
const label = labels?.[loc];
|
|
1144
|
+
if (typeof k === "string" && typeof label === "string") codeToLabel.set(k, label);
|
|
1145
|
+
}
|
|
1146
|
+
;
|
|
1147
|
+
(maps ??= /* @__PURE__ */ new Map()).set(field, (code) => codeToLabel.get(code));
|
|
1148
|
+
continue;
|
|
1149
|
+
}
|
|
1150
|
+
if (via) {
|
|
1151
|
+
const cache = /* @__PURE__ */ new Map();
|
|
1152
|
+
(maps ??= /* @__PURE__ */ new Map()).set(field, (code) => {
|
|
1153
|
+
if (!cache.has(code)) cache.set(code, via.resolveOrderLabel(field, code, locale));
|
|
1154
|
+
return cache.get(code);
|
|
1155
|
+
});
|
|
1128
1156
|
}
|
|
1129
|
-
;
|
|
1130
|
-
(maps ??= /* @__PURE__ */ new Map()).set(field, codeToLabel);
|
|
1131
1157
|
}
|
|
1132
1158
|
return maps;
|
|
1133
1159
|
}
|
|
1134
|
-
function compareMoney(a, b, desc) {
|
|
1135
|
-
const av = moneyRuntime().moneyScaledValue(a, desc);
|
|
1136
|
-
const bv = moneyRuntime().moneyScaledValue(b, desc);
|
|
1137
|
-
if (av === null) return bv === null ? 0 : 1;
|
|
1138
|
-
if (bv === null) return -1;
|
|
1139
|
-
return av < bv ? -1 : av > bv ? 1 : 0;
|
|
1140
|
-
}
|
|
1141
1160
|
function readField(record, field) {
|
|
1142
1161
|
if (record === null || record === void 0) return void 0;
|
|
1143
1162
|
if (!field.includes(".")) {
|
|
@@ -1279,28 +1298,30 @@ var ScanBuilder = class _ScanBuilder {
|
|
|
1279
1298
|
*/
|
|
1280
1299
|
joinContext;
|
|
1281
1300
|
/**
|
|
1282
|
-
*
|
|
1283
|
-
*
|
|
1284
|
-
*
|
|
1285
|
-
* `
|
|
1286
|
-
*
|
|
1301
|
+
* The backing collection's compiled Via pipeline (money now; more Via
|
|
1302
|
+
* features later). When it declares a result decode, yielded records
|
|
1303
|
+
* are decoded (e.g. money: stored scaled-int → canonical decimal) so
|
|
1304
|
+
* `scan()` agrees with `get()`/`list()`/`query().toArray()`. Decoded
|
|
1305
|
+
* with `'raw'` (canonical decimal, no locale-formatted virtuals) since
|
|
1306
|
+
* the scan stream carries no locale context, mirroring `Query.toArray()`.
|
|
1287
1307
|
*/
|
|
1288
|
-
|
|
1289
|
-
constructor(pageProvider, pageSize = DEFAULT_SCAN_PAGE_SIZE, clauses = [], joins = [], joinContext,
|
|
1308
|
+
via;
|
|
1309
|
+
constructor(pageProvider, pageSize = DEFAULT_SCAN_PAGE_SIZE, clauses = [], joins = [], joinContext, via) {
|
|
1290
1310
|
this.pageProvider = pageProvider;
|
|
1291
1311
|
this.pageSize = pageSize;
|
|
1292
1312
|
this.clauses = clauses;
|
|
1293
1313
|
this.joins = joins;
|
|
1294
1314
|
this.joinContext = joinContext;
|
|
1295
|
-
this.
|
|
1315
|
+
this.via = via;
|
|
1296
1316
|
}
|
|
1297
1317
|
/**
|
|
1298
|
-
* Decode this scan's
|
|
1299
|
-
* decimal). No-op when
|
|
1318
|
+
* Decode this scan's Via-covered fields on a record (e.g. money: stored
|
|
1319
|
+
* scaled-int → canonical decimal). No-op when the Via pipeline declares
|
|
1320
|
+
* no result decode. See {@link via}.
|
|
1300
1321
|
*/
|
|
1301
|
-
|
|
1302
|
-
if (!this.
|
|
1303
|
-
return
|
|
1322
|
+
decodeVia(record) {
|
|
1323
|
+
if (!this.via || !this.via.hasResultDecode) return record;
|
|
1324
|
+
return this.via.decodeResults(record);
|
|
1304
1325
|
}
|
|
1305
1326
|
/**
|
|
1306
1327
|
* Add a field comparison. Runs per record as the scan stream
|
|
@@ -1314,17 +1335,34 @@ var ScanBuilder = class _ScanBuilder {
|
|
|
1314
1335
|
* the in-memory cache where indexes live. Index-accelerated scans
|
|
1315
1336
|
* are a future optimization — the current implementation
|
|
1316
1337
|
* evaluates clauses per record in O(1) per clause.
|
|
1338
|
+
*
|
|
1339
|
+
* Consults the Via pipeline's posture before building a clause (#629
|
|
1340
|
+
* Task 8): a field whose posture is `queryable: 'none'` throws
|
|
1341
|
+
* `FieldNotQueryableError` here, at the call site — same gate as
|
|
1342
|
+
* `Query.where()`.
|
|
1317
1343
|
*/
|
|
1318
1344
|
where(field, op, value) {
|
|
1319
|
-
const
|
|
1320
|
-
|
|
1345
|
+
const via = this.via;
|
|
1346
|
+
if (via?.postureFor(field)?.queryable === "none") throw new FieldNotQueryableError(field);
|
|
1347
|
+
const viaClause = via?.buildClause(field, op, value);
|
|
1348
|
+
const clause = viaClause ? {
|
|
1349
|
+
type: "field",
|
|
1350
|
+
field,
|
|
1351
|
+
op,
|
|
1352
|
+
value,
|
|
1353
|
+
via: {
|
|
1354
|
+
brand: viaClause.brand,
|
|
1355
|
+
payload: viaClause.payload,
|
|
1356
|
+
evaluate: (actual, evalOp) => via.evaluateClause(viaClause, actual, evalOp)
|
|
1357
|
+
}
|
|
1358
|
+
} : { type: "field", field, op, value };
|
|
1321
1359
|
return new _ScanBuilder(
|
|
1322
1360
|
this.pageProvider,
|
|
1323
1361
|
this.pageSize,
|
|
1324
1362
|
[...this.clauses, clause],
|
|
1325
1363
|
this.joins,
|
|
1326
1364
|
this.joinContext,
|
|
1327
|
-
this.
|
|
1365
|
+
this.via
|
|
1328
1366
|
);
|
|
1329
1367
|
}
|
|
1330
1368
|
/**
|
|
@@ -1344,7 +1382,7 @@ var ScanBuilder = class _ScanBuilder {
|
|
|
1344
1382
|
[...this.clauses, clause],
|
|
1345
1383
|
this.joins,
|
|
1346
1384
|
this.joinContext,
|
|
1347
|
-
this.
|
|
1385
|
+
this.via
|
|
1348
1386
|
);
|
|
1349
1387
|
}
|
|
1350
1388
|
/**
|
|
@@ -1456,7 +1494,7 @@ var ScanBuilder = class _ScanBuilder {
|
|
|
1456
1494
|
this.clauses,
|
|
1457
1495
|
[...this.joins, leg],
|
|
1458
1496
|
this.joinContext,
|
|
1459
|
-
this.
|
|
1497
|
+
this.via
|
|
1460
1498
|
);
|
|
1461
1499
|
}
|
|
1462
1500
|
/**
|
|
@@ -1473,7 +1511,7 @@ var ScanBuilder = class _ScanBuilder {
|
|
|
1473
1511
|
while (true) {
|
|
1474
1512
|
for (const record of page.items) {
|
|
1475
1513
|
if (!this.recordMatches(record)) continue;
|
|
1476
|
-
const decoded = this.
|
|
1514
|
+
const decoded = this.decodeVia(record);
|
|
1477
1515
|
if (joinResolvers === null) {
|
|
1478
1516
|
yield decoded;
|
|
1479
1517
|
} else {
|
|
@@ -1603,6 +1641,7 @@ var ScanBuilder = class _ScanBuilder {
|
|
|
1603
1641
|
}
|
|
1604
1642
|
async aggregate(specOrBuild) {
|
|
1605
1643
|
const spec = typeof specOrBuild === "function" ? specOrBuild(reducerBuilder) : specOrBuild;
|
|
1644
|
+
this.via?.refuseUnqueryableReducers(spec);
|
|
1606
1645
|
const keys = Object.keys(spec);
|
|
1607
1646
|
const state = {};
|
|
1608
1647
|
for (const key of keys) {
|
|
@@ -1628,7 +1667,7 @@ var ScanBuilder = class _ScanBuilder {
|
|
|
1628
1667
|
*/
|
|
1629
1668
|
recordMatches(record) {
|
|
1630
1669
|
if (this.clauses.length === 0) return true;
|
|
1631
|
-
const fnView = this.
|
|
1670
|
+
const fnView = this.via?.hasResultDecode && hasFnClause(this.clauses) ? this.decodeVia(record) : void 0;
|
|
1632
1671
|
for (const clause of this.clauses) {
|
|
1633
1672
|
if (!evaluateClause(record, clause, fnView)) return false;
|
|
1634
1673
|
}
|
|
@@ -1653,4 +1692,4 @@ export {
|
|
|
1653
1692
|
executePlan,
|
|
1654
1693
|
ScanBuilder
|
|
1655
1694
|
};
|
|
1656
|
-
//# sourceMappingURL=chunk-
|
|
1695
|
+
//# sourceMappingURL=chunk-7HAPHVRJ.js.map
|