@pioneer-platform/default-mongo-v2 1.6.0 → 1.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.
- package/CHANGELOG.md +12 -0
- package/package.json +1 -1
- package/src/index.ts +7 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @pioneer-platform/default-mongo-v2
|
|
2
2
|
|
|
3
|
+
## 1.7.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Force republish to ensure no workspace:\* references in published packages
|
|
8
|
+
|
|
9
|
+
## 1.7.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- Automated minor version bump for all packages
|
|
14
|
+
|
|
3
15
|
## 1.6.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -87,8 +87,8 @@ class CollectionWrapper<T extends Document = Document> {
|
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
// Find one document
|
|
90
|
-
async findOne(query: Filter<T
|
|
91
|
-
return (await this.collection.findOne(query)) as T | null;
|
|
90
|
+
async findOne(query: Filter<T>, options: FindOptions = {}): Promise<T | null> {
|
|
91
|
+
return (await this.collection.findOne(query, options)) as T | null;
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
// Insert one document
|
|
@@ -130,6 +130,11 @@ class CollectionWrapper<T extends Document = Document> {
|
|
|
130
130
|
return await this.collection.drop();
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
+
// Bulk write operations
|
|
134
|
+
async bulkWrite(operations: any[], options: any = {}): Promise<any> {
|
|
135
|
+
return await this.collection.bulkWrite(operations, options);
|
|
136
|
+
}
|
|
137
|
+
|
|
133
138
|
// Access native collection for advanced operations
|
|
134
139
|
async native(): Promise<Collection<T>> {
|
|
135
140
|
return this.collection;
|