@minnowdb/core 0.6.9 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/dist/block-format/block.js +254 -325
  2. package/dist/block-format/checksum.js +30 -52
  3. package/dist/block-format/codecs.js +112 -125
  4. package/dist/block-format/column.js +187 -205
  5. package/dist/block-format/index.js +5 -1
  6. package/dist/block-format/physical.js +371 -387
  7. package/dist/block-format/types.js +4 -1
  8. package/dist/block-format/unicode.js +30 -39
  9. package/dist/date-value.d.ts +5 -0
  10. package/dist/date-value.js +71 -41
  11. package/dist/engine/artifact-cache.js +106 -116
  12. package/dist/engine/batch.js +36 -44
  13. package/dist/engine/buffered-writer.js +156 -158
  14. package/dist/engine/byte-estimates.js +20 -22
  15. package/dist/engine/cache-limits.js +24 -25
  16. package/dist/engine/cancellation.js +5 -3
  17. package/dist/engine/catalog.js +64 -73
  18. package/dist/engine/client.js +715 -780
  19. package/dist/engine/database.js +15952 -18465
  20. package/dist/engine/defaults.js +104 -111
  21. package/dist/engine/errors.js +113 -128
  22. package/dist/engine/fts.js +233 -280
  23. package/dist/engine/group-index.js +287 -321
  24. package/dist/engine/index.js +23 -12
  25. package/dist/engine/join-index.js +177 -186
  26. package/dist/engine/keyed-live.js +168 -173
  27. package/dist/engine/live-api.js +0 -1
  28. package/dist/engine/live-equal.js +32 -37
  29. package/dist/engine/live.js +603 -647
  30. package/dist/engine/memory.js +109 -111
  31. package/dist/engine/optimizer.d.ts +19 -1
  32. package/dist/engine/optimizer.js +2642 -2515
  33. package/dist/engine/point-read.d.ts +4 -2
  34. package/dist/engine/point-read.js +121 -171
  35. package/dist/engine/query-api.js +12 -3
  36. package/dist/engine/query-cache.js +61 -69
  37. package/dist/engine/query.d.ts +45 -0
  38. package/dist/engine/query.js +8506 -9375
  39. package/dist/engine/result-wire.js +221 -252
  40. package/dist/engine/schema-wire.js +97 -112
  41. package/dist/engine/schema.js +1099 -1254
  42. package/dist/engine/sort-keys.js +315 -389
  43. package/dist/engine/sql-domains.d.ts +7 -1
  44. package/dist/engine/sql-domains.js +648 -734
  45. package/dist/engine/sql-driver.js +0 -1
  46. package/dist/engine/sql-functions.d.ts +11 -0
  47. package/dist/engine/sql-functions.js +1092 -0
  48. package/dist/engine/sql-json.js +199 -218
  49. package/dist/engine/sql-semantics.d.ts +25 -4
  50. package/dist/engine/sql-semantics.js +579 -513
  51. package/dist/engine/typed-live.js +271 -293
  52. package/dist/engine/vector.d.ts +7 -1
  53. package/dist/engine/vector.js +4513 -4580
  54. package/dist/engine/worker-host.d.ts +8 -63
  55. package/dist/engine/worker-host.js +28 -1130
  56. package/dist/engine/worker-indexeddb.d.ts +1 -0
  57. package/dist/engine/worker-indexeddb.js +3 -0
  58. package/dist/engine/worker-memory.d.ts +1 -0
  59. package/dist/engine/worker-memory.js +3 -0
  60. package/dist/engine/worker-opfs.d.ts +1 -0
  61. package/dist/engine/worker-opfs.js +3 -0
  62. package/dist/engine/worker-server.d.ts +93 -0
  63. package/dist/engine/worker-server.js +999 -0
  64. package/dist/engine/worker-store-indexeddb.d.ts +2 -0
  65. package/dist/engine/worker-store-indexeddb.js +11 -0
  66. package/dist/engine/worker-store-memory.d.ts +2 -0
  67. package/dist/engine/worker-store-memory.js +6 -0
  68. package/dist/engine/worker-store-opfs.d.ts +2 -0
  69. package/dist/engine/worker-store-opfs.js +9 -0
  70. package/dist/engine/worker.js +0 -12
  71. package/dist/engine/write-block-planner.js +93 -100
  72. package/dist/plan/index.js +15 -16
  73. package/dist/plan/model.d.ts +9 -1
  74. package/dist/plan/model.js +20 -27
  75. package/dist/storage/index.js +0 -12
  76. package/dist/storage/indexeddb.js +11776 -13171
  77. package/dist/storage/memory.js +1198 -1241
  78. package/dist/storage/opfs/files.js +238 -295
  79. package/dist/storage/opfs/index.js +9 -3
  80. package/dist/storage/opfs/leader.js +4386 -4856
  81. package/dist/storage/opfs/rpc.js +223 -259
  82. package/dist/storage/opfs/snapshot-ledger.js +219 -260
  83. package/dist/storage/opfs/store.js +884 -1003
  84. package/dist/storage/persistence.js +59 -74
  85. package/dist/storage/snapshot-stream.js +788 -826
  86. package/dist/storage/snapshot.js +36 -37
  87. package/dist/storage/toolkit/extents.js +444 -520
  88. package/dist/storage/toolkit/index.js +28 -29
  89. package/dist/storage/toolkit/record-core.js +5792 -6377
  90. package/dist/storage/toolkit/sync-file.js +34 -42
  91. package/dist/storage/toolkit/wal.js +92 -127
  92. package/dist/storage/toolkit/wire.js +232 -256
  93. package/dist/storage/types.js +2952 -3228
  94. package/dist/testing/block-store-conformance.js +1556 -1629
  95. package/dist/testing/index.js +310 -291
  96. package/dist/testing/opfs-shim.js +280 -312
  97. package/dist/testing/simulator.js +496 -534
  98. package/dist/testing/sqllogictest.js +425 -365
  99. package/dist/transactions/index.js +1464 -1712
  100. package/dist/worker-protocol/index.js +70 -69
  101. package/package.json +20 -2
  102. package/postgres-feature-profile.json +15 -5
  103. package/sql-feature-matrix.json +252 -2
