@dnax/core 0.64.9 → 0.65.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/driver/mongo/rest.ts +10 -4
- package/package.json +1 -1
- package/types/index.ts +3 -0
package/driver/mongo/rest.ts
CHANGED
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
ClientSession,
|
|
10
10
|
MongoClient,
|
|
11
11
|
ObjectId,
|
|
12
|
+
type ChangeStreamOptions,
|
|
12
13
|
type FilterOperations,
|
|
13
14
|
} from "mongodb";
|
|
14
15
|
import { contextError, fn, toJson, dotJson, getEntryBykeys } from "../../utils";
|
|
@@ -2060,10 +2061,15 @@ class useRest {
|
|
|
2060
2061
|
return await this.#tenant.database.db?.stats().then((e) => e);
|
|
2061
2062
|
}
|
|
2062
2063
|
|
|
2063
|
-
watch(
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2064
|
+
watch(
|
|
2065
|
+
collection: string,
|
|
2066
|
+
pipeline: Array<any>,
|
|
2067
|
+
options: ChangeStreamOptions
|
|
2068
|
+
): ChangeStream {
|
|
2069
|
+
return this.#tenant.database.db?.collection(collection).watch(pipeline, {
|
|
2070
|
+
allowDiskUse: true,
|
|
2071
|
+
...options,
|
|
2072
|
+
}) as ChangeStream;
|
|
2067
2073
|
}
|
|
2068
2074
|
}
|
|
2069
2075
|
|
package/package.json
CHANGED