@noy-db/hub 0.7.0 → 0.8.0-pre.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +105 -14
- package/LICENSE +202 -21
- package/NOTICE +1 -0
- package/README.md +27 -10
- package/codemods/0.8.0-pre.json +61 -0
- package/dist/api-GVYEKSJE.js +19 -0
- package/dist/as/index.js +11 -11
- package/dist/at/index.js +9 -9
- package/dist/attestation/index.js +20 -20
- package/dist/{backup-IJTB4S4M.js → backup-7TFRVFLH.js} +21 -15
- package/dist/backup-7TFRVFLH.js.map +1 -0
- package/dist/blobs/index.js +13 -13
- package/dist/broker/index.js +12 -12
- package/dist/by/index.js +2 -2
- package/dist/cargo/index.js +39 -36
- package/dist/{chunk-7O3Y4PPD.js → chunk-244VXYPG.js} +140 -16
- package/dist/chunk-244VXYPG.js.map +1 -0
- package/dist/{chunk-BUE2D7PX.js → chunk-32YV3TJT.js} +2 -2
- package/dist/{chunk-3RCJJBNR.js → chunk-3ELRMVJK.js} +12 -12
- package/dist/{chunk-6GMZ7HEE.js → chunk-3F7GLNAE.js} +6 -6
- package/dist/{chunk-2Y4IMKA6.js → chunk-3H5KLDZN.js} +4 -4
- package/dist/{chunk-VTFVLCUH.js → chunk-3JWHAR6E.js} +2 -2
- package/dist/{chunk-YMUFFJCO.js → chunk-3TDUWVWB.js} +5 -2
- package/dist/chunk-3TDUWVWB.js.map +1 -0
- package/dist/{chunk-JBDFMYKQ.js → chunk-4AF3TUMP.js} +2 -2
- package/dist/{chunk-ZORTV6NH.js → chunk-4I522ERM.js} +88 -4
- package/dist/chunk-4I522ERM.js.map +1 -0
- package/dist/{chunk-MUM7IANK.js → chunk-4MXI3ODD.js} +4 -4
- package/dist/chunk-4MXI3ODD.js.map +1 -0
- package/dist/{chunk-BLN54W3L.js → chunk-5FDLC6G7.js} +56 -3
- package/dist/chunk-5FDLC6G7.js.map +1 -0
- package/dist/chunk-5O7D6ZTW.js +53 -0
- package/dist/chunk-5O7D6ZTW.js.map +1 -0
- package/dist/{chunk-J6FXAEUG.js → chunk-6B3VNR4P.js} +12 -12
- package/dist/{chunk-TUFM4UZP.js → chunk-6K7DPM7D.js} +2 -2
- package/dist/{chunk-K6LHRFBL.js → chunk-6LMQ5R26.js} +7 -7
- package/dist/{chunk-SPXXX5E4.js → chunk-6LNL42F5.js} +94 -32
- package/dist/chunk-6LNL42F5.js.map +1 -0
- package/dist/{chunk-XLMEZIAJ.js → chunk-6OWXYZK2.js} +2 -2
- package/dist/{chunk-BOWNCWZT.js → chunk-6QSQQLSE.js} +3 -3
- package/dist/chunk-7JE7BDYJ.js +1558 -0
- package/dist/chunk-7JE7BDYJ.js.map +1 -0
- package/dist/{chunk-KG7TZKZG.js → chunk-7VCXZDA4.js} +5 -5
- package/dist/chunk-7VCXZDA4.js.map +1 -0
- package/dist/{chunk-NQKIUNW5.js → chunk-A6IJU4TK.js} +2 -2
- package/dist/{chunk-BM5TWITZ.js → chunk-ANWPSTZU.js} +38 -9
- package/dist/chunk-ANWPSTZU.js.map +1 -0
- package/dist/{chunk-QIZPZMUI.js → chunk-AOWGXU6D.js} +2 -2
- package/dist/{chunk-CUZLNGD5.js → chunk-B2YY6WDD.js} +1 -1
- package/dist/chunk-B2YY6WDD.js.map +1 -0
- package/dist/{chunk-SFAWCTEM.js → chunk-B57AFBY2.js} +2 -2
- package/dist/{chunk-GPEQUXHL.js → chunk-B6SJIBQK.js} +4 -4
- package/dist/chunk-BJ2IXQ5Q.js +100 -0
- package/dist/chunk-BJ2IXQ5Q.js.map +1 -0
- package/dist/{chunk-Q2PU57HC.js → chunk-BK2HHQGN.js} +2 -2
- package/dist/chunk-BKT776R5.js +1 -0
- package/dist/{chunk-KUX3OB6D.js → chunk-BP6DARYA.js} +33 -5
- package/dist/chunk-BP6DARYA.js.map +1 -0
- package/dist/{chunk-FXBIP2WD.js → chunk-BUDAGWL5.js} +6 -6
- package/dist/chunk-CF5UU4S7.js +757 -0
- package/dist/chunk-CF5UU4S7.js.map +1 -0
- package/dist/{chunk-BOET4NA4.js → chunk-CKNGS5MH.js} +3 -3
- package/dist/chunk-CY2CYVWZ.js +41 -0
- package/dist/chunk-CY2CYVWZ.js.map +1 -0
- package/dist/{chunk-2577DKXB.js → chunk-DC5QVPV7.js} +2 -2
- package/dist/chunk-DC5QVPV7.js.map +1 -0
- package/dist/{chunk-YSRUYAVU.js → chunk-DE4DH2RZ.js} +2 -2
- package/dist/{chunk-6I2RQCET.js → chunk-DF73H4UN.js} +4 -4
- package/dist/{chunk-4GVM6QZA.js → chunk-ENAG3IY7.js} +2 -2
- package/dist/chunk-ENAG3IY7.js.map +1 -0
- package/dist/{chunk-K7NTTA6P.js → chunk-EOVMT6TB.js} +2 -2
- package/dist/chunk-F24ZZTHQ.js +193 -0
- package/dist/chunk-F24ZZTHQ.js.map +1 -0
- package/dist/chunk-F2TDU7MQ.js +456 -0
- package/dist/chunk-F2TDU7MQ.js.map +1 -0
- package/dist/chunk-F6NCB7KT.js +13 -0
- package/dist/chunk-F6NCB7KT.js.map +1 -0
- package/dist/{chunk-SPYWXKJN.js → chunk-F7XGHL5O.js} +3 -3
- package/dist/chunk-F7XGHL5O.js.map +1 -0
- package/dist/{chunk-XTXOCYOJ.js → chunk-FCKWQE2H.js} +5 -5
- package/dist/{chunk-U4FOQDY4.js → chunk-FH2L2E34.js} +4 -4
- package/dist/chunk-FH2L2E34.js.map +1 -0
- package/dist/{chunk-4OZNXTO4.js → chunk-FN5EBVTQ.js} +2 -2
- package/dist/chunk-FQ54DWUQ.js +270 -0
- package/dist/chunk-FQ54DWUQ.js.map +1 -0
- package/dist/{chunk-NKHRDYOR.js → chunk-FQ5VRHIB.js} +4 -4
- package/dist/{chunk-FAHMLERK.js → chunk-FW22ZCXT.js} +2 -2
- package/dist/chunk-FXQBGFOX.js +524 -0
- package/dist/chunk-FXQBGFOX.js.map +1 -0
- package/dist/{chunk-AO42KJO6.js → chunk-GF5BZ7D4.js} +45 -9
- package/dist/chunk-GF5BZ7D4.js.map +1 -0
- package/dist/{chunk-TRGTKX5E.js → chunk-GHLTDZRS.js} +5 -3
- package/dist/{chunk-TRGTKX5E.js.map → chunk-GHLTDZRS.js.map} +1 -1
- package/dist/{chunk-5WDXHNSW.js → chunk-HBPPGWUM.js} +5 -5
- package/dist/chunk-HBPPGWUM.js.map +1 -0
- package/dist/{chunk-KTFRCC5C.js → chunk-HBRLNOHL.js} +82 -8
- package/dist/chunk-HBRLNOHL.js.map +1 -0
- package/dist/chunk-HLEK5VAN.js +275 -0
- package/dist/chunk-HLEK5VAN.js.map +1 -0
- package/dist/{chunk-RMS3NEA3.js → chunk-HT2AHGQI.js} +2 -2
- package/dist/{chunk-CHJBLCOG.js → chunk-HVSCEIYL.js} +7 -7
- package/dist/{chunk-UXWB3FPF.js → chunk-I3JDRCMW.js} +150 -22
- package/dist/chunk-I3JDRCMW.js.map +1 -0
- package/dist/{chunk-GY4WYNNG.js → chunk-ID6Z6E66.js} +2 -2
- package/dist/{chunk-EYBQEIUY.js → chunk-IEX7NK2K.js} +3 -3
- package/dist/{chunk-KUJDV5QH.js → chunk-ISZQJBML.js} +5 -5
- package/dist/{chunk-LWBCUYZW.js → chunk-IT22PWKV.js} +2 -2
- package/dist/{chunk-EQEYOJBM.js → chunk-IUWCVHQ7.js} +3 -3
- package/dist/chunk-IUWCVHQ7.js.map +1 -0
- package/dist/{chunk-7V4TP3AF.js → chunk-J6UOHJY5.js} +4 -4
- package/dist/{chunk-JMGDHKQF.js → chunk-JCN44NCY.js} +2 -2
- package/dist/{chunk-CARABLSQ.js → chunk-K6W7BVZ6.js} +3 -3
- package/dist/{chunk-77K4PG6P.js → chunk-KJFW62P4.js} +29 -11
- package/dist/chunk-KJFW62P4.js.map +1 -0
- package/dist/{chunk-453F654R.js → chunk-L7DOS3TE.js} +2 -2
- package/dist/chunk-LGNDFRYC.js +23 -0
- package/dist/chunk-LGNDFRYC.js.map +1 -0
- package/dist/{chunk-WEQEYLCS.js → chunk-LGRLME4M.js} +7 -7
- package/dist/{chunk-RMF67KCG.js → chunk-LQ4ZHOKP.js} +2 -2
- package/dist/{chunk-ZVO4QVPD.js → chunk-M522UYZ2.js} +5 -5
- package/dist/{chunk-G56KBWFY.js → chunk-M7NI3IWE.js} +45 -12
- package/dist/chunk-M7NI3IWE.js.map +1 -0
- package/dist/chunk-MDWKM2XC.js +293 -0
- package/dist/chunk-MDWKM2XC.js.map +1 -0
- package/dist/chunk-MKXXMNJH.js +204 -0
- package/dist/chunk-MKXXMNJH.js.map +1 -0
- package/dist/{chunk-SKGMN35F.js → chunk-MLPHLJIQ.js} +3 -3
- package/dist/chunk-MLPHLJIQ.js.map +1 -0
- package/dist/{chunk-2N4GY74U.js → chunk-MTL7MXGR.js} +6 -6
- package/dist/{chunk-TFR7DSOV.js → chunk-MVZ2TPVP.js} +2 -2
- package/dist/{chunk-CPWQB3N5.js → chunk-N5DNADLQ.js} +7 -7
- package/dist/{chunk-ELNXJMGB.js → chunk-NNARWO72.js} +6 -6
- package/dist/{chunk-PT43Y56J.js → chunk-NRT6QZQB.js} +102 -16
- package/dist/chunk-NRT6QZQB.js.map +1 -0
- package/dist/{chunk-QIBVIOXO.js → chunk-NWHBJQAL.js} +99 -8
- package/dist/chunk-NWHBJQAL.js.map +1 -0
- package/dist/chunk-NYMLINRP.js +28 -0
- package/dist/chunk-NYMLINRP.js.map +1 -0
- package/dist/{chunk-7MG7SJT7.js → chunk-ODVPTDPK.js} +1 -1
- package/dist/chunk-ODVPTDPK.js.map +1 -0
- package/dist/chunk-ORDURZBU.js +461 -0
- package/dist/chunk-ORDURZBU.js.map +1 -0
- package/dist/{chunk-6YXCPL4T.js → chunk-PDCG6PR5.js} +2 -2
- package/dist/{chunk-REDOOY2Q.js → chunk-PSIV7CJV.js} +2 -2
- package/dist/{chunk-NA2NIJZI.js → chunk-QBBUZ3I3.js} +126 -19
- package/dist/chunk-QBBUZ3I3.js.map +1 -0
- package/dist/{chunk-5VCRVKOZ.js → chunk-QOOUUR4A.js} +6 -4
- package/dist/{chunk-5VCRVKOZ.js.map → chunk-QOOUUR4A.js.map} +1 -1
- package/dist/{chunk-ANATMFIO.js → chunk-QWFHIOD2.js} +5 -5
- package/dist/{chunk-X2DLENDQ.js → chunk-QWGU66MP.js} +3 -3
- package/dist/chunk-RHVMZSUU.js +7 -0
- package/dist/chunk-RHVMZSUU.js.map +1 -0
- package/dist/{chunk-BSFNRLK2.js → chunk-S57HTZ6X.js} +5 -5
- package/dist/{chunk-SZJ3DLZA.js → chunk-SEE332EV.js} +2 -2
- package/dist/{chunk-YYP7WSEB.js → chunk-SI3V7D4G.js} +2 -2
- package/dist/{chunk-UGTBXF5U.js → chunk-SOIQ4MM4.js} +3 -3
- package/dist/chunk-SUZKW6UR.js +25 -0
- package/dist/chunk-SUZKW6UR.js.map +1 -0
- package/dist/{chunk-VXGSWL6L.js → chunk-SYVZW77S.js} +6 -6
- package/dist/{chunk-6GOE5PGN.js → chunk-T2LBQ5DV.js} +883 -227
- package/dist/chunk-T2LBQ5DV.js.map +1 -0
- package/dist/chunk-T52GX4SA.js +215 -0
- package/dist/chunk-T52GX4SA.js.map +1 -0
- package/dist/{chunk-MVMXZYXT.js → chunk-TKUOEU2F.js} +2 -2
- package/dist/chunk-TOPYQ6GA.js +31 -0
- package/dist/chunk-TOPYQ6GA.js.map +1 -0
- package/dist/{chunk-SMH6SRX7.js → chunk-TROR3ALR.js} +2 -2
- package/dist/{chunk-2C3AQB46.js → chunk-UD5EVGZ7.js} +42 -389
- package/dist/chunk-UD5EVGZ7.js.map +1 -0
- package/dist/{chunk-KJIMGIWO.js → chunk-UPD5NWI5.js} +65 -17
- package/dist/chunk-UPD5NWI5.js.map +1 -0
- package/dist/{chunk-SL3JAAKN.js → chunk-UYB234ZR.js} +30 -2
- package/dist/chunk-UYB234ZR.js.map +1 -0
- package/dist/chunk-VHM7HCKB.js +220 -0
- package/dist/chunk-VHM7HCKB.js.map +1 -0
- package/dist/{chunk-DGOZ4UZD.js → chunk-VNNRUGMM.js} +2 -2
- package/dist/{chunk-HDOU6I2Y.js → chunk-VNPEWFPD.js} +4 -4
- package/dist/{chunk-L7CIOOBW.js → chunk-WNJ4AVGE.js} +2 -2
- package/dist/{chunk-FMZY5Q6L.js → chunk-WX5ADGTZ.js} +3 -3
- package/dist/{chunk-VXANTWBJ.js → chunk-WY2XXTET.js} +92 -6
- package/dist/{chunk-VXANTWBJ.js.map → chunk-WY2XXTET.js.map} +1 -1
- package/dist/{chunk-6X6SEMEE.js → chunk-X25NWUZB.js} +33 -8
- package/dist/chunk-X25NWUZB.js.map +1 -0
- package/dist/{chunk-Q7HZX3IF.js → chunk-X4773RBR.js} +2 -2
- package/dist/chunk-XBKH4FOC.js +195 -0
- package/dist/chunk-XBKH4FOC.js.map +1 -0
- package/dist/{chunk-ANSIZYEG.js → chunk-YNIUIERI.js} +3 -3
- package/dist/chunk-YSK2CU2Q.js +936 -0
- package/dist/chunk-YSK2CU2Q.js.map +1 -0
- package/dist/{chunk-UXVWEX5L.js → chunk-Z5HTYMMQ.js} +6 -2
- package/dist/chunk-Z5HTYMMQ.js.map +1 -0
- package/dist/{chunk-RRNRNANG.js → chunk-ZE4CHIED.js} +66 -75
- package/dist/chunk-ZE4CHIED.js.map +1 -0
- package/dist/chunk-ZSX4S5XB.js +1289 -0
- package/dist/chunk-ZSX4S5XB.js.map +1 -0
- package/dist/{chunk-BZ3534YM.js → chunk-ZUVBC32X.js} +2 -2
- package/dist/{chunk-L742JPKZ.js → chunk-ZXABPVM6.js} +6 -6
- package/dist/classified/index.js +5 -5
- package/dist/{classified-marker-LI2SF2E4.js → classified-marker-W3USLL5M.js} +3 -3
- package/dist/collection-facade-QU6IJBN3.js +48 -0
- package/dist/{computed-VPOKQK4N.js → computed-TPFBX7U4.js} +3 -3
- package/dist/consent/index.js +9 -9
- package/dist/cover/index.js +10 -10
- package/dist/coverage/index.js +306 -0
- package/dist/coverage/index.js.map +1 -0
- package/dist/custody/index.js +12 -12
- package/dist/{dead-filter-TSWZQRR5.js → dead-filter-U2UYKSZL.js} +2 -2
- package/dist/debug/index.js +1 -1
- package/dist/{delegation-OVIFFPG4.js → delegation-S3AEPW2T.js} +11 -11
- package/dist/derivations/index.js +25 -22
- package/dist/derive-OX7F6TGG.js +21 -0
- package/dist/directory/index.js +10 -10
- package/dist/{dispatch-WC6X2M6C.js → dispatch-3CQDJV5Q.js} +5 -5
- package/dist/{dispatch-S73TK3IY.js → dispatch-RH4LHKBH.js} +21 -21
- package/dist/{enclave-KJOTOH7X.js → enclave-27SMF6GF.js} +15 -9
- package/dist/executor-B6SRO2QS.js +36 -0
- package/dist/executor-BI5CHWRY.js +8 -0
- package/dist/executor-RBKM5W5K.js +8 -0
- package/dist/export-accessible-VMA3YM5V.js +22 -0
- package/dist/extract-partition-NF7PXGPP.js +37 -0
- package/dist/{fanout-sidecar-WUFXNYP4.js → fanout-sidecar-OT6RYLOL.js} +9 -9
- package/dist/find-LZMP26KF.js +10 -0
- package/dist/forget/index.js +9 -9
- package/dist/guards/index.js +4 -4
- package/dist/history/index.js +13 -13
- package/dist/i18n/index.js +14 -14
- package/dist/index.d.ts +29 -6
- package/dist/index.js +999 -191
- package/dist/index.js.map +1 -1
- package/dist/indexing/index.js +13 -5
- package/dist/indexing/index.js.map +1 -1
- package/dist/introspection/index.js +11 -11
- package/dist/issue-IHARXWW5.js +18 -0
- package/dist/ivf-flat-UZ6DQDLS.js +314 -0
- package/dist/ivf-flat-UZ6DQDLS.js.map +1 -0
- package/dist/{json-schema-V3M5MUCM.js → json-schema-3SHX72CC.js} +2 -1
- package/dist/json-schema-3SHX72CC.js.map +1 -0
- package/dist/kernel/collection-config.d.ts +4 -20
- package/dist/kernel/collection.d.ts +29 -8
- package/dist/kernel/enclave/crypto.d.ts +16 -0
- package/dist/kernel/enclave/index.d.ts +1 -1
- package/dist/kernel/enclave/record-keys/record-codec.d.ts +25 -0
- package/dist/kernel/errors.d.ts +227 -36
- package/dist/kernel/generation-map.d.ts +48 -0
- package/dist/kernel/memory-store.d.ts +35 -7
- package/dist/kernel/noydb.d.ts +6 -1
- package/dist/kernel/present-cache.d.ts +58 -0
- package/dist/kernel/query/all.d.ts +7 -0
- package/dist/kernel/query/builder.d.ts +601 -270
- package/dist/kernel/query/civil-date.d.ts +64 -0
- package/dist/kernel/query/cursor.d.ts +40 -0
- package/dist/kernel/query/distinct-key.d.ts +98 -0
- package/dist/kernel/query/hydration.d.ts +76 -0
- package/dist/kernel/query/index.d.ts +31 -15
- package/dist/kernel/query/internal/core.d.ts +30 -0
- package/dist/kernel/query/internal/hooks.d.ts +22 -0
- package/dist/kernel/query/internal/maintenance.d.ts +43 -0
- package/dist/kernel/query/live/incremental.d.ts +314 -0
- package/dist/kernel/query/live/index.d.ts +22 -0
- package/dist/kernel/query/live/install.d.ts +2 -0
- package/dist/kernel/query/{live.d.ts → live/live.d.ts} +39 -9
- package/dist/kernel/query/live/methods.d.ts +107 -0
- package/dist/kernel/query/predicate.d.ts +119 -1
- package/dist/kernel/query/reduce/date-trunc.d.ts +75 -0
- package/dist/kernel/query/reduce/index.d.ts +36 -0
- package/dist/kernel/query/reduce/install.d.ts +2 -0
- package/dist/kernel/query/reduce/methods.d.ts +259 -0
- package/dist/kernel/query/reduce/scan-methods.d.ts +121 -0
- package/dist/kernel/query/relate/explain.d.ts +199 -0
- package/dist/kernel/query/relate/index.d.ts +48 -0
- package/dist/kernel/query/relate/install.d.ts +2 -0
- package/dist/kernel/query/relate/join-on.d.ts +126 -0
- package/dist/kernel/query/relate/join-reduce.d.ts +16 -0
- package/dist/kernel/query/relate/join.d.ts +452 -0
- package/dist/kernel/query/relate/methods.d.ts +426 -0
- package/dist/kernel/query/relate/partition.d.ts +87 -0
- package/dist/kernel/query/relate/scan-methods.d.ts +163 -0
- package/dist/kernel/query/relate/traverse.d.ts +109 -0
- package/dist/kernel/query/scan-builder.d.ts +79 -176
- package/dist/kernel/query/sort-key.d.ts +52 -0
- package/dist/kernel/tx-write-gate.d.ts +77 -0
- package/dist/kernel/types.d.ts +71 -3
- package/dist/kernel/validation.d.ts +27 -10
- package/dist/kernel/vault.d.ts +9 -4
- package/dist/kernel/via/compose.d.ts +3 -0
- package/dist/kernel/via/index.d.ts +56 -0
- package/dist/kernel/via/pipeline.d.ts +48 -0
- package/dist/{ledger-F33ZVMTK.js → ledger-KZPCMVZY.js} +11 -11
- package/dist/liberate-GRLCZMW4.js +24 -0
- package/dist/link-set-JCMJ7ULP.js +30 -0
- package/dist/{managed-secret-PQYKSR6T.js → managed-secret-S3MQ6SH6.js} +10 -10
- package/dist/materialized-views/index.js +30 -23
- package/dist/{migrate-cek-5ENH64AA.js → migrate-cek-V7GKJZ7O.js} +2 -2
- package/dist/money/index.js +5 -5
- package/dist/noydb-SWQJ3MZS.js +97 -0
- package/dist/overlay-views/index.js +4 -4
- package/dist/periods/index.js +12 -12
- package/dist/pod/index.js +75 -68
- package/dist/{pod-handle-Q736KYON.js → pod-handle-WGDFB4C2.js} +9 -9
- package/dist/policy/index.js +10 -10
- package/dist/port/with/blob-strategy.d.ts +9 -0
- package/dist/port/with/collection-options.d.ts +5 -0
- package/dist/port/with/coverage-strategy.d.ts +83 -0
- package/dist/port/with/service-bus.d.ts +46 -0
- package/dist/port/with/strategies.d.ts +2 -0
- package/dist/portability/index.js +8 -8
- package/dist/{post-register-LNE2FE2A.js → post-register-SLSXIPBV.js} +6 -6
- package/dist/query/all/index.js +31 -0
- package/dist/query/index.js +20 -32
- package/dist/query/live/index.js +21 -0
- package/dist/query/live/index.js.map +1 -0
- package/dist/query/reduce/index.js +33 -0
- package/dist/query/reduce/index.js.map +1 -0
- package/dist/query/relate/index.js +56 -0
- package/dist/query/relate/index.js.map +1 -0
- package/dist/reduce/index.js +72 -18
- package/dist/reduce/index.js.map +1 -1
- package/dist/register-F3OYE7MJ.js +31 -0
- package/dist/registry-CILQFXFK.js +8 -0
- package/dist/registry-XNNYQVKV.js +8 -0
- package/dist/registry-YCDZV3VW.js +35 -0
- package/dist/registry-ZGYS33TE.js +24 -0
- package/dist/request-withdrawal-Z5NC6TXT.js +30 -0
- package/dist/{reveal-67RDQRIN.js → reveal-4BCKPEC2.js} +6 -6
- package/dist/revoke-ZL62WC2D.js +23 -0
- package/dist/satellites/index.js +1 -1
- package/dist/schema-update/index.js +2 -2
- package/dist/sealed-record/index.js +12 -12
- package/dist/search/index.js +11 -5
- package/dist/{seed-G42JYN56.js → seed-4JS2RJ4A.js} +12 -12
- package/dist/sequence/index.js +9 -9
- package/dist/session/index.js +9 -9
- package/dist/shadow/index.js +2 -2
- package/dist/signer-MBZZMXTC.js +24 -0
- package/dist/snapshots/index.js +10 -10
- package/dist/{stale-DDL7WQEZ.js → stale-TJ3DYZMQ.js} +10 -10
- package/dist/storage-SVMKRGCW.js +22 -0
- package/dist/{store-coordination-provider-MEQ2MJQG.js → store-coordination-provider-2O2VUHKW.js} +10 -10
- package/dist/sync/index.js +10 -10
- package/dist/team/index.js +17 -15
- package/dist/tiers/index.js +13 -11
- package/dist/to/index.js +2 -2
- package/dist/transactions/index.js +3 -3
- package/dist/util/index.js +1 -1
- package/dist/vault-head/index.js +8 -8
- package/dist/{verify-KOV2G5D6.js → verify-RVT67IMH.js} +5 -5
- package/dist/via/blob/index.d.ts +1 -0
- package/dist/via/geo/binding.d.ts +31 -0
- package/dist/via/geo/descriptor.d.ts +54 -0
- package/dist/via/geo/geohash.d.ts +95 -0
- package/dist/via/geo/index.d.ts +13 -0
- package/dist/via/geo/where.d.ts +50 -0
- package/dist/via/i18n/core.d.ts +1 -1
- package/dist/via/lookup/registry.d.ts +1 -1
- package/dist/via/lookup/snapshot.d.ts +3 -3
- package/dist/walk-HJ42EISE.js +21 -0
- package/dist/walk-HJ42EISE.js.map +1 -0
- package/dist/with-audit/coverage/accounting.d.ts +112 -0
- package/dist/with-audit/coverage/active.d.ts +29 -0
- package/dist/with-audit/coverage/index.d.ts +61 -0
- package/dist/with-audit/coverage/sketch.d.ts +75 -0
- package/dist/with-audit/periods/periods.d.ts +55 -7
- package/dist/with-audit/periods/reserved-collections.d.ts +3 -0
- package/dist/with-audit/periods/vault-facade.d.ts +17 -0
- package/dist/with-audit/tiers/index.d.ts +51 -0
- package/dist/with-audit/tiers/strategy.d.ts +8 -0
- package/dist/with-cargo/floor.d.ts +2 -2
- package/dist/with-commit/tx/invariants.d.ts +1 -1
- package/dist/with-commit/tx/transaction.d.ts +13 -3
- package/dist/with-formula/materialized-views/dependency-analyzer.d.ts +4 -3
- package/dist/with-formula/materialized-views/emit-memo.d.ts +40 -0
- package/dist/with-formula/materialized-views/executor.d.ts +8 -0
- package/dist/with-formula/materialized-views/index.d.ts +1 -1
- package/dist/with-formula/materialized-views/registry.d.ts +15 -0
- package/dist/with-formula/materialized-views/types.d.ts +106 -14
- package/dist/with-formula/materialized-views/window-stage.d.ts +11 -0
- package/dist/with-formula/overlay-views/types.d.ts +1 -1
- package/dist/with-formula/overlay-views/virtual-collection.d.ts +13 -4
- package/dist/with-lookup/embeddings/chunks.d.ts +79 -0
- package/dist/with-lookup/embeddings/descriptor.d.ts +21 -0
- package/dist/with-lookup/embeddings/index.d.ts +3 -0
- package/dist/with-lookup/embeddings/ivf-flat.d.ts +93 -0
- package/dist/with-lookup/embeddings/vector-index.d.ts +73 -0
- package/dist/with-lookup/embeddings/vector-set.d.ts +94 -1
- package/dist/with-lookup/embeddings/with-vector-index.d.ts +67 -0
- package/dist/with-lookup/indexing/collection-facade.d.ts +85 -2
- package/dist/with-lookup/indexing/compound-indexes.d.ts +129 -0
- package/dist/with-lookup/indexing/eager-indexes.d.ts +170 -1
- package/dist/with-lookup/indexing/index-snapshot.d.ts +62 -0
- package/dist/with-lookup/indexing/lazy-builder.d.ts +33 -0
- package/dist/with-lookup/indexing/persisted-field-indexes.d.ts +104 -0
- package/dist/with-lookup/indexing/persisted-indexes.d.ts +12 -0
- package/dist/with-lookup/indexing/sorted-indexes.d.ts +117 -0
- package/dist/with-lookup/indexing/unique-constraints.d.ts +106 -23
- package/dist/with-lookup/reduce/active.d.ts +2 -24
- package/dist/with-lookup/reduce/group-core.d.ts +43 -0
- package/dist/with-lookup/reduce/groupby.d.ts +195 -36
- package/dist/with-lookup/reduce/incremental-group.d.ts +153 -0
- package/dist/with-lookup/reduce/index.d.ts +26 -5
- package/dist/with-lookup/reduce/reducers.d.ts +255 -1
- package/dist/with-lookup/reduce/reduction.d.ts +44 -13
- package/dist/with-lookup/reduce/strategy.d.ts +43 -3
- package/dist/with-lookup/reduce/window.d.ts +262 -0
- package/dist/with-lookup/search/collection-facade.d.ts +44 -8
- package/dist/with-lookup/search/index-store.d.ts +5 -3
- package/dist/with-lookup/search/index.d.ts +4 -2
- package/dist/with-lookup/search/inverted-index.d.ts +38 -2
- package/dist/with-lookup/search/persisted-index-store.d.ts +5 -2
- package/dist/with-lookup/search/phrase.d.ts +28 -0
- package/dist/with-lookup/search/retrieve-types.d.ts +57 -1
- package/dist/with-lookup/search/serialize.d.ts +29 -3
- package/dist/with-lookup/search/strategy.d.ts +2 -6
- package/dist/with-party/directory/cover/index.d.ts +1 -1
- package/dist/with-party/directory/cover/storage.d.ts +1 -1
- package/dist/with-party/directory/cover/types.d.ts +1 -1
- package/dist/with-party/directory/index.d.ts +1 -1
- package/dist/with-party/directory/types.d.ts +1 -1
- package/dist/with-party/directory/user-envelope/api.d.ts +1 -1
- package/dist/with-party/policy/engine.d.ts +1 -1
- package/dist/with-party/policy/index.d.ts +1 -1
- package/dist/with-party/policy/presets.d.ts +1 -1
- package/dist/with-party/team/authenticators.d.ts +91 -1
- package/dist/with-party/team/index.d.ts +3 -2
- package/dist/with-party/team/keyring.d.ts +13 -6
- package/dist/with-party/team/managed-secret.d.ts +1 -1
- package/dist/with-party/team/noydb-facade.d.ts +12 -3
- package/dist/with-party/team/wrapped-deks.d.ts +4 -4
- package/dist/with-pod/format.d.ts +1 -1
- package/dist/with-pod/pod.d.ts +5 -5
- package/dist/with-shape/blobs/blob-compaction.d.ts +16 -0
- package/dist/with-shape/blobs/blob-set.d.ts +21 -2
- package/dist/with-shape/blobs/legacy-sweep.d.ts +35 -0
- package/dist/with-shape/introspection/describe.d.ts +6 -0
- package/dist/with-shape/introspection/field-meta.d.ts +18 -0
- package/dist/with-shape/introspection/types.d.ts +57 -1
- package/dist/with-shape/links/vault-facade.d.ts +1 -1
- package/dist/with-store/partitioned/index.d.ts +337 -0
- package/dist/with-sync/change-broadcast.d.ts +153 -0
- package/dist/withdraw-accessible-5NZUPAVA.js +27 -0
- package/dist/withdraw-accessible-5NZUPAVA.js.map +1 -0
- package/package.json +37 -10
- package/dist/api-TXFOVOXX.js +0 -19
- package/dist/backup-IJTB4S4M.js.map +0 -1
- package/dist/chunk-2577DKXB.js.map +0 -1
- package/dist/chunk-2C3AQB46.js.map +0 -1
- package/dist/chunk-4GVM6QZA.js.map +0 -1
- package/dist/chunk-5WDXHNSW.js.map +0 -1
- package/dist/chunk-6GOE5PGN.js.map +0 -1
- package/dist/chunk-6X6SEMEE.js.map +0 -1
- package/dist/chunk-77K4PG6P.js.map +0 -1
- package/dist/chunk-7MG2LHO5.js +0 -1616
- package/dist/chunk-7MG2LHO5.js.map +0 -1
- package/dist/chunk-7MG7SJT7.js.map +0 -1
- package/dist/chunk-7O3Y4PPD.js.map +0 -1
- package/dist/chunk-AO42KJO6.js.map +0 -1
- package/dist/chunk-ATL3ZVXT.js +0 -151
- package/dist/chunk-ATL3ZVXT.js.map +0 -1
- package/dist/chunk-BLN54W3L.js.map +0 -1
- package/dist/chunk-BM5TWITZ.js.map +0 -1
- package/dist/chunk-CUZLNGD5.js.map +0 -1
- package/dist/chunk-EQEYOJBM.js.map +0 -1
- package/dist/chunk-G56KBWFY.js.map +0 -1
- package/dist/chunk-I3ISCYT7.js +0 -159
- package/dist/chunk-I3ISCYT7.js.map +0 -1
- package/dist/chunk-KG7TZKZG.js.map +0 -1
- package/dist/chunk-KJIMGIWO.js.map +0 -1
- package/dist/chunk-KTFRCC5C.js.map +0 -1
- package/dist/chunk-KUX3OB6D.js.map +0 -1
- package/dist/chunk-MUM7IANK.js.map +0 -1
- package/dist/chunk-NA2NIJZI.js.map +0 -1
- package/dist/chunk-NSITFOCJ.js +0 -99
- package/dist/chunk-NSITFOCJ.js.map +0 -1
- package/dist/chunk-PT43Y56J.js.map +0 -1
- package/dist/chunk-QIBVIOXO.js.map +0 -1
- package/dist/chunk-RRNRNANG.js.map +0 -1
- package/dist/chunk-RTBJ5IOO.js +0 -87
- package/dist/chunk-RTBJ5IOO.js.map +0 -1
- package/dist/chunk-SKGMN35F.js.map +0 -1
- package/dist/chunk-SL3JAAKN.js.map +0 -1
- package/dist/chunk-SPXXX5E4.js.map +0 -1
- package/dist/chunk-SPYWXKJN.js.map +0 -1
- package/dist/chunk-U4FOQDY4.js.map +0 -1
- package/dist/chunk-UXVWEX5L.js.map +0 -1
- package/dist/chunk-UXWB3FPF.js.map +0 -1
- package/dist/chunk-YMUFFJCO.js.map +0 -1
- package/dist/chunk-ZN4FD4PE.js +0 -364
- package/dist/chunk-ZN4FD4PE.js.map +0 -1
- package/dist/chunk-ZORTV6NH.js.map +0 -1
- package/dist/collection-facade-4GRREZ6C.js +0 -45
- package/dist/derive-6O5SWQKN.js +0 -21
- package/dist/executor-5NIMLSKZ.js +0 -8
- package/dist/executor-AQVXV5GZ.js +0 -8
- package/dist/executor-PUAO6AKJ.js +0 -29
- package/dist/export-accessible-72EQNBMR.js +0 -22
- package/dist/extract-partition-PUYNU3UF.js +0 -37
- package/dist/find-2ABFCZX4.js +0 -10
- package/dist/issue-SIDORTSZ.js +0 -18
- package/dist/json-schema-V3M5MUCM.js.map +0 -1
- package/dist/kernel/query/join.d.ts +0 -232
- package/dist/liberate-LCDPNAG2.js +0 -24
- package/dist/link-set-FKNWAYKS.js +0 -30
- package/dist/noydb-DUXZPKSN.js +0 -90
- package/dist/register-I2DZXGAR.js +0 -31
- package/dist/registry-23WF3TGH.js +0 -8
- package/dist/registry-4AYVUNXK.js +0 -8
- package/dist/registry-VSSQPIGF.js +0 -18
- package/dist/registry-YLEWMGAC.js +0 -32
- package/dist/request-withdrawal-KFQHEZ25.js +0 -30
- package/dist/revoke-DQDZAZZM.js +0 -23
- package/dist/signer-WAMDZHEN.js +0 -24
- package/dist/storage-FLR73HHF.js +0 -22
- package/dist/walk-3UQBRMDV.js +0 -21
- package/dist/withdraw-accessible-EL5GXZBS.js +0 -27
- /package/dist/{api-TXFOVOXX.js.map → api-GVYEKSJE.js.map} +0 -0
- /package/dist/{chunk-BUE2D7PX.js.map → chunk-32YV3TJT.js.map} +0 -0
- /package/dist/{chunk-3RCJJBNR.js.map → chunk-3ELRMVJK.js.map} +0 -0
- /package/dist/{chunk-6GMZ7HEE.js.map → chunk-3F7GLNAE.js.map} +0 -0
- /package/dist/{chunk-2Y4IMKA6.js.map → chunk-3H5KLDZN.js.map} +0 -0
- /package/dist/{chunk-VTFVLCUH.js.map → chunk-3JWHAR6E.js.map} +0 -0
- /package/dist/{chunk-JBDFMYKQ.js.map → chunk-4AF3TUMP.js.map} +0 -0
- /package/dist/{chunk-J6FXAEUG.js.map → chunk-6B3VNR4P.js.map} +0 -0
- /package/dist/{chunk-TUFM4UZP.js.map → chunk-6K7DPM7D.js.map} +0 -0
- /package/dist/{chunk-K6LHRFBL.js.map → chunk-6LMQ5R26.js.map} +0 -0
- /package/dist/{chunk-XLMEZIAJ.js.map → chunk-6OWXYZK2.js.map} +0 -0
- /package/dist/{chunk-BOWNCWZT.js.map → chunk-6QSQQLSE.js.map} +0 -0
- /package/dist/{chunk-NQKIUNW5.js.map → chunk-A6IJU4TK.js.map} +0 -0
- /package/dist/{chunk-QIZPZMUI.js.map → chunk-AOWGXU6D.js.map} +0 -0
- /package/dist/{chunk-SFAWCTEM.js.map → chunk-B57AFBY2.js.map} +0 -0
- /package/dist/{chunk-GPEQUXHL.js.map → chunk-B6SJIBQK.js.map} +0 -0
- /package/dist/{chunk-Q2PU57HC.js.map → chunk-BK2HHQGN.js.map} +0 -0
- /package/dist/{collection-facade-4GRREZ6C.js.map → chunk-BKT776R5.js.map} +0 -0
- /package/dist/{chunk-FXBIP2WD.js.map → chunk-BUDAGWL5.js.map} +0 -0
- /package/dist/{chunk-BOET4NA4.js.map → chunk-CKNGS5MH.js.map} +0 -0
- /package/dist/{chunk-YSRUYAVU.js.map → chunk-DE4DH2RZ.js.map} +0 -0
- /package/dist/{chunk-6I2RQCET.js.map → chunk-DF73H4UN.js.map} +0 -0
- /package/dist/{chunk-K7NTTA6P.js.map → chunk-EOVMT6TB.js.map} +0 -0
- /package/dist/{chunk-XTXOCYOJ.js.map → chunk-FCKWQE2H.js.map} +0 -0
- /package/dist/{chunk-4OZNXTO4.js.map → chunk-FN5EBVTQ.js.map} +0 -0
- /package/dist/{chunk-NKHRDYOR.js.map → chunk-FQ5VRHIB.js.map} +0 -0
- /package/dist/{chunk-FAHMLERK.js.map → chunk-FW22ZCXT.js.map} +0 -0
- /package/dist/{chunk-RMS3NEA3.js.map → chunk-HT2AHGQI.js.map} +0 -0
- /package/dist/{chunk-CHJBLCOG.js.map → chunk-HVSCEIYL.js.map} +0 -0
- /package/dist/{chunk-GY4WYNNG.js.map → chunk-ID6Z6E66.js.map} +0 -0
- /package/dist/{chunk-EYBQEIUY.js.map → chunk-IEX7NK2K.js.map} +0 -0
- /package/dist/{chunk-KUJDV5QH.js.map → chunk-ISZQJBML.js.map} +0 -0
- /package/dist/{chunk-LWBCUYZW.js.map → chunk-IT22PWKV.js.map} +0 -0
- /package/dist/{chunk-7V4TP3AF.js.map → chunk-J6UOHJY5.js.map} +0 -0
- /package/dist/{chunk-JMGDHKQF.js.map → chunk-JCN44NCY.js.map} +0 -0
- /package/dist/{chunk-CARABLSQ.js.map → chunk-K6W7BVZ6.js.map} +0 -0
- /package/dist/{chunk-453F654R.js.map → chunk-L7DOS3TE.js.map} +0 -0
- /package/dist/{chunk-WEQEYLCS.js.map → chunk-LGRLME4M.js.map} +0 -0
- /package/dist/{chunk-RMF67KCG.js.map → chunk-LQ4ZHOKP.js.map} +0 -0
- /package/dist/{chunk-ZVO4QVPD.js.map → chunk-M522UYZ2.js.map} +0 -0
- /package/dist/{chunk-2N4GY74U.js.map → chunk-MTL7MXGR.js.map} +0 -0
- /package/dist/{chunk-TFR7DSOV.js.map → chunk-MVZ2TPVP.js.map} +0 -0
- /package/dist/{chunk-CPWQB3N5.js.map → chunk-N5DNADLQ.js.map} +0 -0
- /package/dist/{chunk-ELNXJMGB.js.map → chunk-NNARWO72.js.map} +0 -0
- /package/dist/{chunk-6YXCPL4T.js.map → chunk-PDCG6PR5.js.map} +0 -0
- /package/dist/{chunk-REDOOY2Q.js.map → chunk-PSIV7CJV.js.map} +0 -0
- /package/dist/{chunk-ANATMFIO.js.map → chunk-QWFHIOD2.js.map} +0 -0
- /package/dist/{chunk-X2DLENDQ.js.map → chunk-QWGU66MP.js.map} +0 -0
- /package/dist/{chunk-BSFNRLK2.js.map → chunk-S57HTZ6X.js.map} +0 -0
- /package/dist/{chunk-SZJ3DLZA.js.map → chunk-SEE332EV.js.map} +0 -0
- /package/dist/{chunk-YYP7WSEB.js.map → chunk-SI3V7D4G.js.map} +0 -0
- /package/dist/{chunk-UGTBXF5U.js.map → chunk-SOIQ4MM4.js.map} +0 -0
- /package/dist/{chunk-VXGSWL6L.js.map → chunk-SYVZW77S.js.map} +0 -0
- /package/dist/{chunk-MVMXZYXT.js.map → chunk-TKUOEU2F.js.map} +0 -0
- /package/dist/{chunk-SMH6SRX7.js.map → chunk-TROR3ALR.js.map} +0 -0
- /package/dist/{chunk-DGOZ4UZD.js.map → chunk-VNNRUGMM.js.map} +0 -0
- /package/dist/{chunk-HDOU6I2Y.js.map → chunk-VNPEWFPD.js.map} +0 -0
- /package/dist/{chunk-L7CIOOBW.js.map → chunk-WNJ4AVGE.js.map} +0 -0
- /package/dist/{chunk-FMZY5Q6L.js.map → chunk-WX5ADGTZ.js.map} +0 -0
- /package/dist/{chunk-Q7HZX3IF.js.map → chunk-X4773RBR.js.map} +0 -0
- /package/dist/{chunk-ANSIZYEG.js.map → chunk-YNIUIERI.js.map} +0 -0
- /package/dist/{chunk-BZ3534YM.js.map → chunk-ZUVBC32X.js.map} +0 -0
- /package/dist/{chunk-L742JPKZ.js.map → chunk-ZXABPVM6.js.map} +0 -0
- /package/dist/{classified-marker-LI2SF2E4.js.map → classified-marker-W3USLL5M.js.map} +0 -0
- /package/dist/{computed-VPOKQK4N.js.map → collection-facade-QU6IJBN3.js.map} +0 -0
- /package/dist/{derive-6O5SWQKN.js.map → computed-TPFBX7U4.js.map} +0 -0
- /package/dist/{dead-filter-TSWZQRR5.js.map → dead-filter-U2UYKSZL.js.map} +0 -0
- /package/dist/{delegation-OVIFFPG4.js.map → delegation-S3AEPW2T.js.map} +0 -0
- /package/dist/{enclave-KJOTOH7X.js.map → derive-OX7F6TGG.js.map} +0 -0
- /package/dist/{dispatch-WC6X2M6C.js.map → dispatch-3CQDJV5Q.js.map} +0 -0
- /package/dist/{dispatch-S73TK3IY.js.map → dispatch-RH4LHKBH.js.map} +0 -0
- /package/dist/{executor-5NIMLSKZ.js.map → enclave-27SMF6GF.js.map} +0 -0
- /package/dist/{executor-AQVXV5GZ.js.map → executor-B6SRO2QS.js.map} +0 -0
- /package/dist/{executor-PUAO6AKJ.js.map → executor-BI5CHWRY.js.map} +0 -0
- /package/dist/{export-accessible-72EQNBMR.js.map → executor-RBKM5W5K.js.map} +0 -0
- /package/dist/{extract-partition-PUYNU3UF.js.map → export-accessible-VMA3YM5V.js.map} +0 -0
- /package/dist/{find-2ABFCZX4.js.map → extract-partition-NF7PXGPP.js.map} +0 -0
- /package/dist/{fanout-sidecar-WUFXNYP4.js.map → fanout-sidecar-OT6RYLOL.js.map} +0 -0
- /package/dist/{issue-SIDORTSZ.js.map → find-LZMP26KF.js.map} +0 -0
- /package/dist/{ledger-F33ZVMTK.js.map → issue-IHARXWW5.js.map} +0 -0
- /package/dist/{liberate-LCDPNAG2.js.map → ledger-KZPCMVZY.js.map} +0 -0
- /package/dist/{link-set-FKNWAYKS.js.map → liberate-GRLCZMW4.js.map} +0 -0
- /package/dist/{managed-secret-PQYKSR6T.js.map → link-set-JCMJ7ULP.js.map} +0 -0
- /package/dist/{noydb-DUXZPKSN.js.map → managed-secret-S3MQ6SH6.js.map} +0 -0
- /package/dist/{migrate-cek-5ENH64AA.js.map → migrate-cek-V7GKJZ7O.js.map} +0 -0
- /package/dist/{register-I2DZXGAR.js.map → noydb-SWQJ3MZS.js.map} +0 -0
- /package/dist/{pod-handle-Q736KYON.js.map → pod-handle-WGDFB4C2.js.map} +0 -0
- /package/dist/{post-register-LNE2FE2A.js.map → post-register-SLSXIPBV.js.map} +0 -0
- /package/dist/{registry-23WF3TGH.js.map → query/all/index.js.map} +0 -0
- /package/dist/{registry-4AYVUNXK.js.map → register-F3OYE7MJ.js.map} +0 -0
- /package/dist/{registry-VSSQPIGF.js.map → registry-CILQFXFK.js.map} +0 -0
- /package/dist/{registry-YLEWMGAC.js.map → registry-XNNYQVKV.js.map} +0 -0
- /package/dist/{request-withdrawal-KFQHEZ25.js.map → registry-YCDZV3VW.js.map} +0 -0
- /package/dist/{revoke-DQDZAZZM.js.map → registry-ZGYS33TE.js.map} +0 -0
- /package/dist/{signer-WAMDZHEN.js.map → request-withdrawal-Z5NC6TXT.js.map} +0 -0
- /package/dist/{reveal-67RDQRIN.js.map → reveal-4BCKPEC2.js.map} +0 -0
- /package/dist/{stale-DDL7WQEZ.js.map → revoke-ZL62WC2D.js.map} +0 -0
- /package/dist/{seed-G42JYN56.js.map → seed-4JS2RJ4A.js.map} +0 -0
- /package/dist/{storage-FLR73HHF.js.map → signer-MBZZMXTC.js.map} +0 -0
- /package/dist/{walk-3UQBRMDV.js.map → stale-TJ3DYZMQ.js.map} +0 -0
- /package/dist/{withdraw-accessible-EL5GXZBS.js.map → storage-SVMKRGCW.js.map} +0 -0
- /package/dist/{store-coordination-provider-MEQ2MJQG.js.map → store-coordination-provider-2O2VUHKW.js.map} +0 -0
- /package/dist/{verify-KOV2G5D6.js.map → verify-RVT67IMH.js.map} +0 -0
|
@@ -1,40 +1,115 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Unique-constraint enforcement.
|
|
3
3
|
*
|
|
4
4
|
* Each `UniqueConstraintSet` holds one or more constraints, each covering
|
|
5
|
-
* an ordered tuple of field names
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* an ordered tuple of field names (a one-field tuple is the ordinary
|
|
6
|
+
* single-field case; a multi-field tuple is a COMPOUND unique — uniqueness
|
|
7
|
+
* over the tuple, never over each component separately). On every `put()`
|
|
8
|
+
* the caller invokes `check()` BEFORE the store write; on success it calls
|
|
9
|
+
* `upsert()` to update the maps. `remove()` is called on `delete()`.
|
|
8
10
|
*
|
|
9
11
|
* Null-distinct semantics: if ANY constrained field is `null` or
|
|
10
12
|
* `undefined` in the record, that record is exempt from the constraint —
|
|
11
|
-
* `
|
|
13
|
+
* `keyOf` returns `null` and the record is silently skipped.
|
|
12
14
|
* This matches standard SQL NULL-distinct behavior.
|
|
13
15
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
+
* ## The three modes, and what each one actually promises (#1358)
|
|
17
|
+
*
|
|
18
|
+
* | mode | promise |
|
|
19
|
+
* |---|---|
|
|
20
|
+
* | eager (default) | PREVENTION, from the in-memory map built at hydration. |
|
|
21
|
+
* | lazy (`prefetch:false`) | PREVENTION, from a point lookup through the persisted `_idx/` mirror — see `checkUniqueOnPut` in `collection-facade.ts`. |
|
|
22
|
+
* | CRDT | **NO prevention.** DETECTION only, reported on `unique:violation`. |
|
|
23
|
+
* | tiered | PREVENTION across every tier whose DEK the writer holds. A tier the writer cannot read is outside the guarantee — see `checkUniqueAcrossTiers` in `with-audit/tiers/index.ts`. |
|
|
24
|
+
*
|
|
25
|
+
* ⚠️ **The CRDT row is a distributed-systems fact, not a missing feature.**
|
|
26
|
+
* Two replicas that are offline from each other can both accept the same
|
|
27
|
+
* "unique" value, and no local check can prevent that — the other replica's
|
|
28
|
+
* write does not exist anywhere this one can read. So a CRDT collection
|
|
29
|
+
* never refuses a duplicate; it keeps both records (as CRDT convergence
|
|
30
|
+
* requires) and reports the collision as a `UniqueConstraintError` on the
|
|
31
|
+
* `unique:violation` event, both when it is created and when a later
|
|
32
|
+
* session first sees the two records together. What is guaranteed is
|
|
33
|
+
* uniqueness within what this writer could see at write time, plus
|
|
34
|
+
* detection when the replicas meet. Do not write anything stronger than
|
|
35
|
+
* that into a doc, a type, or an error message.
|
|
36
|
+
*
|
|
37
|
+
* None of the four modes refuses the DECLARATION any more. Compound unique
|
|
38
|
+
* is supported in all of them (the key is the canonical tuple key in every
|
|
39
|
+
* case), so there is no undefined corner left where a declaration is
|
|
40
|
+
* accepted and quietly does nothing.
|
|
16
41
|
*/
|
|
42
|
+
import { UniqueConstraintError } from '../../kernel/errors.js';
|
|
17
43
|
import type { IndexDef } from './eager-indexes.js';
|
|
44
|
+
/**
|
|
45
|
+
* What this collection's write paths are allowed to promise.
|
|
46
|
+
*
|
|
47
|
+
* `'prevent'` — a colliding write throws `UniqueConstraintError` before it
|
|
48
|
+
* lands (eager, lazy and tiered collections).
|
|
49
|
+
* `'detect'` — a colliding write LANDS and is reported afterwards (CRDT).
|
|
50
|
+
* See the module doc for why CRDT cannot be `'prevent'`.
|
|
51
|
+
*/
|
|
52
|
+
export type UniqueEnforcement = 'prevent' | 'detect';
|
|
53
|
+
/** How a detected-but-not-prevented collision is reported to the consumer. */
|
|
54
|
+
export type UniqueViolationReporter = (error: UniqueConstraintError) => void;
|
|
18
55
|
export declare class UniqueConstraintSet {
|
|
19
56
|
private readonly collectionName;
|
|
57
|
+
/** See {@link UniqueEnforcement}. Defaults to prevention. */
|
|
58
|
+
readonly enforcement: UniqueEnforcement;
|
|
59
|
+
/** Fired for every collision this set observes but does NOT prevent. */
|
|
60
|
+
private readonly report;
|
|
20
61
|
private readonly constraints;
|
|
21
|
-
constructor(collectionName: string, uniqueDefs: readonly (readonly string[])[]
|
|
62
|
+
constructor(collectionName: string, uniqueDefs: readonly (readonly string[])[],
|
|
63
|
+
/** See {@link UniqueEnforcement}. Defaults to prevention. */
|
|
64
|
+
enforcement?: UniqueEnforcement,
|
|
65
|
+
/** Fired for every collision this set observes but does NOT prevent. */
|
|
66
|
+
report?: UniqueViolationReporter);
|
|
22
67
|
get size(): number;
|
|
68
|
+
/** The declared field tuples, in declaration order. */
|
|
69
|
+
fieldTuples(): readonly (readonly string[])[];
|
|
23
70
|
/**
|
|
24
71
|
* Compute the canonical key for a record under a given constraint.
|
|
25
72
|
* Returns `null` if any constrained field is `null` or `undefined`
|
|
26
73
|
* (the record is exempt — no constraint is checked).
|
|
74
|
+
*
|
|
75
|
+
* Public because the tier scan (`with-audit/tiers/index.ts`) has to compute
|
|
76
|
+
* the same key for a record it decrypted under a tier DEK, which this class
|
|
77
|
+
* cannot reach — one key function, so the two paths cannot drift.
|
|
27
78
|
*/
|
|
28
|
-
|
|
79
|
+
keyOf(fields: readonly string[], record: unknown): string | null;
|
|
80
|
+
/**
|
|
81
|
+
* Every constraint key `record` would occupy — the probe a checker outside
|
|
82
|
+
* this class (tiers, lazy) compares against its own candidates. Exempt
|
|
83
|
+
* (null-distinct) constraints are omitted, so an empty result means "this
|
|
84
|
+
* record is unconstrained" and the caller can skip its scan entirely.
|
|
85
|
+
*/
|
|
86
|
+
probe(record: unknown): ReadonlyArray<{
|
|
87
|
+
readonly fields: readonly string[];
|
|
88
|
+
readonly key: string;
|
|
89
|
+
}>;
|
|
29
90
|
/**
|
|
30
91
|
* Throw `UniqueConstraintError` if writing `id` with `record` would
|
|
31
92
|
* collide with a DIFFERENT existing record. Call BEFORE the store write.
|
|
93
|
+
*
|
|
94
|
+
* In `'detect'` mode this is a deliberate NO-OP: a CRDT collection must
|
|
95
|
+
* not refuse a write it has no authority to refuse (module doc). The
|
|
96
|
+
* collision is reported from {@link upsert} / {@link build} instead.
|
|
32
97
|
*/
|
|
33
98
|
check(id: string, record: unknown): void;
|
|
99
|
+
/**
|
|
100
|
+
* The `UniqueConstraintError` a write of `id`/`record` would produce, or
|
|
101
|
+
* `null`. Never throws — the shared core of {@link check} (which throws it)
|
|
102
|
+
* and the detect path (which reports it).
|
|
103
|
+
*/
|
|
104
|
+
collision(id: string, record: unknown): UniqueConstraintError | null;
|
|
34
105
|
/**
|
|
35
106
|
* Update the constraint maps after a successful write.
|
|
36
107
|
* Pass `previous` when updating an existing record (so the old key
|
|
37
108
|
* is removed first). Pass `null` or `undefined` for a fresh insert.
|
|
109
|
+
*
|
|
110
|
+
* In `'detect'` mode a collision observed here is REPORTED and the write
|
|
111
|
+
* still stands (both records are kept — see the module doc). In
|
|
112
|
+
* `'prevent'` mode `check()` already ran, so there is nothing to report.
|
|
38
113
|
*/
|
|
39
114
|
upsert(id: string, record: unknown, previous?: unknown): void;
|
|
40
115
|
/**
|
|
@@ -46,13 +121,18 @@ export declare class UniqueConstraintSet {
|
|
|
46
121
|
* Rebuild all constraint maps from a full snapshot.
|
|
47
122
|
* Called after hydration (ensureHydrated / hydrateFromSnapshot).
|
|
48
123
|
*
|
|
49
|
-
* **
|
|
50
|
-
* for duplicates. If the store already contains two
|
|
51
|
-
* constrained value (written before the unique index was
|
|
52
|
-
* last one processed wins the map slot and the duplicate is
|
|
53
|
-
* displaced — no error is thrown, and the earlier holder is
|
|
54
|
-
* the map. Callers retrofitting a unique index onto populated
|
|
55
|
-
* run a one-time uniqueness scan before relying on enforcement.
|
|
124
|
+
* **In `'prevent'` mode this is last-writer-wins**: it does NOT validate
|
|
125
|
+
* pre-existing data for duplicates. If the store already contains two
|
|
126
|
+
* records sharing a constrained value (written before the unique index was
|
|
127
|
+
* declared), the last one processed wins the map slot and the duplicate is
|
|
128
|
+
* silently displaced — no error is thrown, and the earlier holder is
|
|
129
|
+
* evicted from the map. Callers retrofitting a unique index onto populated
|
|
130
|
+
* data should run a one-time uniqueness scan before relying on enforcement.
|
|
131
|
+
*
|
|
132
|
+
* **In `'detect'` mode this is the MERGE POINT** — the moment a session
|
|
133
|
+
* that wrote neither record first sees them together (a CRDT replica
|
|
134
|
+
* opening a store its peer has written to). Every displaced holder is
|
|
135
|
+
* reported on `unique:violation` instead of being dropped in silence.
|
|
56
136
|
*/
|
|
57
137
|
build(entries: Iterable<readonly [string, unknown]>): void;
|
|
58
138
|
}
|
|
@@ -60,15 +140,18 @@ export declare class UniqueConstraintSet {
|
|
|
60
140
|
* Build the `UniqueConstraintSet` for a collection from its `IndexDef[]`,
|
|
61
141
|
* or return `null` when no `unique: true` index is declared.
|
|
62
142
|
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
143
|
+
* `mode` selects the enforcement the collection's write paths can actually
|
|
144
|
+
* deliver (see the module doc's table). Nothing is refused here any more:
|
|
145
|
+
* before #1358 lazy, CRDT and tiered collections threw
|
|
146
|
+
* `UnsupportedIndexOptionError` at registration because their write paths
|
|
147
|
+
* bypassed `check()`/`upsert()`. Lazy and tiered now have real enforcement
|
|
148
|
+
* wired to those paths, and CRDT has honest detection.
|
|
149
|
+
*
|
|
150
|
+
* Kept out of the Collection constructor to keep that always-on kernel file
|
|
151
|
+
* lean (kernel-surface invariant).
|
|
69
152
|
*/
|
|
70
153
|
export declare function buildUniqueConstraintSet(collectionName: string, indexes: readonly IndexDef[] | undefined, mode: {
|
|
71
154
|
readonly lazy: boolean;
|
|
72
155
|
readonly crdt: boolean;
|
|
73
156
|
readonly tiered: boolean;
|
|
74
|
-
}): UniqueConstraintSet | null;
|
|
157
|
+
}, report?: UniqueViolationReporter): UniqueConstraintSet | null;
|
|
@@ -7,27 +7,5 @@
|
|
|
7
7
|
* subpath — a consumer that never imports the subpath ships none of
|
|
8
8
|
* this (ESM tree-shaking + hub's `"sideEffects": false`).
|
|
9
9
|
*/
|
|
10
|
-
import type { ReduceStrategy } from './strategy.js';
|
|
11
|
-
|
|
12
|
-
* Build the default aggregate strategy. Pass into
|
|
13
|
-
* `createNoydb({ reduceStrategy: withReduce() })` to light up
|
|
14
|
-
* `.aggregate()` and `.groupBy()` on `Query` and `ScanBuilder`.
|
|
15
|
-
*
|
|
16
|
-
* @example
|
|
17
|
-
* ```ts
|
|
18
|
-
* import { createNoydb } from '@noy-db/hub'
|
|
19
|
-
* import { withReduce, sum, count } from '@noy-db/hub/reduce'
|
|
20
|
-
*
|
|
21
|
-
* const db = await createNoydb({
|
|
22
|
-
* store, user, secret,
|
|
23
|
-
* reduceStrategy: withReduce(),
|
|
24
|
-
* })
|
|
25
|
-
*
|
|
26
|
-
* const totals = invoices.query()
|
|
27
|
-
* .where('status', '==', 'paid')
|
|
28
|
-
* .groupBy('clientId')
|
|
29
|
-
* .aggregate({ amount: sum('amount'), n: count() })
|
|
30
|
-
* .run()
|
|
31
|
-
* ```
|
|
32
|
-
*/
|
|
33
|
-
export declare function withReduce(): ReduceStrategy;
|
|
10
|
+
import type { ReduceOptions, ReduceStrategy } from './strategy.js';
|
|
11
|
+
export declare function withReduce(opts?: ReduceOptions): ReduceStrategy;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The parts of `.groupBy()` that BOTH the eager pipeline and the incremental
|
|
3
|
+
* one need — the cardinality guards and the per-bucket fold.
|
|
4
|
+
*
|
|
5
|
+
* ⭐ It exists for one reason: `groupby.ts` (eager) and `incremental-group.ts`
|
|
6
|
+
* (delta-maintained) must produce byte-identical rows, and the cheapest way to
|
|
7
|
+
* guarantee that is for them to share the CODE rather than agree by
|
|
8
|
+
* convention. Putting it here also breaks what would otherwise be an import
|
|
9
|
+
* cycle between those two files.
|
|
10
|
+
*
|
|
11
|
+
* @internal — `groupby.ts` re-exports the public names, so the module graph
|
|
12
|
+
* below this file is invisible to consumers.
|
|
13
|
+
*/
|
|
14
|
+
import type { ReduceSpec } from './reduction.js';
|
|
15
|
+
/**
|
|
16
|
+
* Cardinality thresholds for `.groupBy()`. The warn threshold gives
|
|
17
|
+
* consumers a heads-up before the hard error; the cap is a fixed
|
|
18
|
+
* constant (not overridable). A `{ maxGroups }` override
|
|
19
|
+
* can be added later without a break if a real consumer asks.
|
|
20
|
+
*/
|
|
21
|
+
export declare const GROUPBY_WARN_CARDINALITY = 10000;
|
|
22
|
+
export declare const GROUPBY_MAX_CARDINALITY = 100000;
|
|
23
|
+
export declare function warnCardinalityApproaching(fields: readonly string[], observed: number): void;
|
|
24
|
+
/**
|
|
25
|
+
* Test-only: clear the per-field cardinality warning dedup between
|
|
26
|
+
* tests. Production code never calls this — matching the
|
|
27
|
+
* `resetJoinWarnings` pattern in `join.ts`.
|
|
28
|
+
*/
|
|
29
|
+
export declare function resetGroupByWarnings(): void;
|
|
30
|
+
/** The label a cardinality error names — `"k"` single-key, `[a, b]` multi. */
|
|
31
|
+
export declare function groupFieldLabel(fields: readonly string[]): string;
|
|
32
|
+
/**
|
|
33
|
+
* Reduce ONE bucket into its output row: the group keys stamped first in
|
|
34
|
+
* declaration order, then every reducer's finalized value.
|
|
35
|
+
*
|
|
36
|
+
* ⭐ The single definition of a grouped row. `groupAndReduce` calls it once per
|
|
37
|
+
* bucket over the whole record set; the incremental maintainer calls it for
|
|
38
|
+
* the buckets a delta touched and reuses the cached row for the rest. Because
|
|
39
|
+
* the fold is `init → step* → finalize` over the SAME records in the SAME
|
|
40
|
+
* order, an incrementally produced row is not merely equal to a re-run's — it
|
|
41
|
+
* is the identical computation.
|
|
42
|
+
*/
|
|
43
|
+
export declare function reduceGroupRow<R>(fields: readonly string[], keyValues: Record<string, unknown>, records: readonly unknown[], spec: ReduceSpec, reducerKeys: readonly string[]): R;
|
|
@@ -37,11 +37,13 @@
|
|
|
37
37
|
* bucket from that. Consumers who want them merged can coalesce
|
|
38
38
|
* upstream with `.filter()`.
|
|
39
39
|
*
|
|
40
|
-
* **Live mode:** `.groupBy().aggregate().live()`
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
* re-
|
|
40
|
+
* **Live mode:** `.groupBy().aggregate().live()` maintains its buckets
|
|
41
|
+
* incrementally (#1341, grouped half). A change event patches the match set
|
|
42
|
+
* and then re-folds only the one or two buckets it touched; every other bucket
|
|
43
|
+
* serves the row it already computed. See `incremental-group.ts` — including
|
|
44
|
+
* why reducer states are re-folded rather than inverted through the protocol's
|
|
45
|
+
* `remove()` hook. A plan `canMaintainIncrementally()` refuses, and any
|
|
46
|
+
* notification arriving without a delta, still re-runs the whole pipeline.
|
|
45
47
|
*
|
|
46
48
|
* **Type-level stable-key narrowing:** when
|
|
47
49
|
* `dictKey` lands, `groupBy<DictField>()` will narrow the group key
|
|
@@ -60,23 +62,18 @@
|
|
|
60
62
|
*/
|
|
61
63
|
import type { ReduceSpec, ReduceResult, ReductionUpstream, LiveReduction } from './reduction.js';
|
|
62
64
|
import type { ReducerBuilder } from './reducers.js';
|
|
65
|
+
import type { GroupMaintenanceStats } from './incremental-group.js';
|
|
66
|
+
import type { GroupMaintenanceSource } from '../../kernel/query/live/incremental.js';
|
|
63
67
|
import type { MoneyDescriptor } from '../../via/money/descriptor.js';
|
|
64
68
|
import type { ViaPipeline } from '../../kernel/via/pipeline.js';
|
|
65
69
|
import { type I18nTextDescriptor } from '../../via/i18n/core.js';
|
|
66
70
|
/**
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
+
* The cardinality guards and the warning-reset hook live in `group-core.ts`
|
|
72
|
+
* — shared verbatim with the incremental maintainer so the eager and
|
|
73
|
+
* delta-maintained paths cannot enforce different caps — and are re-exported
|
|
74
|
+
* here so every existing import site is unchanged.
|
|
71
75
|
*/
|
|
72
|
-
export
|
|
73
|
-
export declare const GROUPBY_MAX_CARDINALITY = 100000;
|
|
74
|
-
/**
|
|
75
|
-
* Test-only: clear the per-field cardinality warning dedup between
|
|
76
|
-
* tests. Production code never calls this — matching the
|
|
77
|
-
* `resetJoinWarnings` pattern in `join.ts`.
|
|
78
|
-
*/
|
|
79
|
-
export declare function resetGroupByWarnings(): void;
|
|
76
|
+
export { GROUPBY_WARN_CARDINALITY, GROUPBY_MAX_CARDINALITY, resetGroupByWarnings, } from './group-core.js';
|
|
80
77
|
/**
|
|
81
78
|
* Result row shape for a grouped reduction. Each row carries the
|
|
82
79
|
* group key value under the grouping field name plus every reducer
|
|
@@ -130,6 +127,12 @@ declare abstract class GroupedQueryBase {
|
|
|
130
127
|
* BigInt reducers when `.aggregate(spec)` is terminated.
|
|
131
128
|
*/
|
|
132
129
|
protected readonly via?: ViaPipeline | undefined;
|
|
130
|
+
/**
|
|
131
|
+
* The #1341 delta-maintenance seam, supplied by `Query.groupBy()` when the
|
|
132
|
+
* plan admits incremental maintenance and withheld when it does not.
|
|
133
|
+
* `undefined` is the pre-#1341 behaviour: `.live()` re-runs in full.
|
|
134
|
+
*/
|
|
135
|
+
protected readonly maintenance?: GroupMaintenanceSource | undefined;
|
|
133
136
|
/**
|
|
134
137
|
* Field set this grouped query buckets on. Stored in declaration
|
|
135
138
|
* order — the same order is preserved on every result row by
|
|
@@ -150,7 +153,13 @@ declare abstract class GroupedQueryBase {
|
|
|
150
153
|
* `sum`/`min`/`max` over Via-covered fields (e.g. money) into exact
|
|
151
154
|
* BigInt reducers when `.aggregate(spec)` is terminated.
|
|
152
155
|
*/
|
|
153
|
-
via?: ViaPipeline | undefined
|
|
156
|
+
via?: ViaPipeline | undefined,
|
|
157
|
+
/**
|
|
158
|
+
* The #1341 delta-maintenance seam, supplied by `Query.groupBy()` when the
|
|
159
|
+
* plan admits incremental maintenance and withheld when it does not.
|
|
160
|
+
* `undefined` is the pre-#1341 behaviour: `.live()` re-runs in full.
|
|
161
|
+
*/
|
|
162
|
+
maintenance?: GroupMaintenanceSource | undefined);
|
|
154
163
|
/** Apply Via-aware reducer rewriting (e.g. money) when the source declares one. */
|
|
155
164
|
protected wrapSpec<Spec extends ReduceSpec>(spec: Spec): Spec;
|
|
156
165
|
}
|
|
@@ -159,10 +168,13 @@ declare abstract class GroupedQueryBase {
|
|
|
159
168
|
* with `.aggregate(spec)` which returns a `GroupedReduction`.
|
|
160
169
|
*
|
|
161
170
|
* Kept minimal — the only operation on a grouped query is
|
|
162
|
-
* reduction. Ordering, limiting
|
|
163
|
-
*
|
|
164
|
-
*
|
|
165
|
-
* `
|
|
171
|
+
* reduction. Ordering, limiting and further filtering of the
|
|
172
|
+
* REDUCED rows live one step further along the chain, on the
|
|
173
|
+
* `GroupedReduction` that `.aggregate()` returns (`.having()`,
|
|
174
|
+
* `.orderBy()`, `.limit()` — #1336); ordering and limiting of the
|
|
175
|
+
* SOURCE RECORDS stays on the underlying `Query`, before
|
|
176
|
+
* `.groupBy()`. The two are different operations and neither
|
|
177
|
+
* substitutes for the other.
|
|
166
178
|
*/
|
|
167
179
|
export declare class GroupedQuery<T, F extends string, S extends keyof T = never, M extends keyof T & string = never> extends GroupedQueryBase {
|
|
168
180
|
/**
|
|
@@ -202,6 +214,45 @@ export declare class GroupedQueryN<T, F extends readonly string[], S extends key
|
|
|
202
214
|
* the full partition to materialize before the error fires.
|
|
203
215
|
*/
|
|
204
216
|
export declare function groupAndReduce<R>(records: readonly unknown[], fieldOrFields: string | readonly string[], spec: ReduceSpec, moneyFields?: Record<string, MoneyDescriptor>): R[];
|
|
217
|
+
/**
|
|
218
|
+
* The post-group stage (#1336): `having` predicates, an ordering spec over the
|
|
219
|
+
* reduced rows, and a row cap. Immutable — every builder method returns a new
|
|
220
|
+
* `GroupedReduction` carrying a new `PostGroup`.
|
|
221
|
+
*
|
|
222
|
+
* @internal — not exported; `GroupedReduction`'s public signatures name only
|
|
223
|
+
* inline function/union types, so no consumer needs this shape.
|
|
224
|
+
*/
|
|
225
|
+
interface PostGroup {
|
|
226
|
+
readonly having: readonly ((row: unknown) => boolean)[];
|
|
227
|
+
readonly orderBy: readonly {
|
|
228
|
+
readonly key: string;
|
|
229
|
+
readonly direction: 'asc' | 'desc';
|
|
230
|
+
}[];
|
|
231
|
+
readonly limit: number | undefined;
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Compare two REDUCED values for post-group ordering.
|
|
235
|
+
*
|
|
236
|
+
* Deliberately NOT the row-pipeline comparator in `kernel/query/builder.ts`,
|
|
237
|
+
* and one rule apart from it: when both sides are strings that are plain
|
|
238
|
+
* decimal numerals, they compare by MAGNITUDE. That rule exists for exactly
|
|
239
|
+
* one reason — a money `sum` finalizes to an exact decimal string, and lexical
|
|
240
|
+
* order gets it wrong in the ordinary case (`'9882.00' > '10004.00'`). The
|
|
241
|
+
* pre-group path solves the same problem by asking the Via pipeline
|
|
242
|
+
* (`compareForOrder`), which cannot serve here: it reads the STORED
|
|
243
|
+
* scaled-integer form, and a reduced value is already decoded to decimal.
|
|
244
|
+
*
|
|
245
|
+
* The divergence is confined to a surface introduced by #1336 — no pre-group
|
|
246
|
+
* ordering changes — and it only reaches values that are numerals end to end,
|
|
247
|
+
* so a group key like `'c1'` still sorts lexically.
|
|
248
|
+
* ⭐ SHARED, not private: `.window()`'s in-partition ordering (#1349) faces the
|
|
249
|
+
* identical exposure over the identical values — its rows are decoded, so a
|
|
250
|
+
* money field is a decimal string there too — and imports this rather than
|
|
251
|
+
* growing a second rule that could drift from it.
|
|
252
|
+
*
|
|
253
|
+
* @internal
|
|
254
|
+
*/
|
|
255
|
+
export declare function compareReduced(a: unknown, b: unknown): number;
|
|
205
256
|
/**
|
|
206
257
|
* Grouped reduction wrapper — the `.groupBy(field).aggregate(spec)`
|
|
207
258
|
* terminal. Shape mirrors `Reduction<R>` from aggregate.ts: two
|
|
@@ -211,7 +262,39 @@ export declare function groupAndReduce<R>(records: readonly unknown[], fieldOrFi
|
|
|
211
262
|
* The generic `R` is the per-row result shape (i.e. a single
|
|
212
263
|
* grouped row), and the terminals return `R[]` — one row per
|
|
213
264
|
* bucket.
|
|
265
|
+
*
|
|
266
|
+
* `.having()` / `.orderBy()` / `.limit()` (#1336) post-process that array.
|
|
267
|
+
* ⛔ **They do not appear in `Query.explain()` (#1348), and that is not an
|
|
268
|
+
* omission.** `explain()` is a terminal on `Query`; `.groupBy()` leaves
|
|
269
|
+
* `Query` for `GroupedQuery` and then `GroupedReduction`, so by the time these
|
|
270
|
+
* three are reachable there is no `explain()` in the chain to add a node to.
|
|
271
|
+
* Adding one would mean putting `explain()` on `GroupedReduction` — a new
|
|
272
|
+
* surface, and a plan for a stage with nothing to choose: `having`/`orderBy`/
|
|
273
|
+
* `limit` here have exactly one dispatch (a filter, a stable sort, a slice)
|
|
274
|
+
* over rows already in memory. File an issue if a real consumer wants it.
|
|
275
|
+
* ⚠️ They are POST-processing, never a memory optimization: the group pass has
|
|
276
|
+
* already built and reduced every bucket by the time a `having` predicate is
|
|
277
|
+
* called, so `GROUPBY_WARN_CARDINALITY` / `GROUPBY_MAX_CARDINALITY` see the
|
|
278
|
+
* UNFILTERED bucket count and `having` cannot buy headroom under them. Narrow
|
|
279
|
+
* with `.where()` before `.groupBy()` for that.
|
|
214
280
|
*/
|
|
281
|
+
/**
|
|
282
|
+
* What `GroupedReduction.live()` returns: a `LiveReduction` plus one window
|
|
283
|
+
* onto how it is being kept up to date (#1341).
|
|
284
|
+
*/
|
|
285
|
+
export interface LiveGroupedReduction<R> extends LiveReduction<R> {
|
|
286
|
+
/**
|
|
287
|
+
* Delta-maintenance counters for this live reduction, or `undefined` when
|
|
288
|
+
* the plan was refused and every change re-runs the whole grouping.
|
|
289
|
+
*
|
|
290
|
+
* `patches` counts change events folded in per group; `rebuilds` counts
|
|
291
|
+
* falls back to a full bucket rebuild. A live reduction that reports a
|
|
292
|
+
* maintainer but never patches is a live reduction whose fallback is
|
|
293
|
+
* swallowing everything — which is exactly the failure this exists to make
|
|
294
|
+
* visible.
|
|
295
|
+
*/
|
|
296
|
+
maintenanceStats(): GroupMaintenanceStats | undefined;
|
|
297
|
+
}
|
|
215
298
|
export declare class GroupedReduction<R> {
|
|
216
299
|
private readonly executeRecords;
|
|
217
300
|
private readonly spec;
|
|
@@ -221,13 +304,79 @@ export declare class GroupedReduction<R> {
|
|
|
221
304
|
*. Present when the grouping field is a dictKey.
|
|
222
305
|
*/
|
|
223
306
|
private readonly dictLabelResolver?;
|
|
307
|
+
/**
|
|
308
|
+
* The post-group stage (#1336). Optional and defaulted so every existing
|
|
309
|
+
* construction site — `GroupedQuery.aggregate()`, `GroupedQueryN`, the MV
|
|
310
|
+
* executor — is unchanged.
|
|
311
|
+
*/
|
|
312
|
+
private readonly post;
|
|
313
|
+
/**
|
|
314
|
+
* The #1341 delta-maintenance seam (see `GroupedQueryBase`). Present only
|
|
315
|
+
* for a plan `canMaintainIncrementally()` admits.
|
|
316
|
+
*/
|
|
317
|
+
private readonly maintenance?;
|
|
224
318
|
private readonly fields;
|
|
225
319
|
constructor(executeRecords: () => readonly unknown[], fields: string | readonly string[], spec: ReduceSpec, upstreams: readonly ReductionUpstream[],
|
|
226
320
|
/**
|
|
227
321
|
* Optional dict label resolver for `<field>Label` projection
|
|
228
322
|
*. Present when the grouping field is a dictKey.
|
|
229
323
|
*/
|
|
230
|
-
dictLabelResolver?: ((key: string, locale: string, fallback?: string | readonly string[]) => Promise<string | undefined>) | undefined
|
|
324
|
+
dictLabelResolver?: ((key: string, locale: string, fallback?: string | readonly string[]) => Promise<string | undefined>) | undefined,
|
|
325
|
+
/**
|
|
326
|
+
* The post-group stage (#1336). Optional and defaulted so every existing
|
|
327
|
+
* construction site — `GroupedQuery.aggregate()`, `GroupedQueryN`, the MV
|
|
328
|
+
* executor — is unchanged.
|
|
329
|
+
*/
|
|
330
|
+
post?: PostGroup,
|
|
331
|
+
/**
|
|
332
|
+
* The #1341 delta-maintenance seam (see `GroupedQueryBase`). Present only
|
|
333
|
+
* for a plan `canMaintainIncrementally()` admits.
|
|
334
|
+
*/
|
|
335
|
+
maintenance?: GroupMaintenanceSource | undefined);
|
|
336
|
+
/** Clone with a replaced post-group stage. */
|
|
337
|
+
private withPost;
|
|
338
|
+
/**
|
|
339
|
+
* Keep only the reduced rows a predicate accepts — SQL's `HAVING` (#1336).
|
|
340
|
+
*
|
|
341
|
+
* ```ts
|
|
342
|
+
* invoices.query()
|
|
343
|
+
* .groupBy('clientId')
|
|
344
|
+
* .aggregate({ total: sum('amount') })
|
|
345
|
+
* .having(r => (r.total as number) > 10_000)
|
|
346
|
+
* .orderBy('total', 'desc')
|
|
347
|
+
* .limit(20)
|
|
348
|
+
* .run()
|
|
349
|
+
* ```
|
|
350
|
+
*
|
|
351
|
+
* The predicate sees the WHOLE reduced row — group keys (including a
|
|
352
|
+
* `dateTrunc()`-derived one) and reducer outputs alike — with each value in
|
|
353
|
+
* its exact reduced form: a money `sum` arrives as its canonical decimal
|
|
354
|
+
* string (`'10004.00'`), never as a locale-formatted label, so comparing on
|
|
355
|
+
* it is exact. Successive calls AND.
|
|
356
|
+
*
|
|
357
|
+
* ⚠️ Not a memory optimization. See the class docs — the buckets exist
|
|
358
|
+
* already; `having` only decides what is returned.
|
|
359
|
+
*/
|
|
360
|
+
having(predicate: (row: R) => boolean): GroupedReduction<R>;
|
|
361
|
+
/**
|
|
362
|
+
* Order the REDUCED rows by one of their keys (#1336). Successive calls are
|
|
363
|
+
* tie-breakers; the sort is stable, so bucket first-seen order breaks a
|
|
364
|
+
* final tie.
|
|
365
|
+
*
|
|
366
|
+
* ⭐ Distinguished from `Query.orderBy()` by POSITION, not by name: this one
|
|
367
|
+
* exists only after `.aggregate()` and sorts result rows by a reduced key or
|
|
368
|
+
* a group key; `Query.orderBy()` exists only before `.groupBy()` and sorts
|
|
369
|
+
* SOURCE RECORDS, which (via `.limit()`) changes which records are grouped
|
|
370
|
+
* at all. Both may appear in one chain and they do not interfere.
|
|
371
|
+
*/
|
|
372
|
+
orderBy(key: string, direction?: 'asc' | 'desc'): GroupedReduction<R>;
|
|
373
|
+
/**
|
|
374
|
+
* Cap the number of reduced rows returned (#1336) — applied AFTER `having`
|
|
375
|
+
* and `orderBy`, so `.orderBy('total', 'desc').limit(20)` is a top-20.
|
|
376
|
+
*
|
|
377
|
+
* A later call replaces an earlier one.
|
|
378
|
+
*/
|
|
379
|
+
limit(n: number): GroupedReduction<R>;
|
|
231
380
|
/**
|
|
232
381
|
* Execute the query, group, reduce, and return an array of rows.
|
|
233
382
|
*
|
|
@@ -260,21 +409,31 @@ export declare class GroupedReduction<R> {
|
|
|
260
409
|
fallback?: string | readonly string[];
|
|
261
410
|
}): Promise<R[]>;
|
|
262
411
|
/**
|
|
263
|
-
* Build a reactive `LiveReduction<R[]>` that
|
|
264
|
-
*
|
|
265
|
-
*
|
|
266
|
-
*
|
|
267
|
-
*
|
|
268
|
-
*
|
|
412
|
+
* Build a reactive `LiveReduction<R[]>` that updates whenever any upstream
|
|
413
|
+
* source notifies of a change. Same error-isolation and idempotent-stop
|
|
414
|
+
* contract as `Reduction.live()` — the implementation delegates to the same
|
|
415
|
+
* `LiveAggregationImpl` class by threading a fresh recompute closure through
|
|
416
|
+
* the existing constructor.
|
|
417
|
+
*
|
|
418
|
+
* **Incremental per-group maintenance (#1341, grouped half).** When
|
|
419
|
+
* `Query.groupBy()` supplied a maintenance seam — a plan
|
|
420
|
+
* `canMaintainIncrementally()` admits, over a source that can hand back a
|
|
421
|
+
* snapshot and an id lookup — a change no longer re-runs the pipeline. The
|
|
422
|
+
* delta patches the match set, then patches the ONE OR TWO buckets it
|
|
423
|
+
* touches; every other bucket serves the row it already computed. See
|
|
424
|
+
* `incremental-group.ts` for the correctness argument, including the three
|
|
425
|
+
* membership transitions (a record changing group, a group emptying, a group
|
|
426
|
+
* appearing) that a naive per-group patch gets wrong.
|
|
427
|
+
*
|
|
428
|
+
* Every other plan, and every notification that arrives without a delta,
|
|
429
|
+
* re-runs the whole grouping exactly as before. Either way the emitted rows
|
|
430
|
+
* are identical to `.run()`'s.
|
|
269
431
|
*
|
|
270
|
-
*
|
|
271
|
-
*
|
|
272
|
-
*
|
|
273
|
-
* optimization — the reducer protocol admits it, but wiring
|
|
274
|
-
* delta-aware source subscriptions is a separate PR.
|
|
432
|
+
* ⚠️ `.run()` is deliberately NOT served from the maintained state: it is a
|
|
433
|
+
* one-shot terminal that may be called long after a `.live()` was stopped,
|
|
434
|
+
* and reading the snapshot is the only answer that cannot be stale.
|
|
275
435
|
*
|
|
276
436
|
* Always call `live.stop()` when finished.
|
|
277
437
|
*/
|
|
278
|
-
live():
|
|
438
|
+
live(): LiveGroupedReduction<R[]>;
|
|
279
439
|
}
|
|
280
|
-
export {};
|