@@ -1,29 +1,28 @@
1
- /**
2
- * The storage adapter toolkit: optional building blocks for implementing `BlockStore` against
3
- * a new substrate. Nothing here is part of the storage contract — the contract is the
4
- * `BlockStore` capability interfaces, their documented rules, and the conformance kit in
5
- * `@minnowdb/core/testing` and the engine never references this module. An adapter is free
6
- * to ignore all of it and store records however its platform does best.
7
- *
8
- * What it offers, and which shipped adapter proves each piece:
9
- *
10
- * - `RecordCore` — the synchronous record-state machine behind `MemoryBlockStore` and
11
- * `OpfsBlockStore`: every record family, every validation order, every typed conflict the
12
- * contract requires, with `dump()`/`load()` for checkpointing. An adapter that owns a
13
- * single-writer view of the records (a leader, a lone process) can wrap it and spend its
14
- * own code purely on persistence.
15
- * - `WalWriter` / `replayWalFrames` — checksummed write-ahead-log frames over any
16
- * `SyncFileHandle`.
17
- * - `ExtentPool` — packed append-only files for bulk bytes, addressed by `Placement`.
18
- * - `encodeRecordJson` and the envelope codecs — JSON with bigint support, checksummed and
19
- * versioned, for frames, checkpoints, and immutable chunks.
20
- *
21
- * `SyncFileHandle` is the only substrate assumption the file-shaped pieces make; the browser's
22
- * `FileSystemSyncAccessHandle` satisfies it as-is, and so does anything with positioned
23
- * synchronous I/O. See `/docs/storage/custom` for the guide.
24
- */
25
- export { readFully, writeFully } from "./sync-file.js";
26
- export { RecordCore } from "./record-core.js";
27
- export { MAX_WAL_FRAME_BYTES, WalWriter, iterateWalFrames, replayWalFrames, } from "./wal.js";
28
- export { ExtentPool, assertValidExtentMeta, assertValidPlacement, extentPath, validPlacement, } from "./extents.js";
29
- export { LOG_FORMAT_VERSION, decodeChunk, decodePostingChunk, decodeRecordJson, decodeSyncCheckpoint, encodeChunk, encodePostingChunk, encodeRecordJson, encodeSyncCheckpoint, } from "./wire.js";
1
+ import { readFully, writeFully } from "./sync-file.js";
2
+ import { RecordCore } from "./record-core.js";
3
+ import { MAX_WAL_FRAME_BYTES, WalWriter, iterateWalFrames, replayWalFrames } from "./wal.js";
4
+ import { ExtentPool, assertValidExtentMeta, assertValidPlacement, extentPath, validPlacement } from "./extents.js";
5
+ import { LOG_FORMAT_VERSION, decodeChunk, decodePostingChunk, decodeRecordJson, decodeSyncCheckpoint, encodeChunk, encodePostingChunk, encodeRecordJson, encodeSyncCheckpoint } from "./wire.js";
6
+ export {
7
+ ExtentPool,
8
+ LOG_FORMAT_VERSION,
9
+ MAX_WAL_FRAME_BYTES,
10
+ RecordCore,
11
+ WalWriter,
12
+ assertValidExtentMeta,
13
+ assertValidPlacement,
14
+ decodeChunk,
15
+ decodePostingChunk,
16
+ decodeRecordJson,
17
+ decodeSyncCheckpoint,
18
+ encodeChunk,
19
+ encodePostingChunk,
20
+ encodeRecordJson,
21
+ encodeSyncCheckpoint,
22
+ extentPath,
23
+ iterateWalFrames,
24
+ readFully,
25
+ replayWalFrames,
26
+ validPlacement,
27
+ writeFully
28
+ };