@nymphjs/nymph 1.0.0-beta.9 → 1.0.0-beta.91
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 +436 -0
- package/README.md +10 -20
- package/dist/Entity.d.ts +277 -10
- package/dist/Entity.js +543 -148
- package/dist/Entity.js.map +1 -1
- package/dist/Entity.test.js +53 -13
- package/dist/Entity.test.js.map +1 -1
- package/dist/Entity.types.d.ts +249 -23
- package/dist/Entity.types.js +1 -2
- package/dist/Nymph.d.ts +431 -12
- package/dist/Nymph.js +692 -180
- package/dist/Nymph.js.map +1 -1
- package/dist/Nymph.types.d.ts +65 -7
- package/dist/Nymph.types.js +3 -5
- package/dist/Nymph.types.js.map +1 -1
- package/dist/conf/d.d.ts +43 -0
- package/dist/conf/d.js +1 -2
- package/dist/conf/defaults.d.ts +1 -1
- package/dist/conf/defaults.js +26 -3
- package/dist/conf/defaults.js.map +1 -1
- package/dist/conf/index.d.ts +2 -2
- package/dist/conf/index.js +2 -8
- package/dist/conf/index.js.map +1 -1
- package/dist/driver/NymphDriver.d.ts +137 -39
- package/dist/driver/NymphDriver.js +344 -194
- package/dist/driver/NymphDriver.js.map +1 -1
- package/dist/driver/index.d.ts +2 -2
- package/dist/driver/index.js +3 -23
- package/dist/driver/index.js.map +1 -1
- package/dist/driver/testArtifacts.d.ts +2 -2
- package/dist/driver/testArtifacts.js +557 -92
- package/dist/driver/testArtifacts.js.map +1 -1
- package/dist/errors/ClassNotAvailableError.js +1 -5
- package/dist/errors/ClassNotAvailableError.js.map +1 -1
- package/dist/errors/EntityConflictError.js +1 -5
- package/dist/errors/EntityConflictError.js.map +1 -1
- package/dist/errors/EntityInvalidDataError.d.ts +6 -0
- package/dist/errors/EntityInvalidDataError.js +8 -6
- package/dist/errors/EntityInvalidDataError.js.map +1 -1
- package/dist/errors/EntityIsSleepingReferenceError.js +1 -5
- package/dist/errors/EntityIsSleepingReferenceError.js.map +1 -1
- package/dist/errors/EntityUniqueConstraintError.d.ts +3 -0
- package/dist/errors/EntityUniqueConstraintError.js +7 -0
- package/dist/errors/EntityUniqueConstraintError.js.map +1 -0
- package/dist/errors/InvalidParametersError.js +1 -5
- package/dist/errors/InvalidParametersError.js.map +1 -1
- package/dist/errors/InvalidStateError.d.ts +3 -0
- package/dist/errors/InvalidStateError.js +7 -0
- package/dist/errors/InvalidStateError.js.map +1 -0
- package/dist/errors/NotConfiguredError.js +1 -5
- package/dist/errors/NotConfiguredError.js.map +1 -1
- package/dist/errors/QueryFailedError.js +2 -5
- package/dist/errors/QueryFailedError.js.map +1 -1
- package/dist/errors/UnableToConnectError.js +1 -5
- package/dist/errors/UnableToConnectError.js.map +1 -1
- package/dist/errors/index.d.ts +10 -8
- package/dist/errors/index.js +10 -24
- package/dist/errors/index.js.map +1 -1
- package/dist/index.d.ts +11 -11
- package/dist/index.js +14 -34
- package/dist/index.js.map +1 -1
- package/dist/nymphJoiProps.js +10 -15
- package/dist/nymphJoiProps.js.map +1 -1
- package/dist/testArtifacts.d.ts +18 -6
- package/dist/testArtifacts.js +32 -37
- package/dist/testArtifacts.js.map +1 -1
- package/dist/testMocks.d.ts +15 -12
- package/dist/testMocks.js +40 -29
- package/dist/testMocks.js.map +1 -1
- package/dist/utils.d.ts +4 -4
- package/dist/utils.js +40 -29
- package/dist/utils.js.map +1 -1
- package/jest.config.js +11 -2
- package/package.json +22 -19
- package/src/Entity.test.ts +52 -7
- package/src/Entity.ts +458 -147
- package/src/Entity.types.ts +64 -74
- package/src/Nymph.ts +754 -321
- package/src/Nymph.types.ts +131 -26
- package/src/conf/d.ts +25 -0
- package/src/conf/defaults.ts +34 -1
- package/src/conf/index.ts +2 -2
- package/src/driver/NymphDriver.ts +362 -359
- package/src/driver/index.ts +2 -2
- package/src/driver/testArtifacts.ts +609 -185
- package/src/errors/EntityUniqueConstraintError.ts +6 -0
- package/src/errors/InvalidStateError.ts +6 -0
- package/src/errors/index.ts +12 -8
- package/src/index.ts +11 -11
- package/src/nymphJoiProps.ts +2 -2
- package/src/testArtifacts.ts +19 -20
- package/src/testMocks.ts +60 -35
- package/src/type/locutus.d.ts +3 -0
- package/src/utils.ts +39 -18
- package/tsconfig.json +5 -3
- package/typedoc.json +4 -0
|
@@ -1,34 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
const
|
|
13
|
-
const TestBModel = nymph.addEntityClass(testArtifacts_1.TestBModel);
|
|
1
|
+
import { dirname } from 'node:path';
|
|
2
|
+
import { fileURLToPath } from 'node:url';
|
|
3
|
+
import fs from 'node:fs';
|
|
4
|
+
import strtotime from 'locutus/php/datetime/strtotime.js';
|
|
5
|
+
import { guid } from '@nymphjs/guid';
|
|
6
|
+
import { EntityUniqueConstraintError } from '../errors/index.js';
|
|
7
|
+
import { TestBModel as TestBModelClass, TestModel as TestModelClass, TestEmptyModel as TestEmptyModelClass, } from '../testArtifacts.js';
|
|
8
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
9
|
+
export function EntitiesTest(nymph, it) {
|
|
10
|
+
const TestModel = nymph.addEntityClass(TestModelClass);
|
|
11
|
+
const TestBModel = nymph.addEntityClass(TestBModelClass);
|
|
12
|
+
const TestEmptyModel = nymph.addEntityClass(TestEmptyModelClass);
|
|
14
13
|
let testEntity;
|
|
15
14
|
let testGuid;
|
|
16
15
|
let refGuid;
|
|
17
16
|
let createdMultiple = false;
|
|
17
|
+
// The entities created by this function are required by many of the tests.
|
|
18
18
|
async function createTestEntities() {
|
|
19
19
|
if (testGuid != null) {
|
|
20
20
|
return;
|
|
21
21
|
}
|
|
22
|
+
// Creating entity...
|
|
22
23
|
testEntity = await TestModel.factory();
|
|
24
|
+
// Saving entity...
|
|
23
25
|
testEntity.name = 'Entity Test ' + new Date().toLocaleString();
|
|
24
26
|
testEntity.null = null;
|
|
25
27
|
testEntity.string = 'test';
|
|
26
|
-
testEntity.array = [
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
testEntity.array = [
|
|
29
|
+
'full',
|
|
30
|
+
'of',
|
|
31
|
+
'values',
|
|
32
|
+
500,
|
|
33
|
+
{ test: true },
|
|
34
|
+
{ nullbyte: '\\\x00\u0000 \x00' },
|
|
35
|
+
];
|
|
36
|
+
testEntity.match = matchValue;
|
|
32
37
|
testEntity.number = 30;
|
|
33
38
|
testEntity.numberString = '30';
|
|
34
39
|
testEntity.timestamp = Date.now();
|
|
@@ -37,7 +42,7 @@ This one's zip code is 92064.`;
|
|
|
37
42
|
testGuid = testEntity.guid;
|
|
38
43
|
const entityReferenceTest = new TestModel();
|
|
39
44
|
entityReferenceTest.string = 'wrong';
|
|
40
|
-
entityReferenceTest.timestamp = (
|
|
45
|
+
entityReferenceTest.timestamp = strtotime('-2 days') * 1000;
|
|
41
46
|
expect(await entityReferenceTest.$save()).toEqual(true);
|
|
42
47
|
refGuid = entityReferenceTest.guid;
|
|
43
48
|
testEntity.reference = entityReferenceTest;
|
|
@@ -45,38 +50,53 @@ This one's zip code is 92064.`;
|
|
|
45
50
|
expect(await testEntity.$save()).toEqual(true);
|
|
46
51
|
entityReferenceTest.test = 'good';
|
|
47
52
|
expect(await entityReferenceTest.$save()).toEqual(true);
|
|
48
|
-
|
|
49
|
-
expect(testEntity).toBeInstanceOf(TestModel);
|
|
50
|
-
expect(testEntity.guid).toEqual(testGuid);
|
|
53
|
+
// Test asynchronous getEntity.
|
|
51
54
|
testEntity = (await nymph.getEntity({ class: TestModel }, testGuid));
|
|
52
55
|
expect(testEntity).toBeInstanceOf(TestModel);
|
|
53
56
|
expect(testEntity.guid).toEqual(testGuid);
|
|
54
57
|
}
|
|
58
|
+
// The entities created by this function are required by many of the tests.
|
|
55
59
|
async function createMultipleTestEntities() {
|
|
56
60
|
if (!createdMultiple) {
|
|
57
61
|
createdMultiple = true;
|
|
62
|
+
// Creating 100 entities...
|
|
58
63
|
for (let i = 0; i < 100; i++) {
|
|
59
64
|
const testEntity = await TestModel.factory();
|
|
60
65
|
testEntity.name = `Multi Test ${i}`;
|
|
66
|
+
// Reverse the number for sort testing.
|
|
67
|
+
testEntity.number = 100 - i;
|
|
61
68
|
testEntity.$removeTag('test');
|
|
62
69
|
testEntity.$addTag('multiTest');
|
|
63
70
|
expect(await testEntity.$save()).toEqual(true);
|
|
71
|
+
// Pause for a few milliseconds so the cdate and mdate can be sorted.
|
|
64
72
|
await new Promise((res) => setTimeout(() => res(1), 5));
|
|
65
73
|
}
|
|
66
74
|
}
|
|
67
75
|
}
|
|
68
76
|
it('delete old test data', async () => {
|
|
69
|
-
let
|
|
70
|
-
expect(Array.isArray(
|
|
71
|
-
for (const cur of
|
|
77
|
+
let amodels = await nymph.getEntities({ class: TestModel });
|
|
78
|
+
expect(Array.isArray(amodels)).toEqual(true);
|
|
79
|
+
for (const cur of amodels) {
|
|
72
80
|
expect(await cur.$delete()).toEqual(true);
|
|
73
81
|
}
|
|
74
|
-
|
|
75
|
-
expect(
|
|
82
|
+
amodels = await nymph.getEntities({ class: TestModel });
|
|
83
|
+
expect(amodels.length).toEqual(0);
|
|
84
|
+
let bmodels = await nymph.getEntities({ class: TestBModel });
|
|
85
|
+
expect(Array.isArray(bmodels)).toEqual(true);
|
|
86
|
+
for (const cur of bmodels) {
|
|
87
|
+
expect(await cur.$delete()).toEqual(true);
|
|
88
|
+
}
|
|
89
|
+
bmodels = await nymph.getEntities({ class: TestBModel });
|
|
90
|
+
expect(bmodels.length).toEqual(0);
|
|
76
91
|
});
|
|
77
92
|
it('create entity', async () => {
|
|
78
93
|
await createTestEntities();
|
|
79
94
|
});
|
|
95
|
+
it("doesn't create empty entity", async () => {
|
|
96
|
+
const testEntity = await TestEmptyModel.factory();
|
|
97
|
+
expect(await testEntity.$save()).toBeFalsy();
|
|
98
|
+
expect(testEntity.guid).toBeNull();
|
|
99
|
+
});
|
|
80
100
|
it('update mdate on save', async () => {
|
|
81
101
|
await createTestEntities();
|
|
82
102
|
const oldMdate = testEntity.mdate ?? Infinity;
|
|
@@ -89,15 +109,42 @@ This one's zip code is 92064.`;
|
|
|
89
109
|
});
|
|
90
110
|
it('by guid', async () => {
|
|
91
111
|
await createTestEntities();
|
|
112
|
+
// Retrieving entity by GUID...
|
|
92
113
|
let resultEntity = await nymph.getEntity({ class: TestModel }, testGuid);
|
|
93
114
|
expect(testEntity.$is(resultEntity)).toEqual(true);
|
|
115
|
+
// Using class constructor...
|
|
94
116
|
resultEntity = await TestModel.factory(testGuid);
|
|
95
117
|
expect(testEntity.$is(resultEntity)).toEqual(true);
|
|
96
|
-
|
|
118
|
+
// Testing wrong GUID...
|
|
119
|
+
resultEntity = await nymph.getEntity({ class: TestModel }, guid());
|
|
97
120
|
expect(testEntity.$is(resultEntity)).toEqual(false);
|
|
98
121
|
});
|
|
122
|
+
it('guaranteed guid', async () => {
|
|
123
|
+
// Creating entity...
|
|
124
|
+
const testEntity = await TestModel.factory();
|
|
125
|
+
// Saving entity...
|
|
126
|
+
testEntity.name = 'Entity Test ' + new Date().toLocaleString();
|
|
127
|
+
testEntity.null = null;
|
|
128
|
+
testEntity.string = 'test';
|
|
129
|
+
testEntity.array = [];
|
|
130
|
+
testEntity.match = matchValue;
|
|
131
|
+
testEntity.number = 30;
|
|
132
|
+
testEntity.numberString = '30';
|
|
133
|
+
testEntity.timestamp = Date.now();
|
|
134
|
+
// Get the guaranteed GUID.
|
|
135
|
+
const testGuid = testEntity.$getGuaranteedGUID();
|
|
136
|
+
expect(await testEntity.$save()).toEqual(true);
|
|
137
|
+
expect(testEntity.guid).not.toBeNull();
|
|
138
|
+
expect(testEntity.guid).toEqual(testGuid);
|
|
139
|
+
// Retrieving entity by GUID...
|
|
140
|
+
let resultEntity = await nymph.getEntity({ class: TestModel }, testGuid);
|
|
141
|
+
expect(testEntity.$is(resultEntity)).toEqual(true);
|
|
142
|
+
// Delete the entity.
|
|
143
|
+
expect(await testEntity.$delete()).toEqual(true);
|
|
144
|
+
});
|
|
99
145
|
it('transactions', async () => {
|
|
100
146
|
await createTestEntities();
|
|
147
|
+
// Verify not in a transaction.
|
|
101
148
|
expect(await nymph.inTransaction()).toEqual(false);
|
|
102
149
|
let transaction = await nymph.startTransaction('test');
|
|
103
150
|
testEntity.$nymph = transaction;
|
|
@@ -106,37 +153,56 @@ This one's zip code is 92064.`;
|
|
|
106
153
|
await transaction.rollback('test');
|
|
107
154
|
return;
|
|
108
155
|
}
|
|
156
|
+
// Change a value in the test entity.
|
|
109
157
|
testEntity.string = 'bad value';
|
|
110
158
|
expect(await testEntity.$save()).toEqual(true);
|
|
159
|
+
// Rollback the transaction.
|
|
111
160
|
await transaction.rollback('test');
|
|
161
|
+
// Verify not in a transaction.
|
|
112
162
|
expect(await transaction.inTransaction()).toEqual(false);
|
|
163
|
+
// Verify the value is correct.
|
|
113
164
|
await testEntity.$refresh();
|
|
114
165
|
expect(testEntity.string).toEqual('test');
|
|
166
|
+
// Start a new transaction.
|
|
115
167
|
transaction = await nymph.startTransaction('test');
|
|
116
168
|
testEntity.$nymph = transaction;
|
|
169
|
+
// Verify in a transaction.
|
|
117
170
|
expect(await transaction.inTransaction()).toEqual(true);
|
|
171
|
+
// Delete the entity.
|
|
118
172
|
expect(await testEntity.$delete()).toEqual(true);
|
|
119
173
|
const resultEntity = await transaction.getEntity({ class: TestModel }, testGuid);
|
|
120
174
|
expect(resultEntity).toBeNull();
|
|
175
|
+
// Rollback the transaction.
|
|
121
176
|
await transaction.rollback('test');
|
|
177
|
+
// Verify not in a transaction.
|
|
122
178
|
expect(await transaction.inTransaction()).toEqual(false);
|
|
179
|
+
// Verify it's back.
|
|
123
180
|
testEntity = (await transaction.getEntity({ class: TestModel }, testGuid));
|
|
124
181
|
expect(testEntity.guid).toEqual(testGuid);
|
|
125
|
-
transaction
|
|
182
|
+
// Start a new transaction with a dot in the name.
|
|
183
|
+
transaction = await nymph.startTransaction('test.1');
|
|
126
184
|
testEntity.$nymph = transaction;
|
|
185
|
+
// Verify in a transaction.
|
|
127
186
|
expect(await transaction.inTransaction()).toEqual(true);
|
|
187
|
+
// Make a change.
|
|
128
188
|
testEntity.string = 'fish';
|
|
129
189
|
expect(await testEntity.$save()).toEqual(true);
|
|
130
|
-
|
|
190
|
+
// Commit the transaction.
|
|
191
|
+
await transaction.commit('test.1');
|
|
131
192
|
testEntity.$nymph = nymph;
|
|
193
|
+
// Verify not in a transaction.
|
|
132
194
|
expect(await transaction.inTransaction()).toEqual(false);
|
|
195
|
+
// Verify the value is correct.
|
|
133
196
|
await testEntity.$refresh();
|
|
134
197
|
expect(testEntity.string).toEqual('fish');
|
|
198
|
+
// Finally, change it back.
|
|
135
199
|
testEntity.string = 'test';
|
|
136
200
|
expect(await testEntity.$save()).toEqual(true);
|
|
201
|
+
// TODO: nested transactions
|
|
137
202
|
});
|
|
138
203
|
it('options', async () => {
|
|
139
204
|
await createTestEntities();
|
|
205
|
+
// Testing entity order, offset, limit...
|
|
140
206
|
const resultEntities = await nymph.getEntities({
|
|
141
207
|
class: TestModel,
|
|
142
208
|
reverse: true,
|
|
@@ -149,99 +215,149 @@ This one's zip code is 92064.`;
|
|
|
149
215
|
});
|
|
150
216
|
it('guid and tags', async () => {
|
|
151
217
|
await createTestEntities();
|
|
218
|
+
// Retrieving entity by GUID and tags...
|
|
152
219
|
const resultEntity = await nymph.getEntity({ class: TestModel }, { type: '&', guid: testGuid, tag: 'test' });
|
|
153
220
|
expect(testEntity.$is(resultEntity)).toEqual(true);
|
|
154
221
|
});
|
|
155
222
|
it('or selector', async () => {
|
|
156
223
|
await createTestEntities();
|
|
157
|
-
|
|
224
|
+
// Retrieving entity by GUID and tags...
|
|
225
|
+
const resultEntity = await nymph.getEntity({ class: TestModel }, { type: '|', guid: [testGuid, guid()] });
|
|
158
226
|
expect(testEntity.$is(resultEntity)).toEqual(true);
|
|
159
227
|
});
|
|
160
228
|
it('wrong or selector', async () => {
|
|
161
229
|
await createTestEntities();
|
|
162
|
-
|
|
230
|
+
// Retrieving entity by GUID and tags...
|
|
231
|
+
const resultEntity = await nymph.getEntity({ class: TestModel }, { type: '|', guid: [guid(), guid()] });
|
|
163
232
|
expect(testEntity.$is(resultEntity)).toEqual(false);
|
|
164
233
|
});
|
|
165
234
|
it('not guid', async () => {
|
|
166
235
|
await createTestEntities();
|
|
167
|
-
|
|
236
|
+
// Retrieving entity by !GUID...
|
|
237
|
+
const resultEntity = await nymph.getEntities({ class: TestModel }, { type: '&', '!guid': guid(), tag: 'test' });
|
|
168
238
|
expect(testEntity.$inArray(resultEntity)).toEqual(true);
|
|
169
239
|
});
|
|
170
240
|
it('not tags', async () => {
|
|
171
241
|
await createTestEntities();
|
|
242
|
+
// Retrieving entity by !tags...
|
|
172
243
|
const resultEntity = await nymph.getEntities({ class: TestModel }, { type: '&', guid: testGuid, '!tag': ['barbecue', 'pickles'] });
|
|
173
244
|
expect(testEntity.$inArray(resultEntity)).toEqual(true);
|
|
174
245
|
});
|
|
175
246
|
it('guid and wrong tags', async () => {
|
|
176
247
|
await createTestEntities();
|
|
248
|
+
// Testing GUID and wrong tags...
|
|
177
249
|
const resultEntity = await nymph.getEntity({ class: TestModel }, { type: '&', guid: testGuid, tag: ['pickles'] });
|
|
178
250
|
expect(resultEntity).toBeNull();
|
|
179
251
|
});
|
|
180
252
|
it('tags', async () => {
|
|
181
253
|
await createTestEntities();
|
|
254
|
+
// Retrieving entity by tags...
|
|
182
255
|
const resultEntity = await nymph.getEntities({ class: TestModel }, { type: '&', tag: 'test' });
|
|
183
256
|
expect(testEntity.$inArray(resultEntity)).toEqual(true);
|
|
184
257
|
});
|
|
185
258
|
it('wrong tags', async () => {
|
|
186
259
|
await createTestEntities();
|
|
260
|
+
// Testing wrong tags...
|
|
187
261
|
const resultEntity = await nymph.getEntities({ class: TestModel }, { type: '&', tag: 'pickles' });
|
|
188
262
|
expect(testEntity.$inArray(resultEntity)).toEqual(false);
|
|
189
263
|
});
|
|
190
264
|
it('inclusive tags', async () => {
|
|
191
265
|
await createTestEntities();
|
|
266
|
+
// Retrieving entity by tags inclusively...
|
|
192
267
|
const resultEntity = await nymph.getEntities({ class: TestModel }, { type: '|', tag: ['pickles', 'test', 'barbecue'] });
|
|
193
268
|
expect(testEntity.$inArray(resultEntity)).toEqual(true);
|
|
194
269
|
});
|
|
195
270
|
it('wrong inclusive tags', async () => {
|
|
196
271
|
await createTestEntities();
|
|
272
|
+
// Testing wrong inclusive tags...
|
|
197
273
|
const resultEntity = await nymph.getEntities({ class: TestModel }, { type: '|', tag: ['pickles', 'barbecue'] });
|
|
198
274
|
expect(testEntity.$inArray(resultEntity)).toEqual(false);
|
|
199
275
|
});
|
|
200
276
|
it('mixed tags', async () => {
|
|
201
277
|
await createTestEntities();
|
|
278
|
+
// Retrieving entity by mixed tags...
|
|
202
279
|
const resultEntity = await nymph.getEntities({ class: TestModel }, { type: '&', tag: 'test' }, { type: '|', tag: ['pickles', 'test', 'barbecue'] });
|
|
203
280
|
expect(testEntity.$inArray(resultEntity)).toEqual(true);
|
|
204
281
|
});
|
|
205
282
|
it('wrong inclusive mixed tags', async () => {
|
|
206
283
|
await createTestEntities();
|
|
284
|
+
// Testing wrong inclusive mixed tags...
|
|
207
285
|
const resultEntity = await nymph.getEntities({ class: TestModel }, { type: '&', tag: 'test' }, { type: '|', tag: ['pickles', 'barbecue'] });
|
|
208
286
|
expect(testEntity.$inArray(resultEntity)).toEqual(false);
|
|
209
287
|
});
|
|
210
288
|
it('wrong exclusive mixed tags', async () => {
|
|
211
289
|
await createTestEntities();
|
|
290
|
+
// Testing wrong exclusive mixed tags...
|
|
212
291
|
const resultEntity = await nymph.getEntities({ class: TestModel }, { type: '&', tag: 'pickles' }, { type: '|', tag: ['test', 'barbecue'] });
|
|
213
292
|
expect(testEntity.$inArray(resultEntity)).toEqual(false);
|
|
214
293
|
});
|
|
215
294
|
it('defined', async () => {
|
|
216
295
|
await createTestEntities();
|
|
296
|
+
// Retrieving entity by defined...
|
|
217
297
|
const resultEntity = await nymph.getEntities({ class: TestModel }, { type: '&', defined: 'string' });
|
|
218
298
|
expect(testEntity.$inArray(resultEntity)).toEqual(true);
|
|
219
299
|
});
|
|
220
300
|
it('not defined', async () => {
|
|
221
301
|
await createTestEntities();
|
|
302
|
+
// Retrieving entity by !defined...
|
|
222
303
|
const resultEntity = await nymph.getEntities({ class: TestModel }, { type: '&', tag: 'test', '!defined': 'pickles' });
|
|
223
304
|
expect(testEntity.$inArray(resultEntity)).toEqual(true);
|
|
224
305
|
});
|
|
225
306
|
it('defined in a not and clause', async () => {
|
|
226
307
|
await createTestEntities();
|
|
308
|
+
// Retrieving entity by defined in not and clause...
|
|
227
309
|
const resultEntity = await nymph.getEntities({ class: TestModel }, { type: '!&', defined: 'pickles' }, { type: '&', tag: 'test' });
|
|
228
310
|
expect(testEntity.$inArray(resultEntity)).toEqual(true);
|
|
229
311
|
});
|
|
230
312
|
it('equal', async () => {
|
|
231
313
|
await createTestEntities();
|
|
232
|
-
|
|
314
|
+
// Retrieving entity by equal...
|
|
315
|
+
let resultEntity = await nymph.getEntities({ class: TestModel }, { type: '&', equal: ['string', 'test'] });
|
|
316
|
+
expect(testEntity.$inArray(resultEntity)).toEqual(true);
|
|
317
|
+
// Retrieving entity by equal...
|
|
318
|
+
resultEntity = await nymph.getEntities({ class: TestModel }, { type: '&', equal: ['null', null] });
|
|
319
|
+
expect(testEntity.$inArray(resultEntity)).toEqual(true);
|
|
320
|
+
// Retrieving entity by equal...
|
|
321
|
+
resultEntity = await nymph.getEntities({ class: TestModel }, { type: '&', equal: ['boolean', true] });
|
|
322
|
+
expect(testEntity.$inArray(resultEntity)).toEqual(true);
|
|
323
|
+
// Retrieving entity by equal...
|
|
324
|
+
resultEntity = await nymph.getEntities({ class: TestModel }, { type: '&', equal: ['number', 30] });
|
|
325
|
+
expect(testEntity.$inArray(resultEntity)).toEqual(true);
|
|
326
|
+
// Retrieving entity by equal...
|
|
327
|
+
resultEntity = await nymph.getEntities({ class: TestModel }, {
|
|
328
|
+
type: '&',
|
|
329
|
+
equal: [
|
|
330
|
+
'array',
|
|
331
|
+
[
|
|
332
|
+
'full',
|
|
333
|
+
'of',
|
|
334
|
+
'values',
|
|
335
|
+
500,
|
|
336
|
+
{ test: true },
|
|
337
|
+
{ nullbyte: '\\\x00\u0000 \x00' },
|
|
338
|
+
],
|
|
339
|
+
],
|
|
340
|
+
});
|
|
341
|
+
expect(testEntity.$inArray(resultEntity)).toEqual(true);
|
|
342
|
+
// Retrieving entity by equal...
|
|
343
|
+
resultEntity = await nymph.getEntities({ class: TestModel }, {
|
|
344
|
+
type: '&',
|
|
345
|
+
equal: ['match', matchValue],
|
|
346
|
+
});
|
|
233
347
|
expect(testEntity.$inArray(resultEntity)).toEqual(true);
|
|
234
348
|
});
|
|
235
349
|
it('not equal', async () => {
|
|
236
350
|
await createTestEntities();
|
|
237
351
|
const referenceEntity = await TestModel.factory(refGuid);
|
|
238
352
|
expect(referenceEntity.guid).toEqual(refGuid);
|
|
353
|
+
// Retrieving entity by !equal...
|
|
239
354
|
const resultEntity = await nymph.getEntities({ class: TestModel }, { type: '&', tag: 'test', '!equal': ['string', 'wrong'] });
|
|
240
355
|
expect(testEntity.$inArray(resultEntity)).toEqual(true);
|
|
241
356
|
expect(referenceEntity.$inArray(resultEntity)).toEqual(false);
|
|
242
357
|
});
|
|
243
358
|
it('like', async () => {
|
|
244
359
|
await createTestEntities();
|
|
360
|
+
// Retrieving entity by like...
|
|
245
361
|
const resultEntity = await nymph.getEntities({ class: TestModel }, { type: '&', like: ['string', 't_s%'] });
|
|
246
362
|
expect(testEntity.$inArray(resultEntity)).toEqual(true);
|
|
247
363
|
});
|
|
@@ -249,12 +365,14 @@ This one's zip code is 92064.`;
|
|
|
249
365
|
await createTestEntities();
|
|
250
366
|
const referenceEntity = await TestModel.factory(refGuid);
|
|
251
367
|
expect(referenceEntity.guid).toEqual(refGuid);
|
|
368
|
+
// Retrieving entity by !like...
|
|
252
369
|
const resultEntity = await nymph.getEntities({ class: TestModel }, { type: '&', tag: 'test', '!like': ['string', 'wr_n%'] });
|
|
253
370
|
expect(testEntity.$inArray(resultEntity)).toEqual(true);
|
|
254
371
|
expect(referenceEntity.$inArray(resultEntity)).toEqual(false);
|
|
255
372
|
});
|
|
256
373
|
it('ilike', async () => {
|
|
257
374
|
await createTestEntities();
|
|
375
|
+
// Retrieving entity by ilike...
|
|
258
376
|
const resultEntity = await nymph.getEntities({ class: TestModel }, { type: '&', ilike: ['string', 'T_s%'] });
|
|
259
377
|
expect(testEntity.$inArray(resultEntity)).toEqual(true);
|
|
260
378
|
});
|
|
@@ -262,56 +380,71 @@ This one's zip code is 92064.`;
|
|
|
262
380
|
await createTestEntities();
|
|
263
381
|
const referenceEntity = await TestModel.factory(refGuid);
|
|
264
382
|
expect(referenceEntity.guid).toEqual(refGuid);
|
|
383
|
+
// Retrieving entity by !ilike...
|
|
265
384
|
const resultEntity = await nymph.getEntities({ class: TestModel }, { type: '&', tag: 'test', '!ilike': ['string', 'wr_n%'] });
|
|
266
385
|
expect(testEntity.$inArray(resultEntity)).toEqual(true);
|
|
267
386
|
expect(referenceEntity.$inArray(resultEntity)).toEqual(false);
|
|
268
387
|
});
|
|
269
388
|
it('like with wrong case', async () => {
|
|
270
389
|
await createTestEntities();
|
|
390
|
+
// Retrieving entity by like...
|
|
271
391
|
const resultEntity = await nymph.getEntities({ class: TestModel }, { type: '&', like: ['string', 'T_s%'] });
|
|
272
392
|
expect(testEntity.$inArray(resultEntity)).toEqual(false);
|
|
273
393
|
});
|
|
274
394
|
it('tags and equal', async () => {
|
|
275
395
|
await createTestEntities();
|
|
396
|
+
// Retrieving entity by tags and equal...
|
|
276
397
|
const resultEntity = await nymph.getEntities({ class: TestModel }, { type: '&', tag: 'test', equal: ['string', 'test'] });
|
|
277
398
|
expect(testEntity.$inArray(resultEntity)).toEqual(true);
|
|
278
399
|
});
|
|
279
400
|
it('wrong tags right equal', async () => {
|
|
280
401
|
await createTestEntities();
|
|
402
|
+
// Testing wrong tags and right equal...
|
|
281
403
|
const resultEntity = await nymph.getEntities({ class: TestModel }, { type: '&', tag: 'pickles', equal: ['string', 'test'] });
|
|
282
404
|
expect(testEntity.$inArray(resultEntity)).toEqual(false);
|
|
283
405
|
});
|
|
284
406
|
it('right tags wrong equal', async () => {
|
|
285
407
|
await createTestEntities();
|
|
408
|
+
// Testing right tags and wrong equal...
|
|
286
409
|
const resultEntity = await nymph.getEntities({ class: TestModel }, { type: '&', tag: 'test', equal: ['string', 'pickles'] });
|
|
287
410
|
expect(testEntity.$inArray(resultEntity)).toEqual(false);
|
|
288
411
|
});
|
|
289
412
|
it('wrong tags wrong equal', async () => {
|
|
290
413
|
await createTestEntities();
|
|
414
|
+
// Testing wrong tags and wrong equal...
|
|
291
415
|
const resultEntity = await nymph.getEntities({ class: TestModel }, { type: '&', tag: 'pickles', equal: ['string', 'pickles'] });
|
|
292
416
|
expect(testEntity.$inArray(resultEntity)).toEqual(false);
|
|
293
417
|
});
|
|
294
418
|
it('contain', async () => {
|
|
295
419
|
await createTestEntities();
|
|
420
|
+
// Retrieving entity by contain...
|
|
296
421
|
let resultEntity = await nymph.getEntities({ class: TestModel }, { type: '&', contain: ['array', 'values'] });
|
|
297
422
|
expect(testEntity.$inArray(resultEntity)).toEqual(true);
|
|
298
|
-
|
|
423
|
+
// Retrieving entity by contain...
|
|
424
|
+
resultEntity = await nymph.getEntities({ class: TestModel }, { type: '&', contain: ['array', 500] });
|
|
425
|
+
expect(testEntity.$inArray(resultEntity)).toEqual(true);
|
|
426
|
+
// Retrieving entity by contain...
|
|
427
|
+
resultEntity = await nymph.getEntities({ class: TestModel }, { type: '&', contain: ['array', { test: true }] });
|
|
299
428
|
expect(testEntity.$inArray(resultEntity)).toEqual(true);
|
|
300
429
|
});
|
|
301
430
|
it('not contain', async () => {
|
|
302
431
|
await createTestEntities();
|
|
432
|
+
// Retrieving entity by !contain...
|
|
303
433
|
const resultEntity = await nymph.getEntities({ class: TestModel }, { type: '&', tag: 'test' }, { type: '!&', contain: ['array', 'pickles'] });
|
|
304
434
|
expect(testEntity.$inArray(resultEntity)).toEqual(true);
|
|
305
435
|
});
|
|
306
436
|
it('wrong contain', async () => {
|
|
307
437
|
await createTestEntities();
|
|
438
|
+
// Testing wrong contain...
|
|
308
439
|
let resultEntity = await nymph.getEntities({ class: TestModel }, { type: '&', contain: ['array', 'pickles'] });
|
|
309
440
|
expect(testEntity.$inArray(resultEntity)).toEqual(false);
|
|
441
|
+
// Testing wrong contain...
|
|
310
442
|
resultEntity = await nymph.getEntities({ class: TestModel }, { type: '&', contain: ['string', 'pickles'] });
|
|
311
443
|
expect(testEntity.$inArray(resultEntity)).toEqual(false);
|
|
312
444
|
});
|
|
313
445
|
it('match', async () => {
|
|
314
446
|
await createTestEntities();
|
|
447
|
+
// Retrieving entity by regex match...
|
|
315
448
|
let resultEntity = await nymph.getEntities({ class: TestModel }, { type: '&', match: ['match', '.*'] });
|
|
316
449
|
expect(testEntity.$inArray(resultEntity)).toEqual(true);
|
|
317
450
|
resultEntity = await nymph.getEntities({ class: TestModel }, { type: '&', tag: 'test', match: ['match', 'Edward McCheese'] });
|
|
@@ -339,12 +472,14 @@ This one's zip code is 92064.`;
|
|
|
339
472
|
});
|
|
340
473
|
it('imatch', async () => {
|
|
341
474
|
await createTestEntities();
|
|
475
|
+
// Retrieving entity by regex match...
|
|
342
476
|
const resultEntity = await nymph.getEntities({ class: TestModel }, { type: '&', tag: 'test', imatch: ['match', 'edward mccheese'] });
|
|
343
477
|
expect(testEntity.$inArray(resultEntity)).toEqual(true);
|
|
344
478
|
});
|
|
345
479
|
it('wrong match', async () => {
|
|
346
480
|
await createTestEntities();
|
|
347
|
-
|
|
481
|
+
// Testing wrong regex match...
|
|
482
|
+
let resultEntity = await nymph.getEntities({ class: TestModel }, { type: '&', match: ['match', '='] });
|
|
348
483
|
expect(testEntity.$inArray(resultEntity)).toEqual(false);
|
|
349
484
|
resultEntity = await nymph.getEntities({ class: TestModel }, { type: '&', tag: 'pickle', match: ['match', '.*'] });
|
|
350
485
|
expect(testEntity.$inArray(resultEntity)).toEqual(false);
|
|
@@ -359,16 +494,19 @@ This one's zip code is 92064.`;
|
|
|
359
494
|
});
|
|
360
495
|
it('match wrong case', async () => {
|
|
361
496
|
await createTestEntities();
|
|
497
|
+
// Retrieving entity by regex match...
|
|
362
498
|
const resultEntity = await nymph.getEntities({ class: TestModel }, { type: '&', tag: 'test', match: ['match', 'edward mccheese'] });
|
|
363
499
|
expect(testEntity.$inArray(resultEntity)).toEqual(false);
|
|
364
500
|
});
|
|
365
501
|
it('match and equal inclusive', async () => {
|
|
366
502
|
await createTestEntities();
|
|
503
|
+
// Retrieving entity by regex + equal inclusively...
|
|
367
504
|
const resultEntity = await nymph.getEntities({ class: TestModel }, { type: '&', tag: 'test' }, { type: '|', equal: ['string', 'pickles'], match: ['string', 'test'] });
|
|
368
505
|
expect(testEntity.$inArray(resultEntity)).toEqual(true);
|
|
369
506
|
});
|
|
370
507
|
it('greater than', async () => {
|
|
371
508
|
await createTestEntities();
|
|
509
|
+
// Retrieving entity by inequality...
|
|
372
510
|
let resultEntity = await nymph.getEntities({ class: TestModel }, {
|
|
373
511
|
type: '|',
|
|
374
512
|
gt: [
|
|
@@ -377,6 +515,7 @@ This one's zip code is 92064.`;
|
|
|
377
515
|
],
|
|
378
516
|
});
|
|
379
517
|
expect(testEntity.$inArray(resultEntity)).toEqual(false);
|
|
518
|
+
// Retrieving entity by inequality...
|
|
380
519
|
resultEntity = await nymph.getEntities({ class: TestModel }, {
|
|
381
520
|
type: '|',
|
|
382
521
|
gt: [
|
|
@@ -385,6 +524,7 @@ This one's zip code is 92064.`;
|
|
|
385
524
|
],
|
|
386
525
|
});
|
|
387
526
|
expect(testEntity.$inArray(resultEntity)).toEqual(false);
|
|
527
|
+
// Retrieving entity by inequality...
|
|
388
528
|
resultEntity = await nymph.getEntities({ class: TestModel }, {
|
|
389
529
|
type: '|',
|
|
390
530
|
gt: [
|
|
@@ -393,6 +533,7 @@ This one's zip code is 92064.`;
|
|
|
393
533
|
],
|
|
394
534
|
});
|
|
395
535
|
expect(testEntity.$inArray(resultEntity)).toEqual(true);
|
|
536
|
+
// Retrieving entity by inequality...
|
|
396
537
|
resultEntity = await nymph.getEntities({ class: TestModel }, {
|
|
397
538
|
type: '|',
|
|
398
539
|
gt: [
|
|
@@ -401,6 +542,7 @@ This one's zip code is 92064.`;
|
|
|
401
542
|
],
|
|
402
543
|
});
|
|
403
544
|
expect(testEntity.$inArray(resultEntity)).toEqual(false);
|
|
545
|
+
// Retrieving entity by inequality...
|
|
404
546
|
resultEntity = await nymph.getEntities({ class: TestModel }, {
|
|
405
547
|
type: '|',
|
|
406
548
|
gt: [
|
|
@@ -409,6 +551,7 @@ This one's zip code is 92064.`;
|
|
|
409
551
|
],
|
|
410
552
|
});
|
|
411
553
|
expect(testEntity.$inArray(resultEntity)).toEqual(false);
|
|
554
|
+
// Retrieving entity by inequality...
|
|
412
555
|
resultEntity = await nymph.getEntities({ class: TestModel }, {
|
|
413
556
|
type: '|',
|
|
414
557
|
gt: [
|
|
@@ -420,6 +563,7 @@ This one's zip code is 92064.`;
|
|
|
420
563
|
});
|
|
421
564
|
it('greater than or equal', async () => {
|
|
422
565
|
await createTestEntities();
|
|
566
|
+
// Retrieving entity by inequality...
|
|
423
567
|
let resultEntity = await nymph.getEntities({ class: TestModel }, {
|
|
424
568
|
type: '|',
|
|
425
569
|
gte: [
|
|
@@ -428,6 +572,7 @@ This one's zip code is 92064.`;
|
|
|
428
572
|
],
|
|
429
573
|
});
|
|
430
574
|
expect(testEntity.$inArray(resultEntity)).toEqual(true);
|
|
575
|
+
// Retrieving entity by inequality...
|
|
431
576
|
resultEntity = await nymph.getEntities({ class: TestModel }, {
|
|
432
577
|
type: '|',
|
|
433
578
|
gte: [
|
|
@@ -436,6 +581,7 @@ This one's zip code is 92064.`;
|
|
|
436
581
|
],
|
|
437
582
|
});
|
|
438
583
|
expect(testEntity.$inArray(resultEntity)).toEqual(false);
|
|
584
|
+
// Retrieving entity by inequality...
|
|
439
585
|
resultEntity = await nymph.getEntities({ class: TestModel }, {
|
|
440
586
|
type: '|',
|
|
441
587
|
gte: [
|
|
@@ -444,6 +590,7 @@ This one's zip code is 92064.`;
|
|
|
444
590
|
],
|
|
445
591
|
});
|
|
446
592
|
expect(testEntity.$inArray(resultEntity)).toEqual(true);
|
|
593
|
+
// Retrieving entity by inequality...
|
|
447
594
|
resultEntity = await nymph.getEntities({ class: TestModel }, {
|
|
448
595
|
type: '|',
|
|
449
596
|
gte: [
|
|
@@ -452,6 +599,7 @@ This one's zip code is 92064.`;
|
|
|
452
599
|
],
|
|
453
600
|
});
|
|
454
601
|
expect(testEntity.$inArray(resultEntity)).toEqual(true);
|
|
602
|
+
// Retrieving entity by inequality...
|
|
455
603
|
resultEntity = await nymph.getEntities({ class: TestModel }, {
|
|
456
604
|
type: '|',
|
|
457
605
|
gte: [
|
|
@@ -460,6 +608,7 @@ This one's zip code is 92064.`;
|
|
|
460
608
|
],
|
|
461
609
|
});
|
|
462
610
|
expect(testEntity.$inArray(resultEntity)).toEqual(false);
|
|
611
|
+
// Retrieving entity by inequality...
|
|
463
612
|
resultEntity = await nymph.getEntities({ class: TestModel }, {
|
|
464
613
|
type: '|',
|
|
465
614
|
gte: [
|
|
@@ -471,6 +620,7 @@ This one's zip code is 92064.`;
|
|
|
471
620
|
});
|
|
472
621
|
it('less than', async () => {
|
|
473
622
|
await createTestEntities();
|
|
623
|
+
// Retrieving entity by inequality...
|
|
474
624
|
let resultEntity = await nymph.getEntities({ class: TestModel }, {
|
|
475
625
|
type: '|',
|
|
476
626
|
lt: [
|
|
@@ -479,6 +629,7 @@ This one's zip code is 92064.`;
|
|
|
479
629
|
],
|
|
480
630
|
});
|
|
481
631
|
expect(testEntity.$inArray(resultEntity)).toEqual(false);
|
|
632
|
+
// Retrieving entity by inequality...
|
|
482
633
|
resultEntity = await nymph.getEntities({ class: TestModel }, {
|
|
483
634
|
type: '|',
|
|
484
635
|
lt: [
|
|
@@ -487,6 +638,7 @@ This one's zip code is 92064.`;
|
|
|
487
638
|
],
|
|
488
639
|
});
|
|
489
640
|
expect(testEntity.$inArray(resultEntity)).toEqual(true);
|
|
641
|
+
// Retrieving entity by inequality...
|
|
490
642
|
resultEntity = await nymph.getEntities({ class: TestModel }, {
|
|
491
643
|
type: '|',
|
|
492
644
|
lt: [
|
|
@@ -495,6 +647,7 @@ This one's zip code is 92064.`;
|
|
|
495
647
|
],
|
|
496
648
|
});
|
|
497
649
|
expect(testEntity.$inArray(resultEntity)).toEqual(false);
|
|
650
|
+
// Retrieving entity by inequality...
|
|
498
651
|
resultEntity = await nymph.getEntities({ class: TestModel }, {
|
|
499
652
|
type: '|',
|
|
500
653
|
lt: [
|
|
@@ -503,6 +656,7 @@ This one's zip code is 92064.`;
|
|
|
503
656
|
],
|
|
504
657
|
});
|
|
505
658
|
expect(testEntity.$inArray(resultEntity)).toEqual(false);
|
|
659
|
+
// Retrieving entity by inequality...
|
|
506
660
|
resultEntity = await nymph.getEntities({ class: TestModel }, {
|
|
507
661
|
type: '|',
|
|
508
662
|
lt: [
|
|
@@ -511,6 +665,7 @@ This one's zip code is 92064.`;
|
|
|
511
665
|
],
|
|
512
666
|
});
|
|
513
667
|
expect(testEntity.$inArray(resultEntity)).toEqual(true);
|
|
668
|
+
// Retrieving entity by inequality...
|
|
514
669
|
resultEntity = await nymph.getEntities({ class: TestModel }, {
|
|
515
670
|
type: '|',
|
|
516
671
|
lt: [
|
|
@@ -522,6 +677,7 @@ This one's zip code is 92064.`;
|
|
|
522
677
|
});
|
|
523
678
|
it('less than or equal', async () => {
|
|
524
679
|
await createTestEntities();
|
|
680
|
+
// Retrieving entity by inequality...
|
|
525
681
|
let resultEntity = await nymph.getEntities({ class: TestModel }, {
|
|
526
682
|
type: '|',
|
|
527
683
|
lte: [
|
|
@@ -530,6 +686,7 @@ This one's zip code is 92064.`;
|
|
|
530
686
|
],
|
|
531
687
|
});
|
|
532
688
|
expect(testEntity.$inArray(resultEntity)).toEqual(true);
|
|
689
|
+
// Retrieving entity by inequality...
|
|
533
690
|
resultEntity = await nymph.getEntities({ class: TestModel }, {
|
|
534
691
|
type: '|',
|
|
535
692
|
lte: [
|
|
@@ -538,6 +695,7 @@ This one's zip code is 92064.`;
|
|
|
538
695
|
],
|
|
539
696
|
});
|
|
540
697
|
expect(testEntity.$inArray(resultEntity)).toEqual(true);
|
|
698
|
+
// Retrieving entity by inequality...
|
|
541
699
|
resultEntity = await nymph.getEntities({ class: TestModel }, {
|
|
542
700
|
type: '|',
|
|
543
701
|
lte: [
|
|
@@ -546,6 +704,7 @@ This one's zip code is 92064.`;
|
|
|
546
704
|
],
|
|
547
705
|
});
|
|
548
706
|
expect(testEntity.$inArray(resultEntity)).toEqual(false);
|
|
707
|
+
// Retrieving entity by inequality...
|
|
549
708
|
resultEntity = await nymph.getEntities({ class: TestModel }, {
|
|
550
709
|
type: '|',
|
|
551
710
|
lte: [
|
|
@@ -554,6 +713,7 @@ This one's zip code is 92064.`;
|
|
|
554
713
|
],
|
|
555
714
|
});
|
|
556
715
|
expect(testEntity.$inArray(resultEntity)).toEqual(true);
|
|
716
|
+
// Retrieving entity by inequality...
|
|
557
717
|
resultEntity = await nymph.getEntities({ class: TestModel }, {
|
|
558
718
|
type: '|',
|
|
559
719
|
lte: [
|
|
@@ -562,6 +722,7 @@ This one's zip code is 92064.`;
|
|
|
562
722
|
],
|
|
563
723
|
});
|
|
564
724
|
expect(testEntity.$inArray(resultEntity)).toEqual(true);
|
|
725
|
+
// Retrieving entity by inequality...
|
|
565
726
|
resultEntity = await nymph.getEntities({ class: TestModel }, {
|
|
566
727
|
type: '|',
|
|
567
728
|
lte: [
|
|
@@ -573,30 +734,36 @@ This one's zip code is 92064.`;
|
|
|
573
734
|
});
|
|
574
735
|
it('not inequality', async () => {
|
|
575
736
|
await createTestEntities();
|
|
737
|
+
// Retrieving entity by !inequality...
|
|
576
738
|
const resultEntity = await nymph.getEntities({ class: TestModel }, { type: '&', tag: 'test' }, { type: '!&', gte: ['number', 60] });
|
|
577
739
|
expect(testEntity.$inArray(resultEntity)).toEqual(true);
|
|
578
740
|
});
|
|
579
741
|
it('wrong inequality', async () => {
|
|
580
742
|
await createTestEntities();
|
|
743
|
+
// Testing wrong inequality...
|
|
581
744
|
const resultEntity = await nymph.getEntities({ class: TestModel }, { type: '&', lte: ['number', 29.99] });
|
|
582
745
|
expect(testEntity.$inArray(resultEntity)).toEqual(false);
|
|
583
746
|
});
|
|
584
747
|
it('greater than cdate', async () => {
|
|
585
748
|
await createTestEntities();
|
|
749
|
+
// Retrieving entity by time...
|
|
586
750
|
const resultEntity = await nymph.getEntities({ class: TestModel }, { type: '&', tag: 'test', gt: ['cdate', (testEntity.cdate ?? 0) - 120] });
|
|
587
751
|
expect(testEntity.$inArray(resultEntity)).toEqual(true);
|
|
588
752
|
});
|
|
589
753
|
it('wrong cdate', async () => {
|
|
590
754
|
await createTestEntities();
|
|
755
|
+
// Testing wrong time...
|
|
591
756
|
const resultEntity = await nymph.getEntities({ class: TestModel }, { type: '&', tag: 'test', gte: ['cdate', (testEntity.cdate ?? 0) + 1] });
|
|
592
757
|
expect(testEntity.$inArray(resultEntity)).toEqual(false);
|
|
593
758
|
});
|
|
594
759
|
it('time selector', async () => {
|
|
595
760
|
await createTestEntities();
|
|
596
761
|
const referenceEntity = await TestModel.factory(refGuid);
|
|
762
|
+
// Retrieving entity by relative time...
|
|
597
763
|
let resultEntity = await nymph.getEntities({ class: TestModel }, { type: '&', gt: ['timestamp', null, '-1 day'] });
|
|
598
764
|
expect(testEntity.$inArray(resultEntity)).toEqual(true);
|
|
599
765
|
expect(referenceEntity.$inArray(resultEntity)).toEqual(false);
|
|
766
|
+
// Retrieving entity by relative time inclusively...
|
|
600
767
|
resultEntity = await nymph.getEntities({ class: TestModel }, {
|
|
601
768
|
type: '|',
|
|
602
769
|
gt: [
|
|
@@ -606,9 +773,11 @@ This one's zip code is 92064.`;
|
|
|
606
773
|
});
|
|
607
774
|
expect(testEntity.$inArray(resultEntity)).toEqual(true);
|
|
608
775
|
expect(referenceEntity.$inArray(resultEntity)).toEqual(false);
|
|
776
|
+
// Retrieving entity by relative time...
|
|
609
777
|
resultEntity = await nymph.getEntities({ class: TestModel }, { type: '&', gt: ['timestamp', null, '-3 days'] });
|
|
610
778
|
expect(testEntity.$inArray(resultEntity)).toEqual(true);
|
|
611
779
|
expect(referenceEntity.$inArray(resultEntity)).toEqual(true);
|
|
780
|
+
// Retrieving entity by relative time...
|
|
612
781
|
resultEntity = await nymph.getEntities({ class: TestModel }, { type: '&', gt: ['cdate', null, '-1 day'] });
|
|
613
782
|
expect(testEntity.$inArray(resultEntity)).toEqual(true);
|
|
614
783
|
expect(referenceEntity.$inArray(resultEntity)).toEqual(true);
|
|
@@ -616,86 +785,102 @@ This one's zip code is 92064.`;
|
|
|
616
785
|
it('wrong time selector', async () => {
|
|
617
786
|
await createTestEntities();
|
|
618
787
|
const referenceEntity = await TestModel.factory(refGuid);
|
|
788
|
+
// Retrieving entity by relative time...
|
|
619
789
|
let resultEntity = await nymph.getEntities({ class: TestModel }, { type: '&', tag: 'test', gt: ['timestamp', null, '+1 day'] });
|
|
620
790
|
expect(testEntity.$inArray(resultEntity)).toEqual(false);
|
|
621
791
|
expect(referenceEntity.$inArray(resultEntity)).toEqual(false);
|
|
792
|
+
// Retrieving entity by relative time...
|
|
622
793
|
resultEntity = await nymph.getEntities({ class: TestModel }, { type: '&', tag: 'test', lt: ['timestamp', null, '-3 days'] });
|
|
623
794
|
expect(testEntity.$inArray(resultEntity)).toEqual(false);
|
|
624
795
|
expect(referenceEntity.$inArray(resultEntity)).toEqual(false);
|
|
796
|
+
// Retrieving entity by relative time...
|
|
625
797
|
resultEntity = await nymph.getEntities({ class: TestModel }, { type: '&', tag: 'test', gt: ['cdate', null, '+1 day'] });
|
|
626
798
|
expect(testEntity.$inArray(resultEntity)).toEqual(false);
|
|
627
799
|
expect(referenceEntity.$inArray(resultEntity)).toEqual(false);
|
|
628
800
|
});
|
|
629
801
|
it('references', async () => {
|
|
630
802
|
await createTestEntities();
|
|
803
|
+
// Testing referenced entities...
|
|
804
|
+
await testEntity.reference?.$wake();
|
|
631
805
|
expect(testEntity.reference?.test).toEqual('good');
|
|
806
|
+
// Testing referenced entity arrays...
|
|
807
|
+
await Promise.all(testEntity.refArray?.map((e) => e.$wake()) || []);
|
|
632
808
|
expect(testEntity.refArray?.[0].test).toEqual('good');
|
|
633
809
|
});
|
|
634
810
|
it('ref', async () => {
|
|
635
811
|
await createTestEntities();
|
|
812
|
+
// Retrieving entity by reference...
|
|
636
813
|
const resultEntity = await nymph.getEntities({ class: TestModel }, { type: '&', ref: ['reference', refGuid] });
|
|
637
814
|
expect(testEntity.$inArray(resultEntity)).toEqual(true);
|
|
638
815
|
});
|
|
639
816
|
it('not ref', async () => {
|
|
640
817
|
await createTestEntities();
|
|
641
|
-
|
|
818
|
+
// Retrieving entity by !reference...
|
|
819
|
+
const resultEntity = await nymph.getEntities({ class: TestModel }, { type: '&', tag: 'test' }, { type: '!&', ref: ['reference', guid()] });
|
|
642
820
|
expect(testEntity.$inArray(resultEntity)).toEqual(true);
|
|
643
821
|
});
|
|
644
822
|
it('wrong ref', async () => {
|
|
645
823
|
await createTestEntities();
|
|
646
|
-
|
|
824
|
+
// Testing wrong reference...
|
|
825
|
+
const resultEntity = await nymph.getEntities({ class: TestModel }, { type: '&', ref: ['reference', guid()] });
|
|
647
826
|
expect(testEntity.$inArray(resultEntity)).toEqual(false);
|
|
648
827
|
});
|
|
649
828
|
it('nonexistent ref', async () => {
|
|
650
829
|
await createTestEntities();
|
|
830
|
+
// Testing non-existent reference...
|
|
651
831
|
const resultEntity = await nymph.getEntities({ class: TestModel }, { type: '&', ref: ['pickle', refGuid] });
|
|
652
832
|
expect(testEntity.$inArray(resultEntity)).toEqual(false);
|
|
653
833
|
});
|
|
654
834
|
it('inclusive ref', async () => {
|
|
655
835
|
await createTestEntities();
|
|
836
|
+
// Retrieving entity by inclusive reference...
|
|
656
837
|
const resultEntity = await nymph.getEntities({ class: TestModel }, {
|
|
657
838
|
type: '|',
|
|
658
839
|
ref: [
|
|
659
840
|
['reference', refGuid],
|
|
660
|
-
['reference',
|
|
841
|
+
['reference', guid()],
|
|
661
842
|
],
|
|
662
843
|
});
|
|
663
844
|
expect(testEntity.$inArray(resultEntity)).toEqual(true);
|
|
664
845
|
});
|
|
665
846
|
it('wrong inclusive ref', async () => {
|
|
666
847
|
await createTestEntities();
|
|
848
|
+
// Testing wrong inclusive reference...
|
|
667
849
|
const resultEntity = await nymph.getEntities({ class: TestModel }, {
|
|
668
850
|
type: '|',
|
|
669
851
|
ref: [
|
|
670
|
-
['reference',
|
|
671
|
-
['reference',
|
|
852
|
+
['reference', guid()],
|
|
853
|
+
['reference', guid()],
|
|
672
854
|
],
|
|
673
855
|
});
|
|
674
856
|
expect(testEntity.$inArray(resultEntity)).toEqual(false);
|
|
675
857
|
});
|
|
676
858
|
it('ref in an array', async () => {
|
|
677
859
|
await createTestEntities();
|
|
860
|
+
// Retrieving entity by array reference...
|
|
678
861
|
const resultEntity = await nymph.getEntities({ class: TestModel }, { type: '&', ref: ['refArray', refGuid] });
|
|
679
862
|
expect(testEntity.$inArray(resultEntity)).toEqual(true);
|
|
680
863
|
});
|
|
681
864
|
it('wrong ref in an array', async () => {
|
|
682
865
|
await createTestEntities();
|
|
866
|
+
// Testing wrong array reference...
|
|
683
867
|
const resultEntity = await nymph.getEntities({ class: TestModel }, {
|
|
684
868
|
type: '&',
|
|
685
869
|
ref: [
|
|
686
870
|
['refArray', refGuid],
|
|
687
|
-
['refArray',
|
|
871
|
+
['refArray', guid()],
|
|
688
872
|
],
|
|
689
873
|
});
|
|
690
874
|
expect(testEntity.$inArray(resultEntity)).toEqual(false);
|
|
691
875
|
});
|
|
692
876
|
it('logic operations', async () => {
|
|
693
877
|
await createTestEntities();
|
|
878
|
+
// Testing logic operations...
|
|
694
879
|
const resultEntity = await nymph.getEntities({ class: TestModel }, {
|
|
695
880
|
type: '&',
|
|
696
881
|
'!ref': [
|
|
697
|
-
['refArray',
|
|
698
|
-
['refArray',
|
|
882
|
+
['refArray', guid()],
|
|
883
|
+
['refArray', guid()],
|
|
699
884
|
],
|
|
700
885
|
'!lte': ['number', 29.99],
|
|
701
886
|
}, {
|
|
@@ -712,6 +897,8 @@ This one's zip code is 92064.`;
|
|
|
712
897
|
['array', 'of'],
|
|
713
898
|
['array', 'values'],
|
|
714
899
|
['array', 500],
|
|
900
|
+
['array', { test: true }],
|
|
901
|
+
['array', { nullbyte: '\\\x00\u0000 \x00' }],
|
|
715
902
|
],
|
|
716
903
|
}, {
|
|
717
904
|
type: '!|',
|
|
@@ -728,6 +915,7 @@ This one's zip code is 92064.`;
|
|
|
728
915
|
it('count return', async () => {
|
|
729
916
|
await createTestEntities();
|
|
730
917
|
const result = await nymph.getEntities({ class: TestModel });
|
|
918
|
+
// Testing count return...
|
|
731
919
|
const resultCount = await nymph.getEntities({
|
|
732
920
|
class: TestModel,
|
|
733
921
|
return: 'count',
|
|
@@ -735,30 +923,35 @@ This one's zip code is 92064.`;
|
|
|
735
923
|
expect(resultCount).toBeGreaterThanOrEqual(1);
|
|
736
924
|
expect(resultCount).toEqual(result.length);
|
|
737
925
|
const resultSelectors = await nymph.getEntities({ class: TestModel }, { type: '&', ref: ['reference', refGuid] });
|
|
926
|
+
// Testing count return with selectors...
|
|
738
927
|
const resultSelectorsCount = await nymph.getEntities({ class: TestModel, return: 'count' }, { type: '&', ref: ['reference', refGuid] });
|
|
739
928
|
expect(resultSelectorsCount).toBeGreaterThanOrEqual(1);
|
|
740
929
|
expect(resultSelectorsCount).toEqual(resultSelectors.length);
|
|
930
|
+
// Testing count return with limit...
|
|
741
931
|
const resultSelectorsLimit = await nymph.getEntities({
|
|
742
932
|
class: TestModel,
|
|
743
933
|
limit: 1,
|
|
744
934
|
return: 'count',
|
|
745
935
|
});
|
|
746
936
|
expect(resultSelectorsLimit).toEqual(1);
|
|
937
|
+
// Testing count return with limit...
|
|
747
938
|
const resultSelectorsSingle = await nymph.getEntity({
|
|
748
939
|
class: TestModel,
|
|
749
940
|
return: 'count',
|
|
750
941
|
});
|
|
751
942
|
expect(resultSelectorsSingle).toEqual(1);
|
|
752
|
-
|
|
943
|
+
// Testing empty count...
|
|
944
|
+
const resultSelectorsEmpty = await nymph.getEntities({ class: TestModel, return: 'count' }, { type: '&', ref: ['reference', guid()] });
|
|
753
945
|
expect(resultSelectorsEmpty).toEqual(0);
|
|
754
946
|
});
|
|
755
947
|
it('guid return', async () => {
|
|
756
948
|
await createTestEntities();
|
|
949
|
+
// Testing guid return using logic operations...
|
|
757
950
|
const resultGuid = await nymph.getEntities({ class: TestModel, return: 'guid' }, {
|
|
758
951
|
type: '&',
|
|
759
952
|
'!ref': [
|
|
760
|
-
['refArray',
|
|
761
|
-
['refArray',
|
|
953
|
+
['refArray', guid()],
|
|
954
|
+
['refArray', guid()],
|
|
762
955
|
],
|
|
763
956
|
'!lte': ['number', 29.99],
|
|
764
957
|
}, {
|
|
@@ -775,6 +968,8 @@ This one's zip code is 92064.`;
|
|
|
775
968
|
['array', 'of'],
|
|
776
969
|
['array', 'values'],
|
|
777
970
|
['array', 500],
|
|
971
|
+
['array', { test: true }],
|
|
972
|
+
['array', { nullbyte: '\\\x00\u0000 \x00' }],
|
|
778
973
|
],
|
|
779
974
|
}, {
|
|
780
975
|
type: '!|',
|
|
@@ -790,11 +985,12 @@ This one's zip code is 92064.`;
|
|
|
790
985
|
});
|
|
791
986
|
it('deep selector', async () => {
|
|
792
987
|
await createTestEntities();
|
|
988
|
+
// Testing deep selectors...
|
|
793
989
|
const resultEntity = await nymph.getEntities({ class: TestModel }, {
|
|
794
990
|
type: '&',
|
|
795
991
|
'!ref': [
|
|
796
|
-
['refArray',
|
|
797
|
-
['refArray',
|
|
992
|
+
['refArray', guid()],
|
|
993
|
+
['refArray', guid()],
|
|
798
994
|
],
|
|
799
995
|
'!lte': ['number', 29.99],
|
|
800
996
|
}, {
|
|
@@ -815,6 +1011,8 @@ This one's zip code is 92064.`;
|
|
|
815
1011
|
['array', 'of'],
|
|
816
1012
|
['array', 'values'],
|
|
817
1013
|
['array', 500],
|
|
1014
|
+
['array', { test: true }],
|
|
1015
|
+
['array', { nullbyte: '\\\x00\u0000 \x00' }],
|
|
818
1016
|
],
|
|
819
1017
|
},
|
|
820
1018
|
{
|
|
@@ -833,8 +1031,8 @@ This one's zip code is 92064.`;
|
|
|
833
1031
|
const resultEntity2 = await nymph.getEntities({ class: TestModel }, {
|
|
834
1032
|
type: '&',
|
|
835
1033
|
'!ref': [
|
|
836
|
-
['refArray',
|
|
837
|
-
['refArray',
|
|
1034
|
+
['refArray', guid()],
|
|
1035
|
+
['refArray', guid()],
|
|
838
1036
|
],
|
|
839
1037
|
'!lte': ['number', 29.99],
|
|
840
1038
|
}, {
|
|
@@ -855,6 +1053,8 @@ This one's zip code is 92064.`;
|
|
|
855
1053
|
['array', 'of'],
|
|
856
1054
|
['array', 'values'],
|
|
857
1055
|
['array', 500],
|
|
1056
|
+
['array', { test: true }],
|
|
1057
|
+
['array', { nullbyte: '\\\x00\u0000 \x00' }],
|
|
858
1058
|
],
|
|
859
1059
|
},
|
|
860
1060
|
{
|
|
@@ -875,7 +1075,7 @@ This one's zip code is 92064.`;
|
|
|
875
1075
|
selector: [
|
|
876
1076
|
{
|
|
877
1077
|
type: '&',
|
|
878
|
-
'!ref': ['refArray',
|
|
1078
|
+
'!ref': ['refArray', guid()],
|
|
879
1079
|
'!lte': ['number', 29.99],
|
|
880
1080
|
},
|
|
881
1081
|
{ type: '&', gte: ['number', 16000] },
|
|
@@ -887,7 +1087,7 @@ This one's zip code is 92064.`;
|
|
|
887
1087
|
selector: [
|
|
888
1088
|
{
|
|
889
1089
|
type: '&',
|
|
890
|
-
'!ref': ['refArray',
|
|
1090
|
+
'!ref': ['refArray', guid()],
|
|
891
1091
|
'!lte': ['number', 29.99],
|
|
892
1092
|
},
|
|
893
1093
|
{
|
|
@@ -902,12 +1102,13 @@ This one's zip code is 92064.`;
|
|
|
902
1102
|
expect(testEntity.$inArray(resultEntity4)).toEqual(true);
|
|
903
1103
|
});
|
|
904
1104
|
it('wrong deep selector', async () => {
|
|
1105
|
+
// Testing wrong deep selectors...
|
|
905
1106
|
const resultEntity = await nymph.getEntities({ class: TestModel }, {
|
|
906
1107
|
type: '&',
|
|
907
1108
|
selector: [
|
|
908
1109
|
{
|
|
909
1110
|
type: '&',
|
|
910
|
-
'!ref': ['refArray',
|
|
1111
|
+
'!ref': ['refArray', guid()],
|
|
911
1112
|
'!lte': ['number', 29.99],
|
|
912
1113
|
},
|
|
913
1114
|
{ type: '&', gte: ['number', 16000] },
|
|
@@ -917,6 +1118,7 @@ This one's zip code is 92064.`;
|
|
|
917
1118
|
});
|
|
918
1119
|
it('qref', async () => {
|
|
919
1120
|
await createTestEntities();
|
|
1121
|
+
// Retrieving entity by qref...
|
|
920
1122
|
const resultEntity = await nymph.getEntities({ class: TestModel }, {
|
|
921
1123
|
type: '&',
|
|
922
1124
|
qref: [
|
|
@@ -928,6 +1130,7 @@ This one's zip code is 92064.`;
|
|
|
928
1130
|
});
|
|
929
1131
|
it('not qref', async () => {
|
|
930
1132
|
await createTestEntities();
|
|
1133
|
+
// Retrieving entity by !qref...
|
|
931
1134
|
const resultEntity = await nymph.getEntities({ class: TestModel }, {
|
|
932
1135
|
type: '&',
|
|
933
1136
|
'!qref': [
|
|
@@ -939,6 +1142,7 @@ This one's zip code is 92064.`;
|
|
|
939
1142
|
});
|
|
940
1143
|
it('wrong qref class', async () => {
|
|
941
1144
|
await createTestEntities();
|
|
1145
|
+
// Testing wrong qref...
|
|
942
1146
|
const resultEntity = await nymph.getEntities({ class: TestModel }, {
|
|
943
1147
|
type: '&',
|
|
944
1148
|
qref: [
|
|
@@ -950,6 +1154,7 @@ This one's zip code is 92064.`;
|
|
|
950
1154
|
});
|
|
951
1155
|
it('wrong qref data', async () => {
|
|
952
1156
|
await createTestEntities();
|
|
1157
|
+
// Testing wrong qref...
|
|
953
1158
|
const resultEntity = await nymph.getEntities({ class: TestModel }, {
|
|
954
1159
|
type: '&',
|
|
955
1160
|
qref: [
|
|
@@ -959,62 +1164,188 @@ This one's zip code is 92064.`;
|
|
|
959
1164
|
});
|
|
960
1165
|
expect(testEntity.$inArray(resultEntity)).toEqual(false);
|
|
961
1166
|
});
|
|
962
|
-
it('sort option', async () => {
|
|
1167
|
+
it('cdate and mdate sort option', async () => {
|
|
963
1168
|
await createMultipleTestEntities();
|
|
964
1169
|
for (const sort of ['cdate', 'mdate']) {
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
sort: sort,
|
|
968
|
-
});
|
|
1170
|
+
// Retrieving entities sorted...
|
|
1171
|
+
let resultEntities = await nymph.getEntities({ class: TestModel, sort });
|
|
969
1172
|
expect(resultEntities.length).toBeGreaterThan(100);
|
|
970
1173
|
for (let i = 0; i < resultEntities.length - 1; i++) {
|
|
971
1174
|
expect(resultEntities[i + 1][sort]).toBeGreaterThan(resultEntities[i][sort] ?? 0);
|
|
972
1175
|
}
|
|
1176
|
+
// And test the same with guid return...
|
|
973
1177
|
let resultGuids = await nymph.getEntities({
|
|
974
1178
|
class: TestModel,
|
|
975
|
-
sort
|
|
1179
|
+
sort,
|
|
976
1180
|
return: 'guid',
|
|
977
1181
|
});
|
|
978
1182
|
expect(resultGuids.length).toBeGreaterThan(100);
|
|
979
1183
|
for (let i = 0; i < resultGuids.length - 1; i++) {
|
|
980
1184
|
expect(resultGuids[i]).toEqual(resultEntities[i].guid);
|
|
981
1185
|
}
|
|
1186
|
+
// Retrieving entities reverse sorted...
|
|
982
1187
|
resultEntities = await nymph.getEntities({
|
|
983
1188
|
class: TestModel,
|
|
984
|
-
sort
|
|
1189
|
+
sort,
|
|
985
1190
|
reverse: true,
|
|
986
1191
|
});
|
|
987
1192
|
expect(resultEntities.length).toBeGreaterThan(100);
|
|
988
1193
|
for (let i = 0; i < resultEntities.length - 1; i++) {
|
|
989
1194
|
expect(resultEntities[i + 1][sort]).toBeLessThan(resultEntities[i][sort] ?? 0);
|
|
990
1195
|
}
|
|
991
|
-
|
|
1196
|
+
// And again with other selectors.
|
|
1197
|
+
// Retrieving entities sorted...
|
|
1198
|
+
resultEntities = await nymph.getEntities({ class: TestModel, sort }, { type: '&', match: ['name', '^Multi Test '] });
|
|
992
1199
|
expect(resultEntities.length).toEqual(100);
|
|
993
1200
|
for (let i = 0; i < resultEntities.length - 1; i++) {
|
|
994
1201
|
expect(resultEntities[i + 1][sort]).toBeGreaterThan(resultEntities[i][sort] ?? 0);
|
|
995
1202
|
}
|
|
996
|
-
|
|
1203
|
+
// Retrieving entities reverse sorted...
|
|
1204
|
+
resultEntities = await nymph.getEntities({ class: TestModel, sort, reverse: true }, { type: '&', match: ['name', '^Multi Test '] });
|
|
997
1205
|
expect(resultEntities.length).toEqual(100);
|
|
998
1206
|
for (let i = 0; i < resultEntities.length - 1; i++) {
|
|
999
1207
|
expect(resultEntities[i + 1][sort]).toBeLessThan(resultEntities[i][sort] ?? 0);
|
|
1000
1208
|
}
|
|
1001
1209
|
}
|
|
1002
1210
|
});
|
|
1211
|
+
it('property sort option', async () => {
|
|
1212
|
+
await createMultipleTestEntities();
|
|
1213
|
+
// Retrieving entities sorted...
|
|
1214
|
+
let resultEntities = await nymph.getEntities({
|
|
1215
|
+
class: TestModel,
|
|
1216
|
+
sort: 'number',
|
|
1217
|
+
});
|
|
1218
|
+
expect(resultEntities.length).toBeGreaterThan(100);
|
|
1219
|
+
for (let i = 0; i < resultEntities.length - 1; i++) {
|
|
1220
|
+
expect(resultEntities[i + 1].number ?? Infinity).toBeGreaterThanOrEqual(resultEntities[i].number ?? 0);
|
|
1221
|
+
}
|
|
1222
|
+
// And test the same with guid return...
|
|
1223
|
+
let resultGuids = await nymph.getEntities({
|
|
1224
|
+
class: TestModel,
|
|
1225
|
+
sort: 'number',
|
|
1226
|
+
return: 'guid',
|
|
1227
|
+
});
|
|
1228
|
+
expect(resultGuids.length).toBeGreaterThan(100);
|
|
1229
|
+
for (let i = 0; i < resultGuids.length - 1; i++) {
|
|
1230
|
+
expect(resultGuids[i]).toEqual(resultEntities[i].guid);
|
|
1231
|
+
}
|
|
1232
|
+
// Retrieving entities reverse sorted...
|
|
1233
|
+
resultEntities = await nymph.getEntities({
|
|
1234
|
+
class: TestModel,
|
|
1235
|
+
sort: 'number',
|
|
1236
|
+
reverse: true,
|
|
1237
|
+
});
|
|
1238
|
+
expect(resultEntities.length).toBeGreaterThan(100);
|
|
1239
|
+
for (let i = 0; i < resultEntities.length - 1; i++) {
|
|
1240
|
+
expect(resultEntities[i + 1].number ?? 0).toBeLessThanOrEqual(resultEntities[i].number ?? Infinity);
|
|
1241
|
+
}
|
|
1242
|
+
// And again with other selectors.
|
|
1243
|
+
// Retrieving entities sorted...
|
|
1244
|
+
resultEntities = await nymph.getEntities({ class: TestModel, sort: 'number' }, { type: '&', match: ['name', '^Multi Test '] });
|
|
1245
|
+
expect(resultEntities.length).toEqual(100);
|
|
1246
|
+
for (let i = 0; i < resultEntities.length - 1; i++) {
|
|
1247
|
+
expect(resultEntities[i + 1].number ?? Infinity).toBeGreaterThan(resultEntities[i].number ?? 0);
|
|
1248
|
+
expect(resultEntities[i].name).toEqual(`Multi Test ${100 - (resultEntities[i].number ?? 0)}`);
|
|
1249
|
+
}
|
|
1250
|
+
// Retrieving entities reverse sorted...
|
|
1251
|
+
resultEntities = await nymph.getEntities({ class: TestModel, sort: 'number', reverse: true }, { type: '&', match: ['name', '^Multi Test '] });
|
|
1252
|
+
expect(resultEntities.length).toEqual(100);
|
|
1253
|
+
for (let i = 0; i < resultEntities.length - 1; i++) {
|
|
1254
|
+
expect(resultEntities[i + 1].number ?? 0).toBeLessThan(resultEntities[i].number ?? Infinity);
|
|
1255
|
+
expect(resultEntities[i].name).toEqual(`Multi Test ${100 - (resultEntities[i].number ?? 0)}`);
|
|
1256
|
+
}
|
|
1257
|
+
});
|
|
1003
1258
|
it('delete reference', async () => {
|
|
1004
1259
|
await createTestEntities();
|
|
1260
|
+
// Deleting referenced entities...
|
|
1261
|
+
await testEntity.reference?.$wake();
|
|
1005
1262
|
expect(await testEntity.reference?.$delete()).toEqual(true);
|
|
1263
|
+
await Promise.all(testEntity.refArray?.map((e) => e.$wake()) || []);
|
|
1006
1264
|
expect(testEntity.reference?.guid).toBeNull();
|
|
1007
1265
|
});
|
|
1008
1266
|
it('delete', async () => {
|
|
1009
1267
|
await createTestEntities();
|
|
1268
|
+
// Deleting entity...
|
|
1010
1269
|
expect(await testEntity.$delete()).toEqual(true);
|
|
1011
1270
|
expect(testEntity.guid).toBeNull();
|
|
1012
1271
|
const entity = await nymph.getEntity({ class: TestModel }, { type: '&', guid: testGuid });
|
|
1013
1272
|
expect(entity).toBeNull();
|
|
1014
1273
|
});
|
|
1274
|
+
it('allows non-duplicate unique strings', async () => {
|
|
1275
|
+
// Creating entity...
|
|
1276
|
+
const uniqueEntityA = await TestModel.factory();
|
|
1277
|
+
uniqueEntityA.name = 'Entity Test ' + new Date().toLocaleString();
|
|
1278
|
+
uniqueEntityA.uniques = ['test a'];
|
|
1279
|
+
// Saving entity...
|
|
1280
|
+
expect(await uniqueEntityA.$save()).toEqual(true);
|
|
1281
|
+
expect(uniqueEntityA.guid).not.toBeNull();
|
|
1282
|
+
// Creating entity...
|
|
1283
|
+
const uniqueEntityB = await TestModel.factory();
|
|
1284
|
+
uniqueEntityB.name = 'Entity Test ' + new Date().toLocaleString();
|
|
1285
|
+
uniqueEntityB.uniques = ['test b'];
|
|
1286
|
+
// Saving entity...
|
|
1287
|
+
expect(await uniqueEntityB.$save()).toEqual(true);
|
|
1288
|
+
expect(uniqueEntityB.guid).not.toBeNull();
|
|
1289
|
+
expect(uniqueEntityA.guid).not.toEqual(uniqueEntityB.guid);
|
|
1290
|
+
expect(await uniqueEntityA.$delete()).toEqual(true);
|
|
1291
|
+
expect(await uniqueEntityB.$delete()).toEqual(true);
|
|
1292
|
+
});
|
|
1293
|
+
it('throws on duplicate unique strings', async () => {
|
|
1294
|
+
// Creating entity...
|
|
1295
|
+
const uniqueEntityA = await TestModel.factory();
|
|
1296
|
+
uniqueEntityA.name = 'Entity Test ' + new Date().toLocaleString();
|
|
1297
|
+
uniqueEntityA.uniques = ['test a'];
|
|
1298
|
+
// Saving entity...
|
|
1299
|
+
expect(await uniqueEntityA.$save()).toEqual(true);
|
|
1300
|
+
expect(uniqueEntityA.guid).not.toBeNull();
|
|
1301
|
+
// Creating entity...
|
|
1302
|
+
const uniqueEntityB = await TestModel.factory();
|
|
1303
|
+
uniqueEntityB.name = 'Entity Test ' + new Date().toLocaleString();
|
|
1304
|
+
uniqueEntityB.uniques = ['test a'];
|
|
1305
|
+
// Saving entity...
|
|
1306
|
+
try {
|
|
1307
|
+
await uniqueEntityB.$save();
|
|
1308
|
+
throw Error("Shouldn't get past the uniqueness check.");
|
|
1309
|
+
}
|
|
1310
|
+
catch (e) {
|
|
1311
|
+
expect(e).toBeInstanceOf(EntityUniqueConstraintError);
|
|
1312
|
+
}
|
|
1313
|
+
expect(uniqueEntityB.guid).toBeNull();
|
|
1314
|
+
expect(await uniqueEntityA.$delete()).toEqual(true);
|
|
1315
|
+
});
|
|
1316
|
+
it('allows duplicate unique string if first transaction is rolled back', async () => {
|
|
1317
|
+
// Creating transaction entity...
|
|
1318
|
+
const tnymphA = await nymph.startTransaction('test-unique-a');
|
|
1319
|
+
const TestModelA = tnymphA.getEntityClass(TestModel);
|
|
1320
|
+
const uniqueEntityA = await TestModelA.factory();
|
|
1321
|
+
uniqueEntityA.name = 'Entity Test ' + new Date().toLocaleString();
|
|
1322
|
+
uniqueEntityA.uniques = ['test a'];
|
|
1323
|
+
// Saving entity...
|
|
1324
|
+
expect(await uniqueEntityA.$save()).toEqual(true);
|
|
1325
|
+
expect(uniqueEntityA.guid).not.toBeNull();
|
|
1326
|
+
// Rolling back transaction...
|
|
1327
|
+
expect(await tnymphA.rollback('test-unique-a')).toEqual(true);
|
|
1328
|
+
// Creating transaction entity...
|
|
1329
|
+
const tnymphB = await nymph.startTransaction('test-unique-b');
|
|
1330
|
+
const TestModelB = tnymphB.getEntityClass(TestModel);
|
|
1331
|
+
const uniqueEntityB = await TestModelB.factory();
|
|
1332
|
+
uniqueEntityB.name = 'Entity Test ' + new Date().toLocaleString();
|
|
1333
|
+
uniqueEntityB.uniques = ['test a'];
|
|
1334
|
+
// Saving entity...
|
|
1335
|
+
expect(await uniqueEntityB.$save()).toEqual(true);
|
|
1336
|
+
expect(uniqueEntityB.guid).not.toBeNull();
|
|
1337
|
+
expect(uniqueEntityA.guid).not.toEqual(uniqueEntityB.guid);
|
|
1338
|
+
expect(await tnymphB.commit('test-unique-b')).toEqual(true);
|
|
1339
|
+
const uniqueEntityACheck = await nymph.getEntity({ class: TestModel }, { type: '&', guid: uniqueEntityA.guid ?? '' });
|
|
1340
|
+
expect(uniqueEntityACheck).toBeNull();
|
|
1341
|
+
const uniqueEntityBCheck = await nymph.getEntity({ class: TestModel }, { type: '&', guid: uniqueEntityB.guid ?? '' });
|
|
1342
|
+
expect(uniqueEntityBCheck).not.toBeNull();
|
|
1343
|
+
if (uniqueEntityBCheck != null) {
|
|
1344
|
+
expect(await uniqueEntityBCheck.$delete()).toEqual(true);
|
|
1345
|
+
}
|
|
1346
|
+
});
|
|
1015
1347
|
}
|
|
1016
|
-
|
|
1017
|
-
function UIDTest(nymph, it) {
|
|
1348
|
+
export function UIDTest(nymph, it) {
|
|
1018
1349
|
it('delete old test data', async () => {
|
|
1019
1350
|
expect(await nymph.deleteUID('TestUID')).toEqual(true);
|
|
1020
1351
|
expect(await nymph.deleteUID('NewUID')).toEqual(true);
|
|
@@ -1045,10 +1376,9 @@ function UIDTest(nymph, it) {
|
|
|
1045
1376
|
expect(await nymph.getUID('TestUID')).toBeNull();
|
|
1046
1377
|
});
|
|
1047
1378
|
}
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
const
|
|
1051
|
-
const TestBModel = nymph.addEntityClass(testArtifacts_1.TestBModel);
|
|
1379
|
+
export function ExportImportTest(nymph, it) {
|
|
1380
|
+
const TestModel = nymph.addEntityClass(TestModelClass);
|
|
1381
|
+
const TestBModel = nymph.addEntityClass(TestBModelClass);
|
|
1052
1382
|
async function deleteTestData() {
|
|
1053
1383
|
let all = await nymph.getEntities({ class: TestModel });
|
|
1054
1384
|
expect(Array.isArray(all)).toEqual(true);
|
|
@@ -1073,21 +1403,34 @@ function ExportImportTest(nymph, it) {
|
|
|
1073
1403
|
const models = await nymph.getEntities({ class: TestModel });
|
|
1074
1404
|
const bmodels = await nymph.getEntities({ class: TestBModel });
|
|
1075
1405
|
expect(models.length).toEqual(30);
|
|
1076
|
-
expect(bmodels.length).toEqual(
|
|
1077
|
-
const
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1406
|
+
expect(bmodels.length).toEqual(30);
|
|
1407
|
+
for (const model of models) {
|
|
1408
|
+
expect(model.name).toMatch(/^Entity Test /);
|
|
1409
|
+
expect(model.null).toBeDefined();
|
|
1410
|
+
expect(model.null).toBeNull();
|
|
1411
|
+
expect(model.string).toEqual('test');
|
|
1412
|
+
expect(model.array).toEqual([
|
|
1413
|
+
'full',
|
|
1414
|
+
'of',
|
|
1415
|
+
'values',
|
|
1416
|
+
500,
|
|
1417
|
+
{ test: true },
|
|
1418
|
+
{ nullbyte: '\\\x00\u0000 \x00' },
|
|
1419
|
+
]);
|
|
1420
|
+
expect(model.match).toEqual(matchValue);
|
|
1421
|
+
expect(model.number).toEqual(30);
|
|
1422
|
+
expect(model.numberString).toEqual('30');
|
|
1423
|
+
expect(model.timestamp).toBeGreaterThanOrEqual(strtotime('-2 minutes'));
|
|
1424
|
+
expect(model.index).toMatch(/^\d+a$/);
|
|
1425
|
+
await model.reference?.$wake();
|
|
1426
|
+
expect(model.reference?.guid).not.toBeNull();
|
|
1427
|
+
expect(model.reference?.string).toEqual('another');
|
|
1428
|
+
expect(model.reference?.index).toMatch(/^\d+b$/);
|
|
1429
|
+
expect(model.index?.substring(0, -1)).toEqual(model.reference?.index?.substring(0, -1));
|
|
1430
|
+
expect(model.reference?.$inArray(bmodels)).toEqual(true);
|
|
1431
|
+
await Promise.all(model.refArray?.map((e) => e.$wake()) || []);
|
|
1432
|
+
expect(model.refArray?.[0].guid).not.toBeNull();
|
|
1433
|
+
expect(model.refArray?.[0].guid).toEqual(model.reference?.guid);
|
|
1091
1434
|
}
|
|
1092
1435
|
}
|
|
1093
1436
|
it('delete old test data', async () => {
|
|
@@ -1097,17 +1440,27 @@ function ExportImportTest(nymph, it) {
|
|
|
1097
1440
|
expect(await nymph.newUID('TestUID')).toEqual(1);
|
|
1098
1441
|
expect(await nymph.newUID('TestUID')).toEqual(2);
|
|
1099
1442
|
expect(await nymph.newUID('TestUID2')).toEqual(1);
|
|
1100
|
-
for (let i = 0; i <
|
|
1101
|
-
|
|
1102
|
-
const testEntity = await
|
|
1443
|
+
for (let i = 0; i < 30; i++) {
|
|
1444
|
+
// Creating entity...
|
|
1445
|
+
const testEntity = await TestModel.factory();
|
|
1446
|
+
// Saving entity...
|
|
1103
1447
|
testEntity.name = 'Entity Test ' + new Date().toLocaleString();
|
|
1104
1448
|
testEntity.null = null;
|
|
1105
1449
|
testEntity.string = 'test';
|
|
1106
|
-
testEntity.array = [
|
|
1450
|
+
testEntity.array = [
|
|
1451
|
+
'full',
|
|
1452
|
+
'of',
|
|
1453
|
+
'values',
|
|
1454
|
+
500,
|
|
1455
|
+
{ test: true },
|
|
1456
|
+
{ nullbyte: '\\\x00\u0000 \x00' },
|
|
1457
|
+
];
|
|
1458
|
+
testEntity.match = matchValue;
|
|
1107
1459
|
testEntity.number = 30;
|
|
1460
|
+
testEntity.numberString = '30';
|
|
1108
1461
|
testEntity.timestamp = Date.now();
|
|
1109
1462
|
testEntity.index = i + 'a';
|
|
1110
|
-
const entityReferenceTest = await
|
|
1463
|
+
const entityReferenceTest = await TestBModel.factory();
|
|
1111
1464
|
entityReferenceTest.string = 'another';
|
|
1112
1465
|
entityReferenceTest.index = i + 'b';
|
|
1113
1466
|
expect(await entityReferenceTest.$save()).toEqual(true);
|
|
@@ -1117,6 +1470,9 @@ function ExportImportTest(nymph, it) {
|
|
|
1117
1470
|
}
|
|
1118
1471
|
await checkEntityDataAndCount();
|
|
1119
1472
|
});
|
|
1473
|
+
it('needs migration', async () => {
|
|
1474
|
+
expect(await nymph.needsMigration()).toEqual(false);
|
|
1475
|
+
});
|
|
1120
1476
|
it('export data', async () => {
|
|
1121
1477
|
expect(await nymph.export(__dirname + '/testentityexport.nex')).toEqual(true);
|
|
1122
1478
|
});
|
|
@@ -1132,8 +1488,117 @@ function ExportImportTest(nymph, it) {
|
|
|
1132
1488
|
expect(bmodels.length).toEqual(0);
|
|
1133
1489
|
expect(await nymph.import(__dirname + '/testentityexport.nex')).toEqual(true);
|
|
1134
1490
|
await checkEntityDataAndCount();
|
|
1135
|
-
|
|
1491
|
+
fs.unlinkSync(__dirname + '/testentityexport.nex');
|
|
1136
1492
|
});
|
|
1137
1493
|
}
|
|
1138
|
-
|
|
1494
|
+
const matchValue = `Hello, my name is Edward McCheese. It is a pleasure to meet you. As you can see, I have several hats of the most pleasant nature.
|
|
1495
|
+
|
|
1496
|
+
This one's email address is nice_hat-wednesday+newyork@im-a-hat.hat.
|
|
1497
|
+
This one's phone number is (555) 555-1818.
|
|
1498
|
+
This one's zip code is 92064.
|
|
1499
|
+
This one's favorite emojis are 🔥❤️😊😂⭐🤔
|
|
1500
|
+
|
|
1501
|
+
These hats are absolutely fantastic.
|
|
1502
|
+
|
|
1503
|
+
\x00\x00\x00
|
|
1504
|
+
|
|
1505
|
+
Lorem ipsum odor amet, consectetuer adipiscing elit. Metus ad mattis sit pretium per, dignissim imperdiet luctus. Congue rhoncus turpis etiam aenean ultricies dapibus justo nunc. Netus non primis quis habitasse lacus. Nascetur dapibus sociosqu ridiculus primis; elementum netus consectetur ridiculus litora. Tristique facilisis erat ex class nulla cursus amet. Metus vitae tempor euismod vel; ullamcorper ac quisque vestibulum. Mauris libero pulvinar facilisi eros natoque massa.
|
|
1506
|
+
|
|
1507
|
+
Nunc vel hac nec tristique vivamus. Leo volutpat convallis eget integer tellus cubilia tincidunt malesuada? Consequat elit nisi tristique vehicula cubilia maecenas metus facilisi malesuada. In mattis euismod ad magnis fusce. Nisi congue sociosqu rhoncus lobortis fringilla sollicitudin at platea. Iaculis ut et varius metus eleifend laoreet hac odio libero. Non ridiculus tempus ultricies nullam curabitur.
|
|
1508
|
+
|
|
1509
|
+
Amet pellentesque aliquam placerat; vestibulum blandit platea porttitor pulvinar. Tellus tristique ad morbi in ac placerat luctus. Ante efficitur inceptos commodo lacus sodales sit varius nunc consequat. Senectus non vel est convallis mauris. Venenatis feugiat massa nostra, purus class primis sodales odio. Risus nulla integer feugiat ridiculus porta nascetur. Rutrum tincidunt enim parturient libero nisl ante sagittis nisi. Cubilia massa non vehicula vehicula amet parturient pellentesque. Habitant dapibus fames lectus pretium rhoncus.
|
|
1510
|
+
|
|
1511
|
+
Ridiculus nascetur mauris iaculis hendrerit ridiculus gravida auctor in. Class suscipit augue finibus semper vulputate nec. Tristique mi eu praesent commodo fermentum inceptos penatibus lobortis. Libero enim orci ultricies egestas ut pellentesque. Laoreet massa ad curabitur tellus libero laoreet habitasse enim nascetur. Iaculis euismod a euismod conubia purus. Commodo condimentum ultrices lorem ligula aenean; netus mattis sem non.
|
|
1512
|
+
|
|
1513
|
+
Curabitur duis imperdiet mus integer vel bibendum; fusce malesuada. Dignissim duis himenaeos primis odio, congue pharetra? Egestas mus sit eget proin quis. Neque dapibus dapibus nam sociosqu; maecenas viverra himenaeos. Himenaeos faucibus himenaeos faucibus ex litora eros faucibus cras. Maximus scelerisque nullam nunc congue fringilla. Nisi eu magna erat morbi cras enim amet litora. Nostra primis vitae arcu, accumsan sollicitudin curabitur. Potenti sit vel vehicula metus leo id. Etiam blandit quisque nam orci; neque lacinia rutrum.
|
|
1514
|
+
|
|
1515
|
+
Aliquam mollis varius hendrerit sem eleifend fermentum. Sapien rutrum condimentum inceptos ex feugiat consectetur mollis magna diam. Natoque enim nisi, ex risus finibus lacinia conubia vivamus suscipit. Habitasse interdum lorem ante, bibendum posuere dis. Lacus porttitor sapien proin; consequat velit ipsum venenatis. Vivamus porta mattis morbi nunc torquent neque. Senectus vehicula tincidunt parturient fringilla id amet urna libero pharetra.
|
|
1516
|
+
|
|
1517
|
+
Faucibus netus tincidunt et viverra augue ligula est quis. Ipsum tempus vehicula tortor dis tortor ad. Ex tincidunt torquent eleifend aenean urna commodo. Quam nullam imperdiet volutpat vel condimentum cubilia sociosqu. Etiam tempor sapien mattis, venenatis aptent id risus. Efficitur luctus vel; nam ut commodo sociosqu hendrerit. Quisque placerat gravida rhoncus blandit vitae. Himenaeos id risus est mollis aliquet nam curabitur.
|
|
1518
|
+
|
|
1519
|
+
Habitasse sed est fames quis lobortis leo mattis. Nisl cursus tincidunt cursus felis porttitor. Ante integer turpis non class lobortis suscipit. Condimentum velit vulputate quis sapien, lacus magna adipiscing nec primis. Blandit consequat ipsum nostra dignissim; tincidunt torquent fames. Ac faucibus elit iaculis duis lobortis. Euismod facilisi massa turpis mus neque. Class vulputate quisque elementum suscipit nostra tempus adipiscing. Malesuada himenaeos finibus ad inceptos volutpat scelerisque inceptos.
|
|
1520
|
+
|
|
1521
|
+
Natoque platea at feugiat cras tellus facilisi suspendisse lacinia maximus. Duis vestibulum eget molestie turpis risus dapibus dignissim torquent? Nulla nibh aptent fringilla scelerisque euismod mauris ornare. Orci finibus taciti habitasse fringilla laoreet convallis. Class sed fringilla eget quisque sit auctor. Id cursus mauris praesent maecenas iaculis. Ullamcorper luctus habitant ultrices pharetra etiam mattis morbi fringilla lorem.
|
|
1522
|
+
|
|
1523
|
+
Pharetra porta orci ridiculus inceptos eleifend sem ante quis. Molestie velit penatibus libero per sem litora congue. Porta quis egestas vivamus vitae potenti ornare. Elit molestie nullam vitae quam viverra. Nisl fringilla massa ridiculus donec ridiculus sed magnis. Cursus ad enim consequat ultricies tortor rhoncus pellentesque augue. Netus facilisis tempor elementum interdum at sagittis habitasse. Pretium imperdiet duis diam ullamcorper donec at suscipit. Id per inceptos ac luctus massa imperdiet tempor. Parturient libero suscipit non tempor ligula ullamcorper placerat varius.
|
|
1524
|
+
|
|
1525
|
+
Libero duis suspendisse cubilia rhoncus scelerisque faucibus mattis. Leo fusce urna at per inceptos vel lobortis. Quisque ex duis euismod dictum hac nibh eros. Penatibus eleifend tellus donec elit primis phasellus habitant dictum. Imperdiet consequat facilisi massa, lacus gravida sodales id sapien. Ornare sapien sit convallis suscipit nunc enim. Tempus at vitae class sollicitudin proin. Dolor aenean felis netus consectetur mattis phasellus vestibulum. Orci fringilla sodales montes sed himenaeos ex massa natoque porttitor.
|
|
1526
|
+
|
|
1527
|
+
Mus condimentum dui mollis dolor accumsan ligula pretium? Est phasellus platea iaculis vehicula et eros vel rutrum placerat. Nulla laoreet faucibus; congue netus magna senectus lectus dictum. Sodales aliquam eget himenaeos adipiscing, tempor feugiat. Lorem pellentesque iaculis fames lectus cubilia ornare sagittis rhoncus? Bibendum viverra tellus libero congue dignissim metus tellus aenean ultrices. Sollicitudin cras sollicitudin mattis lacus facilisis fermentum scelerisque porttitor rutrum.
|
|
1528
|
+
|
|
1529
|
+
Sapien aptent fames curae, consectetur dapibus mauris sollicitudin tellus. Laoreet etiam dignissim, suscipit platea libero vitae taciti eu nec. Donec lobortis metus nisi; est enim himenaeos molestie tellus sapien. Sapien tellus rhoncus blandit fusce hendrerit feugiat. Maximus sit hendrerit tincidunt nec imperdiet hendrerit semper suscipit. Quam augue proin netus rutrum et sem. Neque penatibus cubilia nec metus porta. Ornare pulvinar quam auctor, elit curae ad donec dis. Egestas aptent non tortor potenti morbi mauris.
|
|
1530
|
+
|
|
1531
|
+
Montes dui in pharetra primis consequat ante integer. Vulputate libero gravida rutrum tortor suscipit massa! Netus rhoncus platea torquent dapibus consectetur suspendisse etiam sociosqu. Quis placerat mauris et quam nascetur. Dictumst mi rutrum justo vitae ultricies feugiat nulla faucibus morbi. Consectetur nec condimentum euismod sodales nisi purus; finibus elementum facilisi.
|
|
1532
|
+
|
|
1533
|
+
Senectus mus faucibus ut morbi eu maximus. Turpis tincidunt sodales sociosqu lorem amet pulvinar laoreet faucibus. Mus bibendum vulputate hendrerit sollicitudin eu ridiculus posuere augue leo? Cubilia nostra consequat; fusce egestas himenaeos class ornare nec. Est montes tortor vivamus congue inceptos erat mi eget pellentesque. Amet vulputate fringilla aliquet fames tristique. Rutrum malesuada dapibus vehicula risus nunc torquent habitant turpis habitant. Ipsum proin viverra adipiscing cras et augue hendrerit. Efficitur euismod aliquam habitant; sit nisl potenti.
|
|
1534
|
+
|
|
1535
|
+
Conubia dignissim metus phasellus tristique augue, nullam quam finibus. Dignissim vel enim mattis praesent penatibus. Sapien pharetra curae torquent turpis fermentum feugiat facilisis nisi. Lacinia justo ante mauris finibus vitae ante efficitur dis. Urna gravida conubia amet rhoncus felis ut lorem placerat. Quisque fermentum suscipit aenean nisi suscipit ac? Quis ornare faucibus amet conubia justo maximus hendrerit phasellus aenean. Ex vivamus vulputate in mollis mauris praesent vehicula erat neque.
|
|
1536
|
+
|
|
1537
|
+
Orci nullam commodo habitant volutpat per tincidunt mus sit. Nisi cubilia fringilla viverra at orci magnis massa nam orci. Duis iaculis sapien nulla nascetur elit porta fermentum. Amus libero vivamus vel finibus magnis placerat himenaeos. Integer posuere suscipit non vulputate enim. Conubia id lobortis habitasse luctus odio maecenas enim conubia non. Mus egestas massa platea nullam sociosqu, magnis cras. Quam placerat nisi dui gravida ultricies, facilisis eu pharetra vivamus.
|
|
1538
|
+
|
|
1539
|
+
Fusce maecenas dis finibus senectus nascetur tortor. Nec rhoncus pretium vivamus donec vel ligula curabitur. Velit dis laoreet aenean, fusce metus blandit erat. Ligula purus natoque, arcu finibus tincidunt efficitur dolor curabitur. Ac risus et ipsum; consequat integer phasellus diam. Praesent ipsum gravida placerat porta volutpat tincidunt maximus sapien. Phasellus gravida orci enim velit condimentum.
|
|
1540
|
+
|
|
1541
|
+
Dui id laoreet penatibus orci sit a. Iaculis dis porttitor luctus; lacus dignissim quam commodo lorem. Nullam dictum quisque accumsan porttitor tortor fusce aenean. Aliquet quisque ultricies malesuada auctor facilisi tristique. Dolor nulla conubia ultricies odio ad. Nunc consectetur venenatis consequat nisi habitant. Praesent accumsan scelerisque morbi aliquam sociosqu auctor, nostra aenean.
|
|
1542
|
+
|
|
1543
|
+
Mauris amet conubia egestas eu posuere nullam. Est neque dictum in, lacus aliquam ultrices vestibulum. Dapibus dis habitasse cras conubia felis nibh. Egestas nisl iaculis nostra neque enim, ridiculus praesent. Consectetur eleifend eu mus; elit sed pellentesque fringilla. Ullamcorper hendrerit nibh aptent per congue libero ultrices eget. Mollis velit ad tortor lobortis ipsum.
|
|
1544
|
+
|
|
1545
|
+
Tristique neque justo potenti himenaeos; pellentesque nam vehicula. Maximus etiam ut nullam semper; fames curabitur quam ad morbi. Interdum curabitur platea augue porttitor a gravida. Leo imperdiet id aenean sit; habitasse quam tempus pellentesque? Nostra leo aenean amet lectus ultricies ridiculus nascetur ullamcorper. Taciti in iaculis quam nascetur proin varius eget vehicula.
|
|
1546
|
+
|
|
1547
|
+
Mattis hendrerit tempus interdum diam elementum primis augue phasellus sociosqu. Imperdiet pulvinar imperdiet lacinia posuere class magnis. Montes viverra scelerisque laoreet sociosqu proin lacus. Nam id justo praesent curabitur nam accumsan imperdiet commodo. Sociosqu netus sapien proin interdum ac. Dapibus tempor et sodales, natoque consequat torquent.
|
|
1548
|
+
|
|
1549
|
+
Lectus ultricies amet bibendum blandit finibus erat pellentesque. Nam quis ultrices curae; lorem gravida malesuada velit taciti enim. Facilisis fermentum suspendisse leo tristique litora dapibus rhoncus convallis. Netus iaculis eleifend viverra urna, vulputate ac convallis. Faucibus torquent dictum, nisl sed parturient libero. Ornare class habitant per consequat adipiscing rhoncus feugiat.
|
|
1550
|
+
|
|
1551
|
+
Proin molestie nullam eros parturient parturient curabitur aliquet. Rhoncus mus aenean sem aliquet sem finibus neque rutrum commodo. Efficitur litora lobortis nascetur adipiscing curae faucibus? Bibendum leo velit augue; potenti primis malesuada lacus ipsum. Facilisi potenti facilisis nam tempor consequat. Magnis suspendisse primis duis quam; suscipit quis fermentum phasellus. Massa ridiculus habitasse ipsum arcu sit maecenas gravida nisi? Dolor egestas lacinia lacinia libero nam curae suspendisse purus. Tristique inceptos curae netus scelerisque magna hendrerit commodo quis parturient. Eget accumsan erat sociosqu vestibulum platea turpis habitasse.
|
|
1552
|
+
|
|
1553
|
+
Maximus dignissim sed conubia a ipsum nullam condimentum dictumst. Suspendisse congue phasellus congue lacus sollicitudin senectus curae. Consequat sagittis in fringilla suscipit scelerisque suscipit. Rhoncus pharetra sodales malesuada sollicitudin lectus. Est primis pretium finibus felis pharetra nulla sapien lacinia. Nunc lorem aptent tristique quisque etiam posuere non ullamcorper. Potenti mus sed mus; non id eleifend pellentesque magnis.
|
|
1554
|
+
|
|
1555
|
+
Iaculis morbi mattis; ornare tincidunt neque mus egestas consectetur ultrices. Porta dapibus pretium, vulputate dis amet neque. Posuere auctor lacinia maecenas ridiculus ullamcorper tempus egestas cubilia nec. Cursus nulla lacinia mi facilisi, nisl tempor. Tempus elementum laoreet magnis neque morbi felis per. Suspendisse lectus vitae nunc amet himenaeos euismod aliquam. Quisque integer dictum aenean fermentum dictumst torquent.
|
|
1556
|
+
|
|
1557
|
+
Sociosqu per suspendisse augue phasellus velit dapibus parturient. At sit eu finibus posuere tincidunt. Phasellus duis scelerisque scelerisque taciti est venenatis. Arcu habitant augue amet eget maximus torquent. Eget gravida ut quisque ligula vel mus. Erat quis himenaeos; velit eget varius viverra interdum. Neque dapibus malesuada est a gravida libero integer aptent. Semper eleifend per at magnis, laoreet nibh orci vel ligula.
|
|
1558
|
+
|
|
1559
|
+
Odio purus finibus inceptos malesuada duis. Neque magnis est laoreet nibh gravida sagittis ullamcorper sodales. Parturient ultricies mattis lacus risus laoreet praesent. Tincidunt eleifend quis sagittis id nascetur. Nam scelerisque varius feugiat phasellus enim mauris nam. Tortor iaculis et cras; blandit sollicitudin pellentesque justo. Nam lacinia volutpat fusce nibh mollis; himenaeos iaculis. Vulputate dictum mattis sollicitudin accumsan at hendrerit.
|
|
1560
|
+
|
|
1561
|
+
Ipsum augue faucibus senectus porta dapibus metus. Netus sem amet nullam fermentum in dolor bibendum. Lacus quis enim vivamus enim risus elit suspendisse arcu. Penatibus proin pellentesque consequat nibh turpis fusce. Potenti sociosqu nunc tempor amet torquent. Aliquet porttitor adipiscing parturient curabitur hac? Condimentum morbi netus erat class hendrerit aptent. Placerat viverra molestie at eget donec quisque. Varius sem erat dolor, urna nunc ac duis inceptos maximus.
|
|
1562
|
+
|
|
1563
|
+
Nostra adipiscing dapibus eros vivamus accumsan elementum curae dignissim dignissim. Iaculis quisque fusce at conubia est habitant ipsum. Porttitor libero lobortis lobortis habitasse quis quisque nunc euismod aenean. Bibendum nullam volutpat quam vitae felis sit. Mauris bibendum nulla litora nec id, elit lacinia. Orci odio nunc est ante commodo dis quis diam convallis? Mattis a per cras amet egestas ex pellentesque nascetur augue. Egestas per massa per non metus hendrerit feugiat eu?
|
|
1564
|
+
|
|
1565
|
+
Praesent habitasse est elementum mattis potenti. Fermentum interdum enim orci dui faucibus sodales nisi mus. Tortor facilisi nunc potenti; dignissim magna varius! Risus cursus ornare tincidunt a feugiat massa cubilia. Sociosqu quis pharetra efficitur lorem ornare sapien arcu euismod. Elementum donec maecenas praesent scelerisque viverra mi natoque. Lacinia nibh eu commodo ut class blandit magnis.
|
|
1566
|
+
|
|
1567
|
+
Ullamcorper himenaeos mollis nostra placerat quam pellentesque nibh. Curae posuere cras dis senectus fringilla congue ipsum sit. Eros maecenas duis morbi consequat himenaeos ridiculus purus erat. Nascetur maximus massa eros class phasellus integer sed gravida. Vel donec lacinia donec curabitur penatibus integer ornare. Varius quam lectus magna per a mauris.
|
|
1568
|
+
|
|
1569
|
+
Imperdiet tempus malesuada ultrices egestas taciti nibh elit lacus. Nunc tempus tellus vitae duis rhoncus leo facilisis. Sapien nec mi lacus mi aliquet. Diam convallis fringilla libero duis integer integer dictum vel. Dolor montes nibh sapien dapibus ultrices praesent. Aeuismod phasellus taciti elit vehicula sit sociosqu. Lobortis neque urna dignissim penatibus felis vulputate. Primis magnis placerat, ligula massa facilisis nec.
|
|
1570
|
+
|
|
1571
|
+
Duis interdum himenaeos dis nisl et tortor condimentum accumsan. Laoreet amet fusce dis malesuada iaculis maximus fringilla. Conubia mus nibh felis vestibulum ad convallis mollis. Metus vivamus lobortis habitasse id nam. Egestas pretium eu penatibus consectetur malesuada congue tempus fusce. Rutrum neque pulvinar duis ligula fermentum malesuada. Tincidunt mollis molestie imperdiet ridiculus pharetra maximus sodales curabitur.
|
|
1572
|
+
|
|
1573
|
+
Sem nec integer fusce neque sagittis. Rutrum ipsum ante; urna enim primis consectetur nulla. Arcu ligula lectus varius magna ipsum, et dictum. Pharetra dignissim inceptos tristique natoque tempor volutpat. Luctus tristique himenaeos duis orci maecenas vel morbi. Habitasse a lacinia dignissim commodo elementum maecenas eu mollis. Fermentum tellus sem condimentum mattis elit lectus. Platea fusce arcu cras varius natoque? Volutpat tincidunt ridiculus mus massa ante dis sem ornare magna. Bibendum ornare ultrices proin efficitur; nascetur risus arcu.
|
|
1574
|
+
|
|
1575
|
+
Orci erat orci amet mollis venenatis. Feugiat torquent ex mattis, inceptos etiam integer. Class senectus aptent vivamus, semper dolor nisi at pretium volutpat. Natoque semper enim enim primis ultricies, pharetra pulvinar. Natoque litora tortor accumsan ridiculus lacinia integer; aliquet penatibus ridiculus. Placerat vestibulum justo tristique sapien senectus, et interdum et ridiculus. Urna aenean vel himenaeos; finibus a est efficitur donec. Dictum egestas quis fusce arcu; sapien himenaeos pretium congue. Semper et sapien nisi nascetur venenatis eros integer blandit.
|
|
1576
|
+
|
|
1577
|
+
Arcu per phasellus vehicula ad molestie? Eget arcu eget inceptos, eu ullamcorper diam. Gravida placerat elit ut hendrerit odio. Est lobortis imperdiet venenatis primis a. Facilisis integer maecenas adipiscing metus, rutrum curabitur. Dolor adipiscing himenaeos senectus tempus faucibus cras.
|
|
1578
|
+
|
|
1579
|
+
Massa torquent torquent ullamcorper erat nisl parturient primis eu pulvinar! Ridiculus sollicitudin dis eu, laoreet praesent hendrerit platea euismod. Lacinia dignissim suspendisse sagittis eu rutrum himenaeos curae massa diam. Platea ornare ridiculus consequat curabitur augue vestibulum ridiculus. Vel consectetur vivamus accumsan risus elementum? Imperdiet nascetur efficitur aliquam habitasse nascetur. Hendrerit quisque magnis in lacinia quis mauris.
|
|
1580
|
+
|
|
1581
|
+
Molestie fermentum blandit, viverra condimentum purus himenaeos. Fermentum congue a suspendisse ornare semper laoreet. Pharetra lacus non, iaculis ad taciti varius. Etiam nam risus vestibulum curabitur facilisis mattis, lorem hac id. Dignissim nibh tempor quam porta lectus nunc tincidunt aliquet. Tortor maximus maximus natoque nam magna torquent nec lectus mus. Vel fermentum semper vulputate penatibus vel purus.
|
|
1582
|
+
|
|
1583
|
+
Fermentum tincidunt penatibus platea himenaeos etiam sodales ad erat posuere. Vehicula vulputate sem blandit nullam sem. Condimentum eget lacus ad malesuada augue dui justo. Lobortis quis mauris pellentesque quam interdum sagittis. Nulla ullamcorper aptent hendrerit fusce hendrerit, cras cras magna. Ex quam torquent, congue dis est vulputate lacinia. Dignissim proin lacinia platea tortor elementum nullam. Purus natoque scelerisque habitant vestibulum; metus dui neque ipsum. Pellentesque augue montes fringilla et, maecenas habitant a.
|
|
1584
|
+
|
|
1585
|
+
Quam sapien eu scelerisque tristique, integer in rutrum gravida. Egestas lacinia nisi praesent turpis lacus maximus mus gravida. Dolor eget ultrices rhoncus velit; mollis id. Mi vulputate sed blandit nullam parturient venenatis. Neque vulputate iaculis nascetur felis fames ipsum adipiscing nullam? Vitae faucibus elit congue himenaeos orci volutpat nam. Magna tempus convallis vivamus eu semper. Egestas curabitur integer quis habitasse id taciti hac sociosqu morbi. Duis felis cursus potenti blandit cras dolor pharetra.
|
|
1586
|
+
|
|
1587
|
+
Ultricies vel primis nec mus malesuada congue? Habitasse semper mus ultricies; fermentum himenaeos placerat sodales. Platea sapien malesuada dignissim suscipit dis cras. Etiam odio pharetra metus donec odio natoque. Cras diam curae dapibus accumsan tortor mi laoreet. Ex mollis massa inceptos inceptos adipiscing. Cras rhoncus natoque accumsan augue enim. Parturient porttitor habitant semper platea elementum dictum ornare? Sociosqu blandit nullam vivamus elementum semper himenaeos.
|
|
1588
|
+
|
|
1589
|
+
Orci elit aliquam luctus habitant interdum. Tellus sollicitudin aliquam donec potenti praesent augue magnis auctor. Mattis faucibus iaculis etiam imperdiet lectus ad habitasse sollicitudin ac. Consequat maecenas quam dis adipiscing neque sociosqu. Ullamcorper in praesent himenaeos purus blandit nibh. Dignissim platea amet urna laoreet sociosqu lacinia accumsan consectetur risus. Adipiscing nullam arcu lobortis mi scelerisque feugiat non. Accumsan lacinia urna sit urna tincidunt nam pulvinar urna. Tellus cursus ac himenaeos sed aptent phasellus.
|
|
1590
|
+
|
|
1591
|
+
Scelerisque curabitur eget morbi leo phasellus morbi magnis. Elit nunc non vulputate eget at. Viverra efficitur dignissim fames ut condimentum tincidunt elementum lacus egestas. Dictum phasellus leo auctor dui diam. Sollicitudin placerat elit vehicula vulputate et at eleifend ullamcorper. Primis diam hac class leo justo etiam magnis. Justo maximus venenatis facilisis egestas hendrerit aptent arcu tortor consectetur. Consequat mus curabitur nisl; blandit enim at bibendum tempor bibendum. Ad nam arcu vehicula himenaeos sociosqu eu faucibus accumsan.
|
|
1592
|
+
|
|
1593
|
+
Maximus malesuada faucibus phasellus donec ligula. Rutrum pellentesque ultricies nullam; aenean scelerisque elementum. Porta luctus consectetur pharetra consequat varius. Ut dapibus senectus venenatis scelerisque fames ligula congue. Magna hendrerit faucibus ultricies tincidunt phasellus pellentesque, maecenas consequat! Malesuada senectus praesent sed condimentum aenean mi. Interdum sollicitudin mattis, purus vitae netus gravida. Nullam magna risus leo sit urna aenean.
|
|
1594
|
+
|
|
1595
|
+
Ut lacinia potenti vel varius habitant mus nullam adipiscing. Commodo potenti conubia hendrerit enim massa ad blandit. Nisl a massa nunc risus, condimentum enim. Hac aenean massa lacinia lobortis ad dolor sem. Nisl ex interdum blandit pulvinar pellentesque lorem. Sapien proin malesuada netus parturient pulvinar nec. Ex semper amet sem maximus blandit cras felis. Donec tellus auctor eleifend placerat natoque. Rutrum maecenas sollicitudin nisl consectetur in nulla rhoncus. Id rhoncus nec mi non lacinia leo efficitur nisi.
|
|
1596
|
+
|
|
1597
|
+
Dolor non phasellus id nascetur id nisi litora cubilia interdum. Lectus dolor sodales eu nulla porttitor placerat vulputate. Praesent ullamcorper consequat nulla torquent facilisis nunc. Rhoncus augue eleifend mauris erat duis varius felis. Dignissim nunc pulvinar vehicula dignissim maximus elit metus senectus. Venenatis conubia pulvinar commodo dui montes cubilia.
|
|
1598
|
+
|
|
1599
|
+
Cursus velit lacus aenean elit conubia. Velit in inceptos enim, elit lobortis est facilisis. Suscipit cursus dictum enim libero neque dolor himenaeos eu. Porta in integer praesent quisque quis sit. Primis velit tempus sit curae vehicula porttitor. Scelerisque nisi diam vehicula mi fusce dictum. Tincidunt mus eleifend commodo ridiculus adipiscing.
|
|
1600
|
+
|
|
1601
|
+
Pellentesque quis dignissim euismod in fermentum quam lobortis porta. Dis euismod ultricies montes odio sapien condimentum integer per. Torquent nascetur ante ante; diam ultrices nec habitant. Augue congue a conubia commodo ultricies tortor. Quis ridiculus netus vivamus dictumst efficitur parturient hendrerit. Facilisis ultrices suspendisse elit sodales eleifend maecenas tempor. Habitasse platea congue ac, pretium augue odio interdum netus. Mattis odio mi leo integer nisi diam phasellus elementum. Tortor himenaeos curabitur enim sit ac mi dictumst faucibus sociosqu.
|
|
1602
|
+
|
|
1603
|
+
Duis ex viverra auctor praesent elit ac. Sit ex at cubilia aenean scelerisque finibus ridiculus. Hendrerit imperdiet potenti erat risus commodo. Sit donec ullamcorper facilisi neque varius, suscipit malesuada hac. Nulla lacinia pulvinar non volutpat pellentesque lobortis ultrices dis. Faucibus luctus fusce, aliquam magnis pharetra sed dui nulla viverra. Lectus hendrerit eu pellentesque nostra mauris suspendisse himenaeos. Lectus bibendum inceptos commodo nulla magnis proin.`;
|
|
1139
1604
|
//# sourceMappingURL=testArtifacts.js.map
|