@twin.org/entity-storage-connector-mongodb 0.0.1-next.29 → 0.0.1-next.30
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/dist/cjs/index.cjs
CHANGED
|
@@ -210,11 +210,10 @@ class MongoDbEntityStorageConnector {
|
|
|
210
210
|
if (conditions) {
|
|
211
211
|
this.buildQueryParameters("", conditions, filter);
|
|
212
212
|
}
|
|
213
|
-
const sort =
|
|
213
|
+
const sort = new Map();
|
|
214
214
|
if (Array.isArray(sortProperties)) {
|
|
215
215
|
for (const sortProperty of sortProperties) {
|
|
216
|
-
|
|
217
|
-
sort[sortProperty.property] = direction;
|
|
216
|
+
sort.set(sortProperty.property, sortProperty.sortDirection);
|
|
218
217
|
}
|
|
219
218
|
}
|
|
220
219
|
const projection = {};
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Guards, BaseError, Is, GeneralError } from '@twin.org/core';
|
|
2
|
-
import { EntitySchemaFactory, EntitySchemaHelper,
|
|
2
|
+
import { EntitySchemaFactory, EntitySchemaHelper, LogicalOperator, ComparisonOperator } from '@twin.org/entity';
|
|
3
3
|
import { LoggingConnectorFactory } from '@twin.org/logging-models';
|
|
4
4
|
import { MongoClient } from 'mongodb';
|
|
5
5
|
|
|
@@ -208,11 +208,10 @@ class MongoDbEntityStorageConnector {
|
|
|
208
208
|
if (conditions) {
|
|
209
209
|
this.buildQueryParameters("", conditions, filter);
|
|
210
210
|
}
|
|
211
|
-
const sort =
|
|
211
|
+
const sort = new Map();
|
|
212
212
|
if (Array.isArray(sortProperties)) {
|
|
213
213
|
for (const sortProperty of sortProperties) {
|
|
214
|
-
|
|
215
|
-
sort[sortProperty.property] = direction;
|
|
214
|
+
sort.set(sortProperty.property, sortProperty.sortDirection);
|
|
216
215
|
}
|
|
217
216
|
}
|
|
218
217
|
const projection = {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type EntityCondition, type IEntitySchema, SortDirection } from "@twin.org/entity";
|
|
1
|
+
import { type EntityCondition, type IEntitySchema, type SortDirection } from "@twin.org/entity";
|
|
2
2
|
import type { IEntityStorageConnector } from "@twin.org/entity-storage-models";
|
|
3
3
|
import type { IMongoDbEntityStorageConnectorConstructorOptions } from "./models/IMongoDbEntityStorageConnectorConstructorOptions";
|
|
4
4
|
/**
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @twin.org/entity-storage-connector-mongodb - Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.1-next.30](https://github.com/twinfoundation/entity-storage/compare/entity-storage-connector-mongodb-v0.0.1-next.29...entity-storage-connector-mongodb-v0.0.1-next.30) (2025-06-12)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* update dependencies ([7ccc0c4](https://github.com/twinfoundation/entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* The following workspace dependencies were updated
|
|
14
|
+
* dependencies
|
|
15
|
+
* @twin.org/entity-storage-models bumped from 0.0.1-next.29 to 0.0.1-next.30
|
|
16
|
+
* devDependencies
|
|
17
|
+
* @twin.org/entity-storage-connector-memory bumped from 0.0.1-next.29 to 0.0.1-next.30
|
|
18
|
+
|
|
3
19
|
## [0.0.1-next.29](https://github.com/twinfoundation/entity-storage/compare/entity-storage-connector-mongodb-v0.0.1-next.28...entity-storage-connector-mongodb-v0.0.1-next.29) (2025-04-17)
|
|
4
20
|
|
|
5
21
|
|
|
@@ -194,7 +194,7 @@ Nothing.
|
|
|
194
194
|
|
|
195
195
|
### query()
|
|
196
196
|
|
|
197
|
-
> **query**(`conditions?`, `sortProperties?`, `properties?`, `cursor?`, `pageSize?`): `Promise`\<\{ `entities`: `Partial`\<`T`\>[]; `cursor
|
|
197
|
+
> **query**(`conditions?`, `sortProperties?`, `properties?`, `cursor?`, `pageSize?`): `Promise`\<\{ `entities`: `Partial`\<`T`\>[]; `cursor?`: `string`; \}\>
|
|
198
198
|
|
|
199
199
|
Find all the entities which match the conditions.
|
|
200
200
|
|
|
@@ -232,7 +232,7 @@ The suggested number of entities to return in each chunk, in some scenarios can
|
|
|
232
232
|
|
|
233
233
|
#### Returns
|
|
234
234
|
|
|
235
|
-
`Promise`\<\{ `entities`: `Partial`\<`T`\>[]; `cursor
|
|
235
|
+
`Promise`\<\{ `entities`: `Partial`\<`T`\>[]; `cursor?`: `string`; \}\>
|
|
236
236
|
|
|
237
237
|
All the entities for the storage matching the conditions,
|
|
238
238
|
and a cursor which can be used to request more entities.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/entity-storage-connector-mongodb",
|
|
3
|
-
"version": "0.0.1-next.
|
|
3
|
+
"version": "0.0.1-next.30",
|
|
4
4
|
"description": "Entity Storage connector implementation using MongoDb storage",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@twin.org/core": "next",
|
|
18
18
|
"@twin.org/entity": "next",
|
|
19
|
-
"@twin.org/entity-storage-models": "0.0.1-next.
|
|
19
|
+
"@twin.org/entity-storage-models": "0.0.1-next.30",
|
|
20
20
|
"@twin.org/logging-models": "next",
|
|
21
21
|
"@twin.org/nameof": "next",
|
|
22
|
-
"mongodb": "
|
|
22
|
+
"mongodb": "6.17.0"
|
|
23
23
|
},
|
|
24
24
|
"main": "./dist/cjs/index.cjs",
|
|
25
25
|
"module": "./dist/esm/index.mjs",
|