@procedures/mongo 0.8.1 → 0.9.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.
- package/CHANGELOG.md +34 -0
- package/README.md +85 -669
- package/dist/.tsbuildinfo +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/storage/document-storage.d.ts +194 -0
- package/dist/storage/document-storage.d.ts.map +1 -0
- package/dist/storage/document-storage.js +694 -0
- package/dist/storage/document-storage.js.map +1 -0
- package/dist/storage/index.d.ts +4 -0
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/index.js +2 -0
- package/dist/storage/index.js.map +1 -1
- package/dist/storage/pipeline-scope.d.ts +73 -0
- package/dist/storage/pipeline-scope.d.ts.map +1 -0
- package/dist/storage/pipeline-scope.js +262 -0
- package/dist/storage/pipeline-scope.js.map +1 -0
- package/package.json +3 -3
- package/src/index.ts +14 -2
- package/src/storage/document-storage.ts +787 -0
- package/src/storage/index.ts +13 -0
- package/src/storage/pipeline-scope.ts +281 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# @procedures/mongo
|
|
2
2
|
|
|
3
|
+
## 0.9.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- d7ad24e: New `MongoDocumentStorage` (roadmap CLI-24): a `CollectionStorage` over MongoDB. It has flat documents, a change log with tombstones for an exact `getChangesSince()`, versions (`versionOf()`), queries in the database (`query()`), `patch()` and partitions (`forPartition()`).
|
|
8
|
+
|
|
9
|
+
On a replica set, each write is a transaction with its numbers. On a single server, a watermark of the pending numbers keeps the log exact, and a late write moves its documents to new numbers. An id cannot have the character U+001F, and each write filter has the partition. It passes the `CollectionStorage` contract on MongoDB 7. `MongoStorage` keeps its `{ _id, data }` documents. CI has a MongoDB job, and the coverage job starts the storage tests on MongoDB.
|
|
10
|
+
- 28d82c9: The time options of the new storage APIs take a `Duration` of `@procedures/client`, as the other time options of the client do (roadmap R11). A plain number is a `TypeError`.
|
|
11
|
+
|
|
12
|
+
- `MongoDocumentStorage`: the option `writeLease` (default `seconds(60)`) replaces `writeLeaseMs`.
|
|
13
|
+
- `MongoDocumentStorage.aggregate()` and `PipelineLimits`: `maxTime` (default `seconds(10)`) replaces `maxTimeMS`. `DEFAULT_PIPELINE_LIMITS` has `maxTime`.
|
|
14
|
+
|
|
15
|
+
These APIs are new in this release, so no released code changes. The procedure `mongo.documents.aggregate` keeps its input `maxTimeMS` in milliseconds: the wire keeps milliseconds.
|
|
16
|
+
- 3b2ddcd: New `scopePipeline()`: the guard of an aggregation pipeline over shared collections. The filter of the scope goes on each read of the pipeline and of its sub-pipelines. The pipeline reads and writes only the collections of the scope. Only the document stages of `ALLOWED_PIPELINE_STAGES` pass. `$out` and the JavaScript operators of the server are refused, and `$merge` needs a stamp. New `boundPipeline()`, `cutResults()` and `isTimeLimitError()` give the limits of time and size.
|
|
17
|
+
|
|
18
|
+
New `MongoDocumentStorage.aggregate()`: a read-only pipeline on the items of the partition, with these limits. The code comes from the server of Graph (its split plan, part P3).
|
|
19
|
+
- Updated dependencies [61d60c6]
|
|
20
|
+
- Updated dependencies [79f750a]
|
|
21
|
+
- Updated dependencies [d0c9856]
|
|
22
|
+
- Updated dependencies [b5db4d8]
|
|
23
|
+
- @procedures/client@0.9.1
|
|
24
|
+
- @procedures/collections@0.9.1
|
|
25
|
+
|
|
26
|
+
## 0.9.0
|
|
27
|
+
|
|
28
|
+
### Patch Changes
|
|
29
|
+
|
|
30
|
+
- Updated dependencies [8bb469c]
|
|
31
|
+
- Updated dependencies [0dd1c86]
|
|
32
|
+
- Updated dependencies [dc03903]
|
|
33
|
+
- Updated dependencies [dca28c1]
|
|
34
|
+
- @procedures/client@0.9.0
|
|
35
|
+
- @procedures/collections@0.9.0
|
|
36
|
+
|
|
3
37
|
## 0.8.1
|
|
4
38
|
|
|
5
39
|
### Patch Changes
|