remult 0.21.1-exp.2 → 0.21.1-exp.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/esm/postgres/postgres-data-provider.js +2 -0
- package/esm/postgres/schema-builder.js +2 -2
- package/esm/remult-knex/index.js +12 -6
- package/esm/src/context.js +1 -1
- package/esm/src/data-providers/sql-database.js +2 -2
- package/esm/src/remult3/RepositoryImplementation.d.ts +1 -1
- package/esm/src/remult3/RepositoryImplementation.js +3 -3
- package/esm/src/shared-tests/db-tests.db-tests.js +32 -0
- package/package.json +1 -1
- package/postgres/postgres-data-provider.js +2 -0
- package/postgres/schema-builder.js +1 -1
- package/remult-knex/index.js +11 -5
- package/src/context.js +1 -1
- package/src/data-providers/sql-database.js +1 -1
- package/src/remult3/RepositoryImplementation.d.ts +1 -1
- package/src/remult3/RepositoryImplementation.js +2 -2
- package/src/shared-tests/db-tests.db-tests.js +72 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { allEntities } from '../src/context';
|
|
2
2
|
import { dbNamesOf, isDbReadonly } from '../src/filter/filter-consumer-bridge-to-sql-request';
|
|
3
|
-
import {
|
|
3
|
+
import { remult as defaultRemult } from '../src/remult-proxy';
|
|
4
4
|
import { isAutoIncrement } from '../src/remult3';
|
|
5
5
|
import { ValueConverters } from '../src/valueConverters';
|
|
6
6
|
export function postgresColumnSyntax(x, dbName) {
|
|
@@ -41,7 +41,7 @@ export class PostgresSchemaBuilder {
|
|
|
41
41
|
static logToConsole = true;
|
|
42
42
|
async verifyStructureOfAllEntities(remult) {
|
|
43
43
|
if (!remult) {
|
|
44
|
-
remult =
|
|
44
|
+
remult = defaultRemult;
|
|
45
45
|
}
|
|
46
46
|
const completed = new Set();
|
|
47
47
|
const entities = [];
|
package/esm/remult-knex/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { isAutoIncrement, getRepository } from "../src/remult3";
|
|
|
5
5
|
import { ValueConverters } from "../src/valueConverters";
|
|
6
6
|
import { CompoundIdField } from '../src/column';
|
|
7
7
|
import { Sort } from '../src/sort';
|
|
8
|
-
import { remult as remultContext
|
|
8
|
+
import { remult as remultContext } from '../src/remult-proxy';
|
|
9
9
|
export class KnexDataProvider {
|
|
10
10
|
knex;
|
|
11
11
|
constructor(knex) {
|
|
@@ -144,7 +144,7 @@ class KnexEntityDataProvider {
|
|
|
144
144
|
for (const x of this.entity.fields) {
|
|
145
145
|
if (isDbReadonly(x, e)) { }
|
|
146
146
|
else if (data[x.key] !== undefined) {
|
|
147
|
-
let v = x
|
|
147
|
+
let v = translateValueAndHandleArrayAndHandleArray(x, data[x.key]);
|
|
148
148
|
if (v !== undefined) {
|
|
149
149
|
let key = await e.$dbNameOf(x);
|
|
150
150
|
updateObject[key] = v;
|
|
@@ -173,7 +173,7 @@ class KnexEntityDataProvider {
|
|
|
173
173
|
for (const x of this.entity.fields) {
|
|
174
174
|
if (isDbReadonly(x, e)) { }
|
|
175
175
|
else {
|
|
176
|
-
let v = x
|
|
176
|
+
let v = translateValueAndHandleArrayAndHandleArray(x, data[x.key]);
|
|
177
177
|
if (v != undefined) {
|
|
178
178
|
let key = await e.$dbNameOf(x);
|
|
179
179
|
insertObject[key] = v;
|
|
@@ -251,7 +251,7 @@ class FilterConsumerBridgeToKnexRequest {
|
|
|
251
251
|
this.result.push(b => b.whereNotNull(this.nameProvider.$dbNameOf(col)));
|
|
252
252
|
}
|
|
253
253
|
isIn(col, val) {
|
|
254
|
-
this.result.push(knex => knex.whereIn(this.nameProvider.$dbNameOf(col), val.map(x => col
|
|
254
|
+
this.result.push(knex => knex.whereIn(this.nameProvider.$dbNameOf(col), val.map(x => translateValueAndHandleArrayAndHandleArray(col, x))));
|
|
255
255
|
}
|
|
256
256
|
isEqualTo(col, val) {
|
|
257
257
|
this.add(col, val, "=");
|
|
@@ -277,7 +277,7 @@ class FilterConsumerBridgeToKnexRequest {
|
|
|
277
277
|
})());
|
|
278
278
|
}
|
|
279
279
|
add(col, val, operator) {
|
|
280
|
-
this.result.push(b => b.where(this.nameProvider.$dbNameOf(col), operator, col
|
|
280
|
+
this.result.push(b => b.where(this.nameProvider.$dbNameOf(col), operator, translateValueAndHandleArrayAndHandleArray(col, val)));
|
|
281
281
|
}
|
|
282
282
|
databaseCustom(databaseCustom) {
|
|
283
283
|
this.promises.push((async () => {
|
|
@@ -293,7 +293,7 @@ export class KnexSchemaBuilder {
|
|
|
293
293
|
static logToConsole = true;
|
|
294
294
|
async verifyStructureOfAllEntities(remult) {
|
|
295
295
|
if (!remult)
|
|
296
|
-
remult =
|
|
296
|
+
remult = remultContext;
|
|
297
297
|
const entities = allEntities.map(x => remult.repo(x).metadata);
|
|
298
298
|
this.ensureSchema(entities);
|
|
299
299
|
}
|
|
@@ -438,3 +438,9 @@ export async function createKnexDataProvider(config) {
|
|
|
438
438
|
let result = new KnexDataProvider(k);
|
|
439
439
|
return result;
|
|
440
440
|
}
|
|
441
|
+
function translateValueAndHandleArrayAndHandleArray(field, val) {
|
|
442
|
+
let result = field.valueConverter.toDb(val);
|
|
443
|
+
if (Array.isArray(result))
|
|
444
|
+
return JSON.stringify(result);
|
|
445
|
+
return result;
|
|
446
|
+
}
|
package/esm/src/context.js
CHANGED
|
@@ -3,13 +3,13 @@ import { dbNamesOf, FilterConsumerBridgeToSqlRequest, isDbReadonly } from "../fi
|
|
|
3
3
|
import { customDatabaseFilterToken, Filter } from '../filter/filter-interfaces';
|
|
4
4
|
import { Sort } from '../sort';
|
|
5
5
|
import { getRepository } from "../remult3";
|
|
6
|
-
import {
|
|
6
|
+
import { remult as defaultRemult } from "../remult-proxy";
|
|
7
7
|
import { ValueConverters } from "../valueConverters";
|
|
8
8
|
// @dynamic
|
|
9
9
|
export class SqlDatabase {
|
|
10
10
|
sql;
|
|
11
11
|
static getDb(remult) {
|
|
12
|
-
const r = (remult ||
|
|
12
|
+
const r = (remult || defaultRemult).dataProvider;
|
|
13
13
|
if (!r.createCommand)
|
|
14
14
|
throw "the data provider is not an SqlDatabase";
|
|
15
15
|
return r;
|
|
@@ -285,7 +285,7 @@ export declare function getValueList<T>(type: ClassType<T>): T[];
|
|
|
285
285
|
* @Fields.string((options,remult) => options.includeInApi = true)
|
|
286
286
|
* title='';
|
|
287
287
|
*/
|
|
288
|
-
export declare function Field<entityType = any, valueType = any>(valueType: () => ClassType<valueType>, ...options: (FieldOptions<entityType, valueType> | ((options: FieldOptions<entityType, valueType>, remult: Remult) => void))[]): (target: any, context: ClassFieldDecoratorContext<entityType, valueType> | string, c?: any) => void;
|
|
288
|
+
export declare function Field<entityType = any, valueType = any>(valueType: () => ClassType<valueType>, ...options: (FieldOptions<entityType, valueType> | ((options: FieldOptions<entityType, valueType>, remult: Remult) => void))[]): (target: any, context: ClassFieldDecoratorContext<entityType, valueType | undefined> | string, c?: any) => void;
|
|
289
289
|
export declare const storableMember: unique symbol;
|
|
290
290
|
export declare function decorateColumnSettings<valueType>(settings: FieldOptions<any, valueType>, remult: Remult): FieldOptions<any, valueType>;
|
|
291
291
|
interface columnInfo {
|
|
@@ -8,7 +8,7 @@ import { createId } from '@paralleldrive/cuid2';
|
|
|
8
8
|
import { ValueConverters } from "../valueConverters";
|
|
9
9
|
import { filterHelper } from "../filter/filter-interfaces";
|
|
10
10
|
import { assign } from "../../assign";
|
|
11
|
-
import { remult as defaultRemult
|
|
11
|
+
import { remult as defaultRemult } from "../remult-proxy";
|
|
12
12
|
//import { remult } from "../remult-proxy";
|
|
13
13
|
let classValidatorValidate = undefined;
|
|
14
14
|
// import("class-validator".toString())
|
|
@@ -2094,14 +2094,14 @@ export function getEntityMetadata(entity) {
|
|
|
2094
2094
|
return entity.metadata;
|
|
2095
2095
|
const settings = getEntitySettings(entity, false);
|
|
2096
2096
|
if (settings) {
|
|
2097
|
-
return
|
|
2097
|
+
return defaultRemult.repo(entity).metadata;
|
|
2098
2098
|
}
|
|
2099
2099
|
return entity;
|
|
2100
2100
|
}
|
|
2101
2101
|
export function getRepository(entity) {
|
|
2102
2102
|
const settings = getEntitySettings(entity, false);
|
|
2103
2103
|
if (settings) {
|
|
2104
|
-
return
|
|
2104
|
+
return defaultRemult.repo(entity);
|
|
2105
2105
|
}
|
|
2106
2106
|
return entity;
|
|
2107
2107
|
}
|
|
@@ -884,3 +884,35 @@ testAll("test json structure", async ({ createEntity }) => {
|
|
|
884
884
|
let item = await r.findFirst();
|
|
885
885
|
expect(item.person).toEqual({ firstName: "noam", lastName: "honig" });
|
|
886
886
|
}, false);
|
|
887
|
+
testAll("test json structure 2", async ({ createEntity }) => {
|
|
888
|
+
const e = class {
|
|
889
|
+
a = 0;
|
|
890
|
+
items = [];
|
|
891
|
+
};
|
|
892
|
+
describeClass(e, Entity("testJsonFieldType2", { allowApiCrud: true }), {
|
|
893
|
+
a: Fields.number(),
|
|
894
|
+
items: Fields.json()
|
|
895
|
+
});
|
|
896
|
+
const r = await createEntity(e);
|
|
897
|
+
await r.insert({ a: 1, items: ["a", "b"] });
|
|
898
|
+
let item = await r.findFirst();
|
|
899
|
+
expect(item.items).toEqual(["a", "b"]);
|
|
900
|
+
//expect(await r.count({ items: { $contains: "b" } })).toBe(1)
|
|
901
|
+
}, false);
|
|
902
|
+
testAll("test json structure 3", async ({ createEntity }) => {
|
|
903
|
+
const e = class {
|
|
904
|
+
a = 0;
|
|
905
|
+
items = [];
|
|
906
|
+
};
|
|
907
|
+
describeClass(e, Entity("testJsonFieldType3", { allowApiCrud: true }), {
|
|
908
|
+
a: Fields.number(),
|
|
909
|
+
items: Fields.object()
|
|
910
|
+
});
|
|
911
|
+
const r = await createEntity(e);
|
|
912
|
+
await r.insert({ a: 1, items: ["a", "b"] });
|
|
913
|
+
let item = await r.findFirst();
|
|
914
|
+
expect(item.items).toEqual(["a", "b"]);
|
|
915
|
+
expect(await r.count({ items: { $contains: "b" } })).toBe(1);
|
|
916
|
+
}, false, {
|
|
917
|
+
exclude: [TestDbs.mongo]
|
|
918
|
+
});
|
package/package.json
CHANGED
|
@@ -101,6 +101,8 @@ var PostgresBridgeToSQLCommand = /** @class */ (function () {
|
|
|
101
101
|
this.values = [];
|
|
102
102
|
}
|
|
103
103
|
PostgresBridgeToSQLCommand.prototype.addParameterAndReturnSqlToken = function (val) {
|
|
104
|
+
if (Array.isArray(val))
|
|
105
|
+
val = JSON.stringify(val);
|
|
104
106
|
this.values.push(val);
|
|
105
107
|
return '$' + this.values.length;
|
|
106
108
|
};
|
|
@@ -64,7 +64,7 @@ var PostgresSchemaBuilder = exports.PostgresSchemaBuilder = /** @class */ (funct
|
|
|
64
64
|
switch (_d.label) {
|
|
65
65
|
case 0:
|
|
66
66
|
if (!remult) {
|
|
67
|
-
remult = remult_proxy_1.
|
|
67
|
+
remult = remult_proxy_1.remult;
|
|
68
68
|
}
|
|
69
69
|
completed = new Set();
|
|
70
70
|
entities = [];
|
package/remult-knex/index.js
CHANGED
|
@@ -265,7 +265,7 @@ var KnexEntityDataProvider = /** @class */ (function () {
|
|
|
265
265
|
return [3 /*break*/, 6];
|
|
266
266
|
case 4:
|
|
267
267
|
if (!(data[x.key] !== undefined)) return [3 /*break*/, 6];
|
|
268
|
-
v = x
|
|
268
|
+
v = translateValueAndHandleArrayAndHandleArray(x, data[x.key]);
|
|
269
269
|
if (!(v !== undefined)) return [3 /*break*/, 6];
|
|
270
270
|
return [4 /*yield*/, e.$dbNameOf(x)];
|
|
271
271
|
case 5:
|
|
@@ -344,7 +344,7 @@ var KnexEntityDataProvider = /** @class */ (function () {
|
|
|
344
344
|
if (!(0, filter_consumer_bridge_to_sql_request_1.isDbReadonly)(x, e)) return [3 /*break*/, 4];
|
|
345
345
|
return [3 /*break*/, 6];
|
|
346
346
|
case 4:
|
|
347
|
-
v = x
|
|
347
|
+
v = translateValueAndHandleArrayAndHandleArray(x, data[x.key]);
|
|
348
348
|
if (!(v != undefined)) return [3 /*break*/, 6];
|
|
349
349
|
return [4 /*yield*/, e.$dbNameOf(x)];
|
|
350
350
|
case 5:
|
|
@@ -529,7 +529,7 @@ var FilterConsumerBridgeToKnexRequest = /** @class */ (function () {
|
|
|
529
529
|
FilterConsumerBridgeToKnexRequest.prototype.isIn = function (col, val) {
|
|
530
530
|
var _this = this;
|
|
531
531
|
this.result.push(function (knex) {
|
|
532
|
-
return knex.whereIn(_this.nameProvider.$dbNameOf(col), val.map(function (x) { return col
|
|
532
|
+
return knex.whereIn(_this.nameProvider.$dbNameOf(col), val.map(function (x) { return translateValueAndHandleArrayAndHandleArray(col, x); }));
|
|
533
533
|
});
|
|
534
534
|
};
|
|
535
535
|
FilterConsumerBridgeToKnexRequest.prototype.isEqualTo = function (col, val) {
|
|
@@ -561,7 +561,7 @@ var FilterConsumerBridgeToKnexRequest = /** @class */ (function () {
|
|
|
561
561
|
};
|
|
562
562
|
FilterConsumerBridgeToKnexRequest.prototype.add = function (col, val, operator) {
|
|
563
563
|
var _this = this;
|
|
564
|
-
this.result.push(function (b) { return b.where(_this.nameProvider.$dbNameOf(col), operator, col
|
|
564
|
+
this.result.push(function (b) { return b.where(_this.nameProvider.$dbNameOf(col), operator, translateValueAndHandleArrayAndHandleArray(col, val)); });
|
|
565
565
|
};
|
|
566
566
|
FilterConsumerBridgeToKnexRequest.prototype.databaseCustom = function (databaseCustom) {
|
|
567
567
|
var _this = this;
|
|
@@ -593,7 +593,7 @@ var KnexSchemaBuilder = exports.KnexSchemaBuilder = /** @class */ (function () {
|
|
|
593
593
|
var entities;
|
|
594
594
|
return tslib_1.__generator(this, function (_a) {
|
|
595
595
|
if (!remult)
|
|
596
|
-
remult = remult_proxy_1.
|
|
596
|
+
remult = remult_proxy_1.remult;
|
|
597
597
|
entities = context_1.allEntities.map(function (x) { return remult.repo(x).metadata; });
|
|
598
598
|
this.ensureSchema(entities);
|
|
599
599
|
return [2 /*return*/];
|
|
@@ -889,3 +889,9 @@ function createKnexDataProvider(config) {
|
|
|
889
889
|
});
|
|
890
890
|
}
|
|
891
891
|
exports.createKnexDataProvider = createKnexDataProvider;
|
|
892
|
+
function translateValueAndHandleArrayAndHandleArray(field, val) {
|
|
893
|
+
var result = field.valueConverter.toDb(val);
|
|
894
|
+
if (Array.isArray(result))
|
|
895
|
+
return JSON.stringify(result);
|
|
896
|
+
return result;
|
|
897
|
+
}
|
package/src/context.js
CHANGED
|
@@ -257,7 +257,7 @@ var Allow = exports.Allow = /** @class */ (function () {
|
|
|
257
257
|
if (args[0].authenticated)
|
|
258
258
|
return args[0].authenticated();
|
|
259
259
|
}
|
|
260
|
-
return remult_proxy_1.
|
|
260
|
+
return remult_proxy_1.remult.authenticated();
|
|
261
261
|
};
|
|
262
262
|
return Allow;
|
|
263
263
|
}());
|
|
@@ -16,7 +16,7 @@ var SqlDatabase = exports.SqlDatabase = /** @class */ (function () {
|
|
|
16
16
|
this.createdEntities = [];
|
|
17
17
|
}
|
|
18
18
|
SqlDatabase.getDb = function (remult) {
|
|
19
|
-
var r = (remult || remult_proxy_1.
|
|
19
|
+
var r = (remult || remult_proxy_1.remult).dataProvider;
|
|
20
20
|
if (!r.createCommand)
|
|
21
21
|
throw "the data provider is not an SqlDatabase";
|
|
22
22
|
return r;
|
|
@@ -285,7 +285,7 @@ export declare function getValueList<T>(type: ClassType<T>): T[];
|
|
|
285
285
|
* @Fields.string((options,remult) => options.includeInApi = true)
|
|
286
286
|
* title='';
|
|
287
287
|
*/
|
|
288
|
-
export declare function Field<entityType = any, valueType = any>(valueType: () => ClassType<valueType>, ...options: (FieldOptions<entityType, valueType> | ((options: FieldOptions<entityType, valueType>, remult: Remult) => void))[]): (target: any, context: ClassFieldDecoratorContext<entityType, valueType> | string, c?: any) => void;
|
|
288
|
+
export declare function Field<entityType = any, valueType = any>(valueType: () => ClassType<valueType>, ...options: (FieldOptions<entityType, valueType> | ((options: FieldOptions<entityType, valueType>, remult: Remult) => void))[]): (target: any, context: ClassFieldDecoratorContext<entityType, valueType | undefined> | string, c?: any) => void;
|
|
289
289
|
export declare const storableMember: unique symbol;
|
|
290
290
|
export declare function decorateColumnSettings<valueType>(settings: FieldOptions<any, valueType>, remult: Remult): FieldOptions<any, valueType>;
|
|
291
291
|
interface columnInfo {
|
|
@@ -3355,7 +3355,7 @@ function getEntityMetadata(entity) {
|
|
|
3355
3355
|
return entity.metadata;
|
|
3356
3356
|
var settings = getEntitySettings(entity, false);
|
|
3357
3357
|
if (settings) {
|
|
3358
|
-
return remult_proxy_1.
|
|
3358
|
+
return remult_proxy_1.remult.repo(entity).metadata;
|
|
3359
3359
|
}
|
|
3360
3360
|
return entity;
|
|
3361
3361
|
}
|
|
@@ -3363,7 +3363,7 @@ exports.getEntityMetadata = getEntityMetadata;
|
|
|
3363
3363
|
function getRepository(entity) {
|
|
3364
3364
|
var settings = getEntitySettings(entity, false);
|
|
3365
3365
|
if (settings) {
|
|
3366
|
-
return remult_proxy_1.
|
|
3366
|
+
return remult_proxy_1.remult.repo(entity);
|
|
3367
3367
|
}
|
|
3368
3368
|
return entity;
|
|
3369
3369
|
}
|
|
@@ -2016,3 +2016,75 @@ var testObjectJson = /** @class */ (function () {
|
|
|
2016
2016
|
});
|
|
2017
2017
|
});
|
|
2018
2018
|
}, false);
|
|
2019
|
+
(0, db_tests_setup_1.testAll)("test json structure 2", function (_a) {
|
|
2020
|
+
var createEntity = _a.createEntity;
|
|
2021
|
+
return tslib_1.__awaiter(void 0, void 0, void 0, function () {
|
|
2022
|
+
var e, r, item;
|
|
2023
|
+
return tslib_1.__generator(this, function (_b) {
|
|
2024
|
+
switch (_b.label) {
|
|
2025
|
+
case 0:
|
|
2026
|
+
e = /** @class */ (function () {
|
|
2027
|
+
function class_8() {
|
|
2028
|
+
this.a = 0;
|
|
2029
|
+
this.items = [];
|
|
2030
|
+
}
|
|
2031
|
+
return class_8;
|
|
2032
|
+
}());
|
|
2033
|
+
(0, DecoratorReplacer_1.describeClass)(e, (0, remult3_1.Entity)("testJsonFieldType2", { allowApiCrud: true }), {
|
|
2034
|
+
a: remult3_1.Fields.number(),
|
|
2035
|
+
items: remult3_1.Fields.json()
|
|
2036
|
+
});
|
|
2037
|
+
return [4 /*yield*/, createEntity(e)];
|
|
2038
|
+
case 1:
|
|
2039
|
+
r = _b.sent();
|
|
2040
|
+
return [4 /*yield*/, r.insert({ a: 1, items: ["a", "b"] })];
|
|
2041
|
+
case 2:
|
|
2042
|
+
_b.sent();
|
|
2043
|
+
return [4 /*yield*/, r.findFirst()];
|
|
2044
|
+
case 3:
|
|
2045
|
+
item = _b.sent();
|
|
2046
|
+
expect(item.items).toEqual(["a", "b"]);
|
|
2047
|
+
return [2 /*return*/];
|
|
2048
|
+
}
|
|
2049
|
+
});
|
|
2050
|
+
});
|
|
2051
|
+
}, false);
|
|
2052
|
+
(0, db_tests_setup_1.testAll)("test json structure 3", function (_a) {
|
|
2053
|
+
var createEntity = _a.createEntity;
|
|
2054
|
+
return tslib_1.__awaiter(void 0, void 0, void 0, function () {
|
|
2055
|
+
var e, r, item, _b;
|
|
2056
|
+
return tslib_1.__generator(this, function (_c) {
|
|
2057
|
+
switch (_c.label) {
|
|
2058
|
+
case 0:
|
|
2059
|
+
e = /** @class */ (function () {
|
|
2060
|
+
function class_9() {
|
|
2061
|
+
this.a = 0;
|
|
2062
|
+
this.items = [];
|
|
2063
|
+
}
|
|
2064
|
+
return class_9;
|
|
2065
|
+
}());
|
|
2066
|
+
(0, DecoratorReplacer_1.describeClass)(e, (0, remult3_1.Entity)("testJsonFieldType3", { allowApiCrud: true }), {
|
|
2067
|
+
a: remult3_1.Fields.number(),
|
|
2068
|
+
items: remult3_1.Fields.object()
|
|
2069
|
+
});
|
|
2070
|
+
return [4 /*yield*/, createEntity(e)];
|
|
2071
|
+
case 1:
|
|
2072
|
+
r = _c.sent();
|
|
2073
|
+
return [4 /*yield*/, r.insert({ a: 1, items: ["a", "b"] })];
|
|
2074
|
+
case 2:
|
|
2075
|
+
_c.sent();
|
|
2076
|
+
return [4 /*yield*/, r.findFirst()];
|
|
2077
|
+
case 3:
|
|
2078
|
+
item = _c.sent();
|
|
2079
|
+
expect(item.items).toEqual(["a", "b"]);
|
|
2080
|
+
_b = expect;
|
|
2081
|
+
return [4 /*yield*/, r.count({ items: { $contains: "b" } })];
|
|
2082
|
+
case 4:
|
|
2083
|
+
_b.apply(void 0, [_c.sent()]).toBe(1);
|
|
2084
|
+
return [2 /*return*/];
|
|
2085
|
+
}
|
|
2086
|
+
});
|
|
2087
|
+
});
|
|
2088
|
+
}, false, {
|
|
2089
|
+
exclude: [db_tests_setup_1.TestDbs.mongo]
|
|
2090
|
+
});
|