@expo/entity 0.55.0 → 0.57.0
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/build/src/AuthorizationResultBasedEntityAssociationLoader.d.ts +1 -1
- package/build/src/AuthorizationResultBasedEntityAssociationLoader.js.map +1 -1
- package/build/src/AuthorizationResultBasedEntityLoader.d.ts +18 -24
- package/build/src/AuthorizationResultBasedEntityLoader.js +37 -56
- package/build/src/AuthorizationResultBasedEntityLoader.js.map +1 -1
- package/build/src/AuthorizationResultBasedEntityMutator.js +26 -19
- package/build/src/AuthorizationResultBasedEntityMutator.js.map +1 -1
- package/build/src/EnforcingEntityCreator.d.ts +1 -1
- package/build/src/EnforcingEntityCreator.js +1 -1
- package/build/src/EnforcingEntityLoader.d.ts +1 -58
- package/build/src/EnforcingEntityLoader.js +0 -65
- package/build/src/EnforcingEntityLoader.js.map +1 -1
- package/build/src/Entity.d.ts +6 -0
- package/build/src/Entity.js +6 -0
- package/build/src/Entity.js.map +1 -1
- package/build/src/EntityCompanion.d.ts +2 -2
- package/build/src/EntityCompanion.js.map +1 -1
- package/build/src/EntityCompanionProvider.d.ts +1 -1
- package/build/src/EntityCompanionProvider.js +4 -4
- package/build/src/EntityConfiguration.d.ts +1 -1
- package/build/src/EntityConfiguration.js +1 -2
- package/build/src/EntityConfiguration.js.map +1 -1
- package/build/src/{EntityLoaderUtils.d.ts → EntityConstructionUtils.d.ts} +15 -29
- package/build/src/EntityConstructionUtils.js +118 -0
- package/build/src/EntityConstructionUtils.js.map +1 -0
- package/build/src/EntityDatabaseAdapter.d.ts +10 -108
- package/build/src/EntityDatabaseAdapter.js +14 -76
- package/build/src/EntityDatabaseAdapter.js.map +1 -1
- package/build/src/EntityFieldDefinition.d.ts +1 -1
- package/build/src/EntityInvalidationUtils.d.ts +41 -0
- package/build/src/EntityInvalidationUtils.js +71 -0
- package/build/src/EntityInvalidationUtils.js.map +1 -0
- package/build/src/EntityLoader.d.ts +0 -6
- package/build/src/EntityLoader.js +0 -7
- package/build/src/EntityLoader.js.map +1 -1
- package/build/src/EntityLoaderFactory.d.ts +4 -0
- package/build/src/EntityLoaderFactory.js +10 -3
- package/build/src/EntityLoaderFactory.js.map +1 -1
- package/build/src/EntityPrivacyPolicy.d.ts +27 -0
- package/build/src/EntityPrivacyPolicy.js +22 -1
- package/build/src/EntityPrivacyPolicy.js.map +1 -1
- package/build/src/EntitySecondaryCacheLoader.d.ts +14 -3
- package/build/src/EntitySecondaryCacheLoader.js +21 -4
- package/build/src/EntitySecondaryCacheLoader.js.map +1 -1
- package/build/src/ReadonlyEntity.d.ts +4 -5
- package/build/src/ReadonlyEntity.js +7 -8
- package/build/src/ReadonlyEntity.js.map +1 -1
- package/build/src/ViewerContext.d.ts +6 -6
- package/build/src/ViewerContext.js +8 -8
- package/build/src/ViewerScopedEntityCompanion.d.ts +1 -1
- package/build/src/ViewerScopedEntityCompanion.js.map +1 -1
- package/build/src/ViewerScopedEntityLoaderFactory.d.ts +4 -0
- package/build/src/ViewerScopedEntityLoaderFactory.js +6 -0
- package/build/src/ViewerScopedEntityLoaderFactory.js.map +1 -1
- package/build/src/errors/EntityDatabaseAdapterError.d.ts +4 -0
- package/build/src/errors/EntityDatabaseAdapterError.js +13 -1
- package/build/src/errors/EntityDatabaseAdapterError.js.map +1 -1
- package/build/src/errors/EntityError.d.ts +2 -1
- package/build/src/errors/EntityError.js +1 -0
- package/build/src/errors/EntityError.js.map +1 -1
- package/build/src/index.d.ts +2 -1
- package/build/src/index.js +2 -1
- package/build/src/index.js.map +1 -1
- package/build/src/internal/EntityDataManager.d.ts +8 -16
- package/build/src/internal/EntityDataManager.js +8 -18
- package/build/src/internal/EntityDataManager.js.map +1 -1
- package/build/src/internal/EntityFieldTransformationUtils.js.map +1 -1
- package/build/src/internal/EntityLoadInterfaces.d.ts +2 -0
- package/build/src/internal/EntityLoadInterfaces.js +2 -0
- package/build/src/internal/EntityLoadInterfaces.js.map +1 -1
- package/build/src/internal/EntityTableDataCoordinator.d.ts +2 -0
- package/build/src/internal/EntityTableDataCoordinator.js +4 -0
- package/build/src/internal/EntityTableDataCoordinator.js.map +1 -1
- package/build/src/metrics/EntityMetricsUtils.d.ts +1 -0
- package/build/src/metrics/EntityMetricsUtils.js +15 -1
- package/build/src/metrics/EntityMetricsUtils.js.map +1 -1
- package/build/src/metrics/IEntityMetricsAdapter.d.ts +4 -1
- package/build/src/metrics/IEntityMetricsAdapter.js +3 -0
- package/build/src/metrics/IEntityMetricsAdapter.js.map +1 -1
- package/build/src/rules/AllowIfAllSubRulesAllowPrivacyPolicyRule.d.ts +2 -2
- package/build/src/rules/AllowIfAnySubRuleAllowsPrivacyPolicyRule.d.ts +2 -2
- package/build/src/rules/EvaluateIfEntityFieldPredicatePrivacyPolicyRule.d.ts +2 -2
- package/build/src/rules/PrivacyPolicyRule.d.ts +2 -2
- package/build/src/utils/EntityPrivacyUtils.js +11 -20
- package/build/src/utils/EntityPrivacyUtils.js.map +1 -1
- package/build/src/utils/collections/maps.d.ts +2 -2
- package/build/src/utils/collections/maps.js +2 -2
- package/package.json +4 -4
- package/src/AuthorizationResultBasedEntityAssociationLoader.ts +4 -7
- package/src/AuthorizationResultBasedEntityLoader.ts +58 -88
- package/src/AuthorizationResultBasedEntityMutator.ts +35 -20
- package/src/EnforcingEntityCreator.ts +1 -1
- package/src/EnforcingEntityLoader.ts +1 -95
- package/src/Entity.ts +6 -0
- package/src/EntityCompanion.ts +2 -2
- package/src/EntityCompanionProvider.ts +4 -4
- package/src/EntityConfiguration.ts +8 -5
- package/src/EntityConstructionUtils.ts +168 -0
- package/src/EntityDatabaseAdapter.ts +32 -222
- package/src/EntityFieldDefinition.ts +1 -1
- package/src/{EntityLoaderUtils.ts → EntityInvalidationUtils.ts} +5 -96
- package/src/EntityLoader.ts +0 -16
- package/src/EntityLoaderFactory.ts +50 -10
- package/src/EntityPrivacyPolicy.ts +44 -1
- package/src/EntitySecondaryCacheLoader.ts +54 -3
- package/src/ReadonlyEntity.ts +9 -11
- package/src/ViewerContext.ts +10 -10
- package/src/ViewerScopedEntityCompanion.ts +1 -1
- package/src/ViewerScopedEntityLoaderFactory.ts +37 -0
- package/src/__tests__/AuthorizationResultBasedEntityLoader-constructor-test.ts +3 -5
- package/src/__tests__/AuthorizationResultBasedEntityLoader-test.ts +34 -419
- package/src/__tests__/ComposedCacheAdapter-test.ts +3 -3
- package/src/__tests__/EnforcingEntityLoader-test.ts +2 -134
- package/src/__tests__/EntityCompanion-test.ts +18 -0
- package/src/__tests__/EntityConfiguration-test.ts +4 -4
- package/src/__tests__/EntityDatabaseAdapter-test.ts +33 -68
- package/src/__tests__/EntityEdges-test.ts +10 -10
- package/src/__tests__/EntityLoader-test.ts +6 -4
- package/src/__tests__/EntityMutator-test.ts +27 -15
- package/src/__tests__/EntityPrivacyPolicy-test.ts +102 -0
- package/src/__tests__/EntityQueryContext-test.ts +11 -11
- package/src/__tests__/EntitySecondaryCacheLoader-test.ts +10 -5
- package/src/__tests__/EntitySelfReferentialEdges-test.ts +6 -6
- package/src/__tests__/GenericEntityCacheAdapter-test.ts +18 -15
- package/src/__tests__/GenericSecondaryEntityCache-test.ts +27 -5
- package/src/__tests__/ReadonlyEntity-test.ts +6 -4
- package/src/__tests__/ViewerContext-test.ts +4 -4
- package/src/__tests__/ViewerScopedEntityCompanion-test.ts +1 -0
- package/src/__tests__/cases/TwoEntitySameTableDisjointRows-test.ts +0 -17
- package/src/errors/EntityDatabaseAdapterError.ts +14 -0
- package/src/errors/EntityError.ts +1 -0
- package/src/errors/__tests__/EntityDatabaseAdapterError-test.ts +9 -0
- package/src/errors/__tests__/EntityError-test.ts +13 -5
- package/src/index.ts +2 -1
- package/src/internal/EntityDataManager.ts +19 -54
- package/src/internal/EntityFieldTransformationUtils.ts +5 -5
- package/src/internal/EntityLoadInterfaces.ts +2 -0
- package/src/internal/EntityTableDataCoordinator.ts +2 -2
- package/src/internal/__tests__/CompositeFieldHolder-test.ts +8 -2
- package/src/internal/__tests__/EntityDataManager-test.ts +71 -202
- package/src/internal/__tests__/ReadThroughEntityCache-test.ts +39 -24
- package/src/metrics/EntityMetricsUtils.ts +23 -0
- package/src/metrics/IEntityMetricsAdapter.ts +3 -0
- package/src/metrics/__tests__/EntityMetricsUtils-test.ts +120 -0
- package/src/rules/AllowIfAllSubRulesAllowPrivacyPolicyRule.ts +2 -2
- package/src/rules/AllowIfAnySubRuleAllowsPrivacyPolicyRule.ts +2 -2
- package/src/rules/EvaluateIfEntityFieldPredicatePrivacyPolicyRule.ts +2 -2
- package/src/rules/PrivacyPolicyRule.ts +2 -2
- package/src/rules/__tests__/AllowIfAllSubRulesAllowPrivacyPolicyRule-test.ts +4 -4
- package/src/rules/__tests__/AllowIfAnySubRuleAllowsPrivacyPolicyRule-test.ts +4 -4
- package/src/rules/__tests__/AllowIfInParentCascadeDeletionPrivacyPolicyRule-test.ts +11 -1
- package/src/rules/__tests__/AlwaysAllowPrivacyPolicyRule-test.ts +2 -2
- package/src/rules/__tests__/AlwaysDenyPrivacyPolicyRule-test.ts +2 -2
- package/src/rules/__tests__/AlwaysSkipPrivacyPolicyRule-test.ts +2 -2
- package/src/rules/__tests__/EvaluateIfEntityFieldPredicatePrivacyPolicyRule-test.ts +3 -3
- package/src/utils/EntityPrivacyUtils.ts +18 -29
- package/src/utils/__testfixtures__/PrivacyPolicyRuleTestUtils.ts +2 -2
- package/src/utils/__testfixtures__/StubDatabaseAdapter.ts +13 -101
- package/src/utils/__tests__/EntityCreationUtils-test.ts +6 -6
- package/src/utils/__tests__/EntityPrivacyUtils-test.ts +2 -2
- package/src/utils/collections/maps.ts +2 -2
- package/build/src/EntityLoaderUtils.js +0 -147
- package/build/src/EntityLoaderUtils.js.map +0 -1
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { describe, expect, it, jest } from '@jest/globals';
|
|
2
2
|
import {
|
|
3
3
|
anyNumber,
|
|
4
|
-
anyString,
|
|
5
4
|
anything,
|
|
6
5
|
deepEqual,
|
|
7
6
|
instance,
|
|
8
7
|
mock,
|
|
9
8
|
resetCalls,
|
|
10
|
-
spy,
|
|
11
9
|
verify,
|
|
12
10
|
when,
|
|
13
11
|
} from 'ts-mockito';
|
|
@@ -98,7 +96,7 @@ describe(EntityDataManager, () => {
|
|
|
98
96
|
|
|
99
97
|
const entityDatas = await entityDataManager.loadManyEqualingAsync(
|
|
100
98
|
queryContext,
|
|
101
|
-
new SingleFieldHolder('customIdField'),
|
|
99
|
+
new SingleFieldHolder<TestFields, 'customIdField', 'customIdField'>('customIdField'),
|
|
102
100
|
[new SingleFieldValueHolder('2')],
|
|
103
101
|
);
|
|
104
102
|
expect(entityDatas.get(new SingleFieldValueHolder('2'))).toHaveLength(1);
|
|
@@ -110,7 +108,7 @@ describe(EntityDataManager, () => {
|
|
|
110
108
|
|
|
111
109
|
const entityDatas2 = await entityDataManager.loadManyEqualingAsync(
|
|
112
110
|
queryContext,
|
|
113
|
-
new SingleFieldHolder('testIndexedField'),
|
|
111
|
+
new SingleFieldHolder<TestFields, 'customIdField', 'testIndexedField'>('testIndexedField'),
|
|
114
112
|
[new SingleFieldValueHolder('unique2'), new SingleFieldValueHolder('unique3')],
|
|
115
113
|
);
|
|
116
114
|
expect(entityDatas2.get(new SingleFieldValueHolder('unique2'))).toHaveLength(1);
|
|
@@ -122,7 +120,7 @@ describe(EntityDataManager, () => {
|
|
|
122
120
|
cacheSpy.mockClear();
|
|
123
121
|
});
|
|
124
122
|
|
|
125
|
-
it('loads from a caching
|
|
123
|
+
it('loads from a caching adapter', async () => {
|
|
126
124
|
const objects = getObjects();
|
|
127
125
|
const dataStore = StubDatabaseAdapter.convertFieldObjectsToDataStore(
|
|
128
126
|
testEntityConfiguration,
|
|
@@ -149,7 +147,7 @@ describe(EntityDataManager, () => {
|
|
|
149
147
|
|
|
150
148
|
const entityDatas = await entityDataManager.loadManyEqualingAsync(
|
|
151
149
|
queryContext,
|
|
152
|
-
new SingleFieldHolder('customIdField'),
|
|
150
|
+
new SingleFieldHolder<TestFields, 'customIdField', 'customIdField'>('customIdField'),
|
|
153
151
|
[new SingleFieldValueHolder('1')],
|
|
154
152
|
);
|
|
155
153
|
expect(entityDatas.get(new SingleFieldValueHolder('1'))).toHaveLength(1);
|
|
@@ -161,7 +159,7 @@ describe(EntityDataManager, () => {
|
|
|
161
159
|
|
|
162
160
|
const entityDatas2 = await entityDataManager.loadManyEqualingAsync(
|
|
163
161
|
queryContext,
|
|
164
|
-
new SingleFieldHolder('testIndexedField'),
|
|
162
|
+
new SingleFieldHolder<TestFields, 'customIdField', 'testIndexedField'>('testIndexedField'),
|
|
165
163
|
[new SingleFieldValueHolder('unique2'), new SingleFieldValueHolder('unique3')],
|
|
166
164
|
);
|
|
167
165
|
expect(entityDatas2.get(new SingleFieldValueHolder('unique2'))).toHaveLength(1);
|
|
@@ -208,12 +206,12 @@ describe(EntityDataManager, () => {
|
|
|
208
206
|
|
|
209
207
|
await entityDataManager.loadManyEqualingAsync(
|
|
210
208
|
queryContext,
|
|
211
|
-
new SingleFieldHolder('testIndexedField'),
|
|
209
|
+
new SingleFieldHolder<TestFields, 'customIdField', 'testIndexedField'>('testIndexedField'),
|
|
212
210
|
[new SingleFieldValueHolder('unique2')],
|
|
213
211
|
);
|
|
214
212
|
await entityDataManager2.loadManyEqualingAsync(
|
|
215
213
|
queryContext,
|
|
216
|
-
new SingleFieldHolder('testIndexedField'),
|
|
214
|
+
new SingleFieldHolder<TestFields, 'customIdField', 'testIndexedField'>('testIndexedField'),
|
|
217
215
|
[new SingleFieldValueHolder('unique2')],
|
|
218
216
|
);
|
|
219
217
|
|
|
@@ -251,12 +249,12 @@ describe(EntityDataManager, () => {
|
|
|
251
249
|
|
|
252
250
|
await entityDataManager.loadManyEqualingAsync(
|
|
253
251
|
queryContext,
|
|
254
|
-
new SingleFieldHolder('testIndexedField'),
|
|
252
|
+
new SingleFieldHolder<TestFields, 'customIdField', 'testIndexedField'>('testIndexedField'),
|
|
255
253
|
[new SingleFieldValueHolder('unique2')],
|
|
256
254
|
);
|
|
257
255
|
await entityDataManager.loadManyEqualingAsync(
|
|
258
256
|
queryContext,
|
|
259
|
-
new SingleFieldHolder('testIndexedField'),
|
|
257
|
+
new SingleFieldHolder<TestFields, 'customIdField', 'testIndexedField'>('testIndexedField'),
|
|
260
258
|
[new SingleFieldValueHolder('unique2')],
|
|
261
259
|
);
|
|
262
260
|
|
|
@@ -294,12 +292,12 @@ describe(EntityDataManager, () => {
|
|
|
294
292
|
|
|
295
293
|
const entityData = await entityDataManager.loadManyEqualingAsync(
|
|
296
294
|
queryContext,
|
|
297
|
-
new SingleFieldHolder('stringField'),
|
|
295
|
+
new SingleFieldHolder<TestFields, 'customIdField', 'stringField'>('stringField'),
|
|
298
296
|
[new SingleFieldValueHolder('hello'), new SingleFieldValueHolder('world')],
|
|
299
297
|
);
|
|
300
298
|
const entityData2 = await entityDataManager.loadManyEqualingAsync(
|
|
301
299
|
queryContext,
|
|
302
|
-
new SingleFieldHolder('stringField'),
|
|
300
|
+
new SingleFieldHolder<TestFields, 'customIdField', 'stringField'>('stringField'),
|
|
303
301
|
[new SingleFieldValueHolder('hello'), new SingleFieldValueHolder('world')],
|
|
304
302
|
);
|
|
305
303
|
|
|
@@ -343,12 +341,12 @@ describe(EntityDataManager, () => {
|
|
|
343
341
|
const [entityData, entityData2] = await Promise.all([
|
|
344
342
|
entityDataManager.loadManyEqualingAsync(
|
|
345
343
|
queryContext,
|
|
346
|
-
new SingleFieldHolder('stringField'),
|
|
344
|
+
new SingleFieldHolder<TestFields, 'customIdField', 'stringField'>('stringField'),
|
|
347
345
|
[new SingleFieldValueHolder('hello'), new SingleFieldValueHolder('world')],
|
|
348
346
|
),
|
|
349
347
|
entityDataManager.loadManyEqualingAsync(
|
|
350
348
|
queryContext,
|
|
351
|
-
new SingleFieldHolder('stringField'),
|
|
349
|
+
new SingleFieldHolder<TestFields, 'customIdField', 'stringField'>('stringField'),
|
|
352
350
|
[new SingleFieldValueHolder('hello'), new SingleFieldValueHolder('world')],
|
|
353
351
|
),
|
|
354
352
|
]);
|
|
@@ -356,7 +354,7 @@ describe(EntityDataManager, () => {
|
|
|
356
354
|
async (innerQueryContext) => {
|
|
357
355
|
const entityData3 = await entityDataManager.loadManyEqualingAsync(
|
|
358
356
|
innerQueryContext,
|
|
359
|
-
new SingleFieldHolder('stringField'),
|
|
357
|
+
new SingleFieldHolder<TestFields, 'customIdField', 'stringField'>('stringField'),
|
|
360
358
|
[new SingleFieldValueHolder('hello'), new SingleFieldValueHolder('world')],
|
|
361
359
|
);
|
|
362
360
|
|
|
@@ -364,7 +362,7 @@ describe(EntityDataManager, () => {
|
|
|
364
362
|
async (innerInnerQueryContext) => {
|
|
365
363
|
return await entityDataManager.loadManyEqualingAsync(
|
|
366
364
|
innerInnerQueryContext,
|
|
367
|
-
new SingleFieldHolder('stringField'),
|
|
365
|
+
new SingleFieldHolder<TestFields, 'customIdField', 'stringField'>('stringField'),
|
|
368
366
|
[new SingleFieldValueHolder('hello'), new SingleFieldValueHolder('world')],
|
|
369
367
|
);
|
|
370
368
|
},
|
|
@@ -419,19 +417,19 @@ describe(EntityDataManager, () => {
|
|
|
419
417
|
await new StubQueryContextProvider().runInTransactionAsync(async (queryContext) => {
|
|
420
418
|
const entityData = await entityDataManager.loadManyEqualingAsync(
|
|
421
419
|
queryContext,
|
|
422
|
-
new SingleFieldHolder('stringField'),
|
|
420
|
+
new SingleFieldHolder<TestFields, 'customIdField', 'stringField'>('stringField'),
|
|
423
421
|
[new SingleFieldValueHolder('hello'), new SingleFieldValueHolder('world')],
|
|
424
422
|
);
|
|
425
423
|
const entityData2 = await entityDataManager.loadManyEqualingAsync(
|
|
426
424
|
queryContext,
|
|
427
|
-
new SingleFieldHolder('stringField'),
|
|
425
|
+
new SingleFieldHolder<TestFields, 'customIdField', 'stringField'>('stringField'),
|
|
428
426
|
[new SingleFieldValueHolder('hello'), new SingleFieldValueHolder('world')],
|
|
429
427
|
);
|
|
430
428
|
const [entityData3, entityData4] = await queryContext.runInNestedTransactionAsync(
|
|
431
429
|
async (innerQueryContext) => {
|
|
432
430
|
const entityData3 = await entityDataManager.loadManyEqualingAsync(
|
|
433
431
|
innerQueryContext,
|
|
434
|
-
new SingleFieldHolder('stringField'),
|
|
432
|
+
new SingleFieldHolder<TestFields, 'customIdField', 'stringField'>('stringField'),
|
|
435
433
|
[new SingleFieldValueHolder('hello'), new SingleFieldValueHolder('world')],
|
|
436
434
|
);
|
|
437
435
|
|
|
@@ -439,7 +437,7 @@ describe(EntityDataManager, () => {
|
|
|
439
437
|
async (innerInnerQueryContext) => {
|
|
440
438
|
return await entityDataManager.loadManyEqualingAsync(
|
|
441
439
|
innerInnerQueryContext,
|
|
442
|
-
new SingleFieldHolder('stringField'),
|
|
440
|
+
new SingleFieldHolder<TestFields, 'customIdField', 'stringField'>('stringField'),
|
|
443
441
|
[new SingleFieldValueHolder('hello'), new SingleFieldValueHolder('world')],
|
|
444
442
|
);
|
|
445
443
|
},
|
|
@@ -495,19 +493,19 @@ describe(EntityDataManager, () => {
|
|
|
495
493
|
async (queryContext) => {
|
|
496
494
|
const entityData = await entityDataManager.loadManyEqualingAsync(
|
|
497
495
|
queryContext,
|
|
498
|
-
new SingleFieldHolder('stringField'),
|
|
496
|
+
new SingleFieldHolder<TestFields, 'customIdField', 'stringField'>('stringField'),
|
|
499
497
|
[new SingleFieldValueHolder('hello'), new SingleFieldValueHolder('world')],
|
|
500
498
|
);
|
|
501
499
|
const entityData2 = await entityDataManager.loadManyEqualingAsync(
|
|
502
500
|
queryContext,
|
|
503
|
-
new SingleFieldHolder('stringField'),
|
|
501
|
+
new SingleFieldHolder<TestFields, 'customIdField', 'stringField'>('stringField'),
|
|
504
502
|
[new SingleFieldValueHolder('hello'), new SingleFieldValueHolder('world')],
|
|
505
503
|
);
|
|
506
504
|
const [entityData3, entityData4] = await queryContext.runInNestedTransactionAsync(
|
|
507
505
|
async (innerQueryContext) => {
|
|
508
506
|
const entityData3 = await entityDataManager.loadManyEqualingAsync(
|
|
509
507
|
innerQueryContext,
|
|
510
|
-
new SingleFieldHolder('stringField'),
|
|
508
|
+
new SingleFieldHolder<TestFields, 'customIdField', 'stringField'>('stringField'),
|
|
511
509
|
[new SingleFieldValueHolder('hello'), new SingleFieldValueHolder('world')],
|
|
512
510
|
);
|
|
513
511
|
|
|
@@ -515,7 +513,9 @@ describe(EntityDataManager, () => {
|
|
|
515
513
|
async (innerInnerQueryContext) => {
|
|
516
514
|
return await entityDataManager.loadManyEqualingAsync(
|
|
517
515
|
innerInnerQueryContext,
|
|
518
|
-
new SingleFieldHolder
|
|
516
|
+
new SingleFieldHolder<TestFields, 'customIdField', 'stringField'>(
|
|
517
|
+
'stringField',
|
|
518
|
+
),
|
|
519
519
|
[new SingleFieldValueHolder('hello'), new SingleFieldValueHolder('world')],
|
|
520
520
|
);
|
|
521
521
|
},
|
|
@@ -574,18 +574,18 @@ describe(EntityDataManager, () => {
|
|
|
574
574
|
|
|
575
575
|
await entityDataManager.loadManyEqualingAsync(
|
|
576
576
|
queryContext,
|
|
577
|
-
new SingleFieldHolder('testIndexedField'),
|
|
577
|
+
new SingleFieldHolder<TestFields, 'customIdField', 'testIndexedField'>('testIndexedField'),
|
|
578
578
|
[new SingleFieldValueHolder(objectInQuestion['testIndexedField'])],
|
|
579
579
|
);
|
|
580
580
|
await entityDataManager.invalidateKeyValuePairsAsync([
|
|
581
581
|
[
|
|
582
|
-
new SingleFieldHolder('testIndexedField'),
|
|
582
|
+
new SingleFieldHolder<TestFields, 'customIdField', 'testIndexedField'>('testIndexedField'),
|
|
583
583
|
new SingleFieldValueHolder(objectInQuestion['testIndexedField']),
|
|
584
584
|
],
|
|
585
585
|
]);
|
|
586
586
|
await entityDataManager.loadManyEqualingAsync(
|
|
587
587
|
queryContext,
|
|
588
|
-
new SingleFieldHolder('testIndexedField'),
|
|
588
|
+
new SingleFieldHolder<TestFields, 'customIdField', 'testIndexedField'>('testIndexedField'),
|
|
589
589
|
[new SingleFieldValueHolder(objectInQuestion['testIndexedField'])],
|
|
590
590
|
);
|
|
591
591
|
|
|
@@ -625,18 +625,18 @@ describe(EntityDataManager, () => {
|
|
|
625
625
|
|
|
626
626
|
await entityDataManager.loadManyEqualingAsync(
|
|
627
627
|
queryContext,
|
|
628
|
-
new SingleFieldHolder('testIndexedField'),
|
|
628
|
+
new SingleFieldHolder<TestFields, 'customIdField', 'testIndexedField'>('testIndexedField'),
|
|
629
629
|
[new SingleFieldValueHolder(objectInQuestion['testIndexedField'])],
|
|
630
630
|
);
|
|
631
631
|
await entityDataManager.invalidateKeyValuePairsAsync([
|
|
632
632
|
[
|
|
633
|
-
new SingleFieldHolder('testIndexedField'),
|
|
633
|
+
new SingleFieldHolder<TestFields, 'customIdField', 'testIndexedField'>('testIndexedField'),
|
|
634
634
|
new SingleFieldValueHolder(objectInQuestion['testIndexedField']),
|
|
635
635
|
],
|
|
636
636
|
]);
|
|
637
637
|
await entityDataManager.loadManyEqualingAsync(
|
|
638
638
|
queryContext,
|
|
639
|
-
new SingleFieldHolder('customIdField'),
|
|
639
|
+
new SingleFieldHolder<TestFields, 'customIdField', 'customIdField'>('customIdField'),
|
|
640
640
|
[new SingleFieldValueHolder(objectInQuestion['customIdField'])],
|
|
641
641
|
);
|
|
642
642
|
|
|
@@ -676,18 +676,20 @@ describe(EntityDataManager, () => {
|
|
|
676
676
|
|
|
677
677
|
await entityDataManager.loadManyEqualingAsync(
|
|
678
678
|
queryContext,
|
|
679
|
-
new SingleFieldHolder('testIndexedField'),
|
|
679
|
+
new SingleFieldHolder<TestFields, 'customIdField', 'testIndexedField'>('testIndexedField'),
|
|
680
680
|
[new SingleFieldValueHolder(objectInQuestion['testIndexedField'])],
|
|
681
681
|
);
|
|
682
682
|
entityDataManager.invalidateKeyValuePairsForTransaction(queryContext, [
|
|
683
683
|
[
|
|
684
|
-
new SingleFieldHolder
|
|
684
|
+
new SingleFieldHolder<TestFields, 'customIdField', 'testIndexedField'>(
|
|
685
|
+
'testIndexedField',
|
|
686
|
+
),
|
|
685
687
|
new SingleFieldValueHolder(objectInQuestion['testIndexedField']),
|
|
686
688
|
],
|
|
687
689
|
]);
|
|
688
690
|
await entityDataManager.loadManyEqualingAsync(
|
|
689
691
|
queryContext,
|
|
690
|
-
new SingleFieldHolder('testIndexedField'),
|
|
692
|
+
new SingleFieldHolder<TestFields, 'customIdField', 'testIndexedField'>('testIndexedField'),
|
|
691
693
|
[new SingleFieldValueHolder(objectInQuestion['testIndexedField'])],
|
|
692
694
|
);
|
|
693
695
|
|
|
@@ -700,18 +702,24 @@ describe(EntityDataManager, () => {
|
|
|
700
702
|
await queryContext.runInNestedTransactionAsync(async (innerQueryContext) => {
|
|
701
703
|
await entityDataManager.loadManyEqualingAsync(
|
|
702
704
|
innerQueryContext,
|
|
703
|
-
new SingleFieldHolder
|
|
705
|
+
new SingleFieldHolder<TestFields, 'customIdField', 'testIndexedField'>(
|
|
706
|
+
'testIndexedField',
|
|
707
|
+
),
|
|
704
708
|
[new SingleFieldValueHolder(objectInQuestion['testIndexedField'])],
|
|
705
709
|
);
|
|
706
710
|
entityDataManager.invalidateKeyValuePairsForTransaction(innerQueryContext, [
|
|
707
711
|
[
|
|
708
|
-
new SingleFieldHolder
|
|
712
|
+
new SingleFieldHolder<TestFields, 'customIdField', 'testIndexedField'>(
|
|
713
|
+
'testIndexedField',
|
|
714
|
+
),
|
|
709
715
|
new SingleFieldValueHolder(objectInQuestion['testIndexedField']),
|
|
710
716
|
],
|
|
711
717
|
]);
|
|
712
718
|
await entityDataManager.loadManyEqualingAsync(
|
|
713
719
|
innerQueryContext,
|
|
714
|
-
new SingleFieldHolder
|
|
720
|
+
new SingleFieldHolder<TestFields, 'customIdField', 'testIndexedField'>(
|
|
721
|
+
'testIndexedField',
|
|
722
|
+
),
|
|
715
723
|
[new SingleFieldValueHolder(objectInQuestion['testIndexedField'])],
|
|
716
724
|
);
|
|
717
725
|
|
|
@@ -754,18 +762,24 @@ describe(EntityDataManager, () => {
|
|
|
754
762
|
|
|
755
763
|
await entityDataManager.loadManyEqualingAsync(
|
|
756
764
|
queryContext,
|
|
757
|
-
new SingleFieldHolder
|
|
765
|
+
new SingleFieldHolder<TestFields, 'customIdField', 'testIndexedField'>(
|
|
766
|
+
'testIndexedField',
|
|
767
|
+
),
|
|
758
768
|
[new SingleFieldValueHolder(objectInQuestion['testIndexedField'])],
|
|
759
769
|
);
|
|
760
770
|
entityDataManager.invalidateKeyValuePairsForTransaction(queryContext, [
|
|
761
771
|
[
|
|
762
|
-
new SingleFieldHolder
|
|
772
|
+
new SingleFieldHolder<TestFields, 'customIdField', 'testIndexedField'>(
|
|
773
|
+
'testIndexedField',
|
|
774
|
+
),
|
|
763
775
|
new SingleFieldValueHolder(objectInQuestion['testIndexedField']),
|
|
764
776
|
],
|
|
765
777
|
]);
|
|
766
778
|
await entityDataManager.loadManyEqualingAsync(
|
|
767
779
|
queryContext,
|
|
768
|
-
new SingleFieldHolder
|
|
780
|
+
new SingleFieldHolder<TestFields, 'customIdField', 'testIndexedField'>(
|
|
781
|
+
'testIndexedField',
|
|
782
|
+
),
|
|
769
783
|
[new SingleFieldValueHolder(objectInQuestion['testIndexedField'])],
|
|
770
784
|
);
|
|
771
785
|
|
|
@@ -809,7 +823,7 @@ describe(EntityDataManager, () => {
|
|
|
809
823
|
async (queryContext) => {
|
|
810
824
|
return await entityDataManager.loadManyEqualingAsync(
|
|
811
825
|
queryContext,
|
|
812
|
-
new SingleFieldHolder('customIdField'),
|
|
826
|
+
new SingleFieldHolder<TestFields, 'customIdField', 'customIdField'>('customIdField'),
|
|
813
827
|
[new SingleFieldValueHolder('1')],
|
|
814
828
|
);
|
|
815
829
|
},
|
|
@@ -825,55 +839,6 @@ describe(EntityDataManager, () => {
|
|
|
825
839
|
cacheSpy.mockReset();
|
|
826
840
|
});
|
|
827
841
|
|
|
828
|
-
it('loads by field equality conjunction and does not cache', async () => {
|
|
829
|
-
const objects = getObjects();
|
|
830
|
-
const dataStore = StubDatabaseAdapter.convertFieldObjectsToDataStore(
|
|
831
|
-
testEntityConfiguration,
|
|
832
|
-
objects,
|
|
833
|
-
);
|
|
834
|
-
const databaseAdapter = new StubDatabaseAdapter<TestFields, 'customIdField'>(
|
|
835
|
-
testEntityConfiguration,
|
|
836
|
-
dataStore,
|
|
837
|
-
);
|
|
838
|
-
const cacheAdapterProvider = new InMemoryFullCacheStubCacheAdapterProvider();
|
|
839
|
-
const cacheAdapter = cacheAdapterProvider.getCacheAdapter(testEntityConfiguration);
|
|
840
|
-
const entityCache = new ReadThroughEntityCache(testEntityConfiguration, cacheAdapter);
|
|
841
|
-
const entityDataManager = new EntityDataManager(
|
|
842
|
-
databaseAdapter,
|
|
843
|
-
entityCache,
|
|
844
|
-
new StubQueryContextProvider(),
|
|
845
|
-
new NoOpEntityMetricsAdapter(),
|
|
846
|
-
TestEntity.name,
|
|
847
|
-
);
|
|
848
|
-
const queryContext = new StubQueryContextProvider().getQueryContext();
|
|
849
|
-
|
|
850
|
-
const dbSpy = jest.spyOn(databaseAdapter, 'fetchManyByFieldEqualityConjunctionAsync');
|
|
851
|
-
const cacheSpy = jest.spyOn(entityCache, 'readManyThroughAsync');
|
|
852
|
-
|
|
853
|
-
const entityDatas = await entityDataManager.loadManyByFieldEqualityConjunctionAsync(
|
|
854
|
-
queryContext,
|
|
855
|
-
[
|
|
856
|
-
{
|
|
857
|
-
fieldName: 'stringField',
|
|
858
|
-
fieldValue: 'hello',
|
|
859
|
-
},
|
|
860
|
-
{
|
|
861
|
-
fieldName: 'intField',
|
|
862
|
-
fieldValue: 1,
|
|
863
|
-
},
|
|
864
|
-
],
|
|
865
|
-
{},
|
|
866
|
-
);
|
|
867
|
-
|
|
868
|
-
expect(entityDatas).toHaveLength(2);
|
|
869
|
-
|
|
870
|
-
expect(dbSpy).toHaveBeenCalled();
|
|
871
|
-
expect(cacheSpy).not.toHaveBeenCalled();
|
|
872
|
-
|
|
873
|
-
dbSpy.mockReset();
|
|
874
|
-
cacheSpy.mockReset();
|
|
875
|
-
});
|
|
876
|
-
|
|
877
842
|
it('handles DB errors as expected', async () => {
|
|
878
843
|
const databaseAdapterMock = mock<EntityDatabaseAdapter<TestFields, 'customIdField'>>();
|
|
879
844
|
when(databaseAdapterMock.fetchManyWhereAsync(anything(), anything(), anything())).thenReject(
|
|
@@ -896,7 +861,7 @@ describe(EntityDataManager, () => {
|
|
|
896
861
|
await expect(
|
|
897
862
|
entityDataManager.loadManyEqualingAsync(
|
|
898
863
|
queryContext,
|
|
899
|
-
new SingleFieldHolder('customIdField'),
|
|
864
|
+
new SingleFieldHolder<TestFields, 'customIdField', 'customIdField'>('customIdField'),
|
|
900
865
|
[new SingleFieldValueHolder('2')],
|
|
901
866
|
),
|
|
902
867
|
).rejects.toThrow();
|
|
@@ -932,7 +897,7 @@ describe(EntityDataManager, () => {
|
|
|
932
897
|
// for dataloader, cache, and database
|
|
933
898
|
await entityDataManager.loadManyEqualingAsync(
|
|
934
899
|
queryContext,
|
|
935
|
-
new SingleFieldHolder('testIndexedField'),
|
|
900
|
+
new SingleFieldHolder<TestFields, 'customIdField', 'testIndexedField'>('testIndexedField'),
|
|
936
901
|
[new SingleFieldValueHolder('unique1')],
|
|
937
902
|
);
|
|
938
903
|
verify(
|
|
@@ -987,7 +952,7 @@ describe(EntityDataManager, () => {
|
|
|
987
952
|
// entity is in local dataloader
|
|
988
953
|
await entityDataManager.loadManyEqualingAsync(
|
|
989
954
|
queryContext,
|
|
990
|
-
new SingleFieldHolder('testIndexedField'),
|
|
955
|
+
new SingleFieldHolder<TestFields, 'customIdField', 'testIndexedField'>('testIndexedField'),
|
|
991
956
|
[new SingleFieldValueHolder('unique1')],
|
|
992
957
|
);
|
|
993
958
|
verify(metricsAdapterMock.incrementDataManagerLoadCount(anything())).once();
|
|
@@ -1017,7 +982,7 @@ describe(EntityDataManager, () => {
|
|
|
1017
982
|
);
|
|
1018
983
|
await entityDataManager2.loadManyEqualingAsync(
|
|
1019
984
|
queryContext,
|
|
1020
|
-
new SingleFieldHolder('testIndexedField'),
|
|
985
|
+
new SingleFieldHolder<TestFields, 'customIdField', 'testIndexedField'>('testIndexedField'),
|
|
1021
986
|
[new SingleFieldValueHolder('unique1'), new SingleFieldValueHolder('unique2')],
|
|
1022
987
|
);
|
|
1023
988
|
verify(metricsAdapterMock.incrementDataManagerLoadCount(anything())).thrice();
|
|
@@ -1054,56 +1019,6 @@ describe(EntityDataManager, () => {
|
|
|
1054
1019
|
}),
|
|
1055
1020
|
),
|
|
1056
1021
|
).once();
|
|
1057
|
-
|
|
1058
|
-
resetCalls(metricsAdapterMock);
|
|
1059
|
-
|
|
1060
|
-
await entityDataManager.loadManyByFieldEqualityConjunctionAsync(
|
|
1061
|
-
queryContext,
|
|
1062
|
-
[
|
|
1063
|
-
{
|
|
1064
|
-
fieldName: 'testIndexedField',
|
|
1065
|
-
fieldValue: 'unique1',
|
|
1066
|
-
},
|
|
1067
|
-
],
|
|
1068
|
-
{},
|
|
1069
|
-
);
|
|
1070
|
-
verify(
|
|
1071
|
-
metricsAdapterMock.logDataManagerLoadEvent(
|
|
1072
|
-
deepEqual({
|
|
1073
|
-
type: EntityMetricsLoadType.LOAD_MANY_EQUALITY_CONJUNCTION,
|
|
1074
|
-
isInTransaction: false,
|
|
1075
|
-
entityClassName: TestEntity.name,
|
|
1076
|
-
duration: anyNumber(),
|
|
1077
|
-
count: 1,
|
|
1078
|
-
}),
|
|
1079
|
-
),
|
|
1080
|
-
).once();
|
|
1081
|
-
|
|
1082
|
-
resetCalls(metricsAdapterMock);
|
|
1083
|
-
|
|
1084
|
-
const databaseAdapterSpy = spy(databaseAdapter);
|
|
1085
|
-
when(
|
|
1086
|
-
databaseAdapterSpy.fetchManyByRawWhereClauseAsync(
|
|
1087
|
-
anything(),
|
|
1088
|
-
anyString(),
|
|
1089
|
-
anything(),
|
|
1090
|
-
anything(),
|
|
1091
|
-
),
|
|
1092
|
-
).thenResolve([]);
|
|
1093
|
-
await entityDataManager.loadManyByRawWhereClauseAsync(queryContext, '', [], {});
|
|
1094
|
-
verify(
|
|
1095
|
-
metricsAdapterMock.logDataManagerLoadEvent(
|
|
1096
|
-
deepEqual({
|
|
1097
|
-
type: EntityMetricsLoadType.LOAD_MANY_RAW,
|
|
1098
|
-
isInTransaction: false,
|
|
1099
|
-
entityClassName: TestEntity.name,
|
|
1100
|
-
duration: anyNumber(),
|
|
1101
|
-
count: 0,
|
|
1102
|
-
}),
|
|
1103
|
-
),
|
|
1104
|
-
).once();
|
|
1105
|
-
|
|
1106
|
-
verify(metricsAdapterMock.incrementDataManagerLoadCount(anything())).never();
|
|
1107
1022
|
});
|
|
1108
1023
|
|
|
1109
1024
|
it('records metrics appropriately inside of transactions', async () => {
|
|
@@ -1135,7 +1050,9 @@ describe(EntityDataManager, () => {
|
|
|
1135
1050
|
// for dataloader, cache, and database
|
|
1136
1051
|
await entityDataManager.loadManyEqualingAsync(
|
|
1137
1052
|
queryContext,
|
|
1138
|
-
new SingleFieldHolder
|
|
1053
|
+
new SingleFieldHolder<TestFields, 'customIdField', 'testIndexedField'>(
|
|
1054
|
+
'testIndexedField',
|
|
1055
|
+
),
|
|
1139
1056
|
[new SingleFieldValueHolder('unique1')],
|
|
1140
1057
|
);
|
|
1141
1058
|
verify(
|
|
@@ -1179,7 +1096,9 @@ describe(EntityDataManager, () => {
|
|
|
1179
1096
|
// entity is in local dataloader
|
|
1180
1097
|
await entityDataManager.loadManyEqualingAsync(
|
|
1181
1098
|
queryContext,
|
|
1182
|
-
new SingleFieldHolder
|
|
1099
|
+
new SingleFieldHolder<TestFields, 'customIdField', 'testIndexedField'>(
|
|
1100
|
+
'testIndexedField',
|
|
1101
|
+
),
|
|
1183
1102
|
[new SingleFieldValueHolder('unique1')],
|
|
1184
1103
|
);
|
|
1185
1104
|
verify(metricsAdapterMock.incrementDataManagerLoadCount(anything())).once();
|
|
@@ -1194,56 +1113,6 @@ describe(EntityDataManager, () => {
|
|
|
1194
1113
|
}),
|
|
1195
1114
|
),
|
|
1196
1115
|
).once();
|
|
1197
|
-
|
|
1198
|
-
resetCalls(metricsAdapterMock);
|
|
1199
|
-
|
|
1200
|
-
await entityDataManager.loadManyByFieldEqualityConjunctionAsync(
|
|
1201
|
-
queryContext,
|
|
1202
|
-
[
|
|
1203
|
-
{
|
|
1204
|
-
fieldName: 'testIndexedField',
|
|
1205
|
-
fieldValue: 'unique1',
|
|
1206
|
-
},
|
|
1207
|
-
],
|
|
1208
|
-
{},
|
|
1209
|
-
);
|
|
1210
|
-
verify(
|
|
1211
|
-
metricsAdapterMock.logDataManagerLoadEvent(
|
|
1212
|
-
deepEqual({
|
|
1213
|
-
type: EntityMetricsLoadType.LOAD_MANY_EQUALITY_CONJUNCTION,
|
|
1214
|
-
isInTransaction: true,
|
|
1215
|
-
entityClassName: TestEntity.name,
|
|
1216
|
-
duration: anyNumber(),
|
|
1217
|
-
count: 1,
|
|
1218
|
-
}),
|
|
1219
|
-
),
|
|
1220
|
-
).once();
|
|
1221
|
-
|
|
1222
|
-
resetCalls(metricsAdapterMock);
|
|
1223
|
-
|
|
1224
|
-
const databaseAdapterSpy = spy(databaseAdapter);
|
|
1225
|
-
when(
|
|
1226
|
-
databaseAdapterSpy.fetchManyByRawWhereClauseAsync(
|
|
1227
|
-
anything(),
|
|
1228
|
-
anyString(),
|
|
1229
|
-
anything(),
|
|
1230
|
-
anything(),
|
|
1231
|
-
),
|
|
1232
|
-
).thenResolve([]);
|
|
1233
|
-
await entityDataManager.loadManyByRawWhereClauseAsync(queryContext, '', [], {});
|
|
1234
|
-
verify(
|
|
1235
|
-
metricsAdapterMock.logDataManagerLoadEvent(
|
|
1236
|
-
deepEqual({
|
|
1237
|
-
type: EntityMetricsLoadType.LOAD_MANY_RAW,
|
|
1238
|
-
isInTransaction: true,
|
|
1239
|
-
entityClassName: TestEntity.name,
|
|
1240
|
-
duration: anyNumber(),
|
|
1241
|
-
count: 0,
|
|
1242
|
-
}),
|
|
1243
|
-
),
|
|
1244
|
-
).once();
|
|
1245
|
-
|
|
1246
|
-
verify(metricsAdapterMock.incrementDataManagerLoadCount(anything())).never();
|
|
1247
1116
|
});
|
|
1248
1117
|
});
|
|
1249
1118
|
});
|
|
@@ -1273,16 +1142,16 @@ describe(EntityDataManager, () => {
|
|
|
1273
1142
|
await expect(
|
|
1274
1143
|
entityDataManager.loadManyEqualingAsync(
|
|
1275
1144
|
queryContext,
|
|
1276
|
-
new SingleFieldHolder('nullableField'),
|
|
1277
|
-
[new SingleFieldValueHolder(null
|
|
1145
|
+
new SingleFieldHolder<TestFields, 'customIdField', 'nullableField'>('nullableField'),
|
|
1146
|
+
[new SingleFieldValueHolder(null)],
|
|
1278
1147
|
),
|
|
1279
1148
|
).rejects.toThrow('Invalid load: TestEntity (nullableField = null)');
|
|
1280
1149
|
|
|
1281
1150
|
await expect(
|
|
1282
1151
|
entityDataManager.loadManyEqualingAsync(
|
|
1283
1152
|
queryContext,
|
|
1284
|
-
new SingleFieldHolder('nullableField'),
|
|
1285
|
-
[new SingleFieldValueHolder(undefined
|
|
1153
|
+
new SingleFieldHolder<TestFields, 'customIdField', 'nullableField'>('nullableField'),
|
|
1154
|
+
[new SingleFieldValueHolder(undefined)],
|
|
1286
1155
|
),
|
|
1287
1156
|
).rejects.toThrow('Invalid load: TestEntity (nullableField = undefined)');
|
|
1288
1157
|
});
|
|
@@ -1318,7 +1187,7 @@ describe(EntityDataManager, () => {
|
|
|
1318
1187
|
]),
|
|
1319
1188
|
[
|
|
1320
1189
|
new CompositeFieldValueHolder({
|
|
1321
|
-
nullableField: null
|
|
1190
|
+
nullableField: null,
|
|
1322
1191
|
testIndexedField: 'unique1',
|
|
1323
1192
|
}),
|
|
1324
1193
|
],
|
|
@@ -1336,7 +1205,7 @@ describe(EntityDataManager, () => {
|
|
|
1336
1205
|
]),
|
|
1337
1206
|
[
|
|
1338
1207
|
new CompositeFieldValueHolder({
|
|
1339
|
-
nullableField: undefined
|
|
1208
|
+
nullableField: undefined,
|
|
1340
1209
|
testIndexedField: 'unique1',
|
|
1341
1210
|
}),
|
|
1342
1211
|
],
|