@taladb/node 0.8.3 → 0.8.4
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/index.d.ts
CHANGED
|
@@ -30,6 +30,22 @@ export declare class TalaDbNode {
|
|
|
30
30
|
* garbage-collected — drop them too to fully release the file.
|
|
31
31
|
*/
|
|
32
32
|
close(): void
|
|
33
|
+
/**
|
|
34
|
+
* List user collection names (excludes reserved `_`-prefixed collections
|
|
35
|
+
* such as the sync cursor store). Backs "sync all collections".
|
|
36
|
+
*/
|
|
37
|
+
listCollectionNames(): Array<string>
|
|
38
|
+
/**
|
|
39
|
+
* Export changes to `collections` after `sinceMs` (exclusive) as a JSON
|
|
40
|
+
* changeset string, for the bidirectional sync orchestration. `sinceMs`
|
|
41
|
+
* is a millisecond epoch timestamp (the persisted sync cursor).
|
|
42
|
+
*/
|
|
43
|
+
exportChanges(sinceMs: number, collections: Array<string>): string
|
|
44
|
+
/**
|
|
45
|
+
* Merge a JSON changeset string (from a remote peer) into the local
|
|
46
|
+
* database via Last-Write-Wins. Returns the number of documents changed.
|
|
47
|
+
*/
|
|
48
|
+
importChanges(changesetJson: string): number
|
|
33
49
|
/**
|
|
34
50
|
* Get a collection by name. If an HTTP sync hook is configured it is
|
|
35
51
|
* automatically attached to the returned collection.
|
|
@@ -45,6 +61,12 @@ export declare class CollectionNode {
|
|
|
45
61
|
find(filter: JsonValue): Array<JsonValue>
|
|
46
62
|
/** Find a single document or return null. */
|
|
47
63
|
findOne(filter: JsonValue): JsonValue | null
|
|
64
|
+
/**
|
|
65
|
+
* Run a MongoDB-style aggregation pipeline. `pipeline` is a JSON array of
|
|
66
|
+
* stage objects (`$match`, `$group`, `$sort`, `$skip`, `$limit`,
|
|
67
|
+
* `$project`). Returns the resulting documents.
|
|
68
|
+
*/
|
|
69
|
+
aggregate(pipeline: JsonValue): Array<JsonValue>
|
|
48
70
|
/** Update the first matching document. */
|
|
49
71
|
updateOne(filter: JsonValue, update: JsonValue): boolean
|
|
50
72
|
/** Update all matching documents. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taladb/node",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.4",
|
|
4
4
|
"description": "TalaDB Node.js native module — document queries and vector search via napi-rs",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"repository": {
|
|
26
26
|
"type": "git",
|
|
27
27
|
"url": "https://github.com/thinkgrid-labs/taladb.git",
|
|
28
|
-
"directory": "packages/
|
|
28
|
+
"directory": "packages/bindings/node"
|
|
29
29
|
},
|
|
30
30
|
"homepage": "https://thinkgrid-labs.github.io/taladb/guide/node",
|
|
31
31
|
"bugs": {
|
|
Binary file
|
|
Binary file
|
|
Binary file
|