Compare commits

...

6 Commits

Author SHA1 Message Date
85f0d99934 3.1.47 2020-09-09 05:05:42 +00:00
3b2d3d9072 fix(core): update 2020-09-09 05:05:41 +00:00
3ff5c36fdf 3.1.46 2020-09-09 05:00:10 +00:00
a5acc2fe4e fix(core): update 2020-09-09 05:00:09 +00:00
9c81257101 3.1.45 2020-09-09 04:51:57 +00:00
f7342962f4 fix(core): update 2020-09-09 04:51:56 +00:00
3 changed files with 20 additions and 4 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "@pushrocks/smartdata",
"version": "3.1.44",
"version": "3.1.47",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "@pushrocks/smartdata",
"version": "3.1.44",
"version": "3.1.47",
"private": false,
"description": "do more with data",
"main": "dist_ts/index.js",

View File

@ -66,6 +66,11 @@ class Car extends smartdata.SmartDataDbDoc<Car, Car> {
@smartdata.svDb()
public brand: string;
@smartdata.svDb()
deepData = {
sodeep: 'yes'
};
constructor(colorArg: string, brandArg: string) {
super();
this.color = colorArg;
@ -97,10 +102,21 @@ tap.test('expect to get instance of Car', async () => {
const myCars = await Car.getInstances<Car>({
brand: 'Volvo',
});
expect(myCars[0].color).to.equal('red');
console.log(`took ${Date.now() - timeStart}`);
counter++;
} while (counter < 2000);
} while (counter < 30);
});
tap.test('expect to get instance of Car', async () => {
let counter = 0;
do {
const timeStart = Date.now();
const myCars2 = await Car.getInstances<Car>({
'deepData.sodeep': 'yes',
} as any);
console.log(`took ${Date.now() - timeStart}`);
counter++;
} while (counter < 30);
});
tap.test('expect to get instance of Car and update it', async () => {