@karmaniverous/entity-manager 4.3.0-1 → 4.3.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.
|
@@ -260,9 +260,19 @@ class EntityManager {
|
|
|
260
260
|
|
|
261
261
|
// Generate default pageKeys if not provided
|
|
262
262
|
pageKeys ??= (0, _fromPairs2.default)(this.getKeySpace(entityToken, keyToken, item).map(shardedKey => [shardedKey, undefined]));
|
|
263
|
+
console.debug('*** EntityManager.query parsed params ***\n', {
|
|
264
|
+
entityToken,
|
|
265
|
+
keyToken,
|
|
266
|
+
item,
|
|
267
|
+
shardQuery,
|
|
268
|
+
limit,
|
|
269
|
+
pageKeys,
|
|
270
|
+
pages
|
|
271
|
+
});
|
|
263
272
|
|
|
264
273
|
// Return empty result if no pageKeys.
|
|
265
274
|
if ((0, _isEmpty2.default)(pageKeys)) return {
|
|
275
|
+
count: 0,
|
|
266
276
|
items: [],
|
|
267
277
|
pageKeys: {}
|
|
268
278
|
};
|
|
@@ -316,6 +326,7 @@ class EntityManager {
|
|
|
316
326
|
items: [],
|
|
317
327
|
pageKeys: {}
|
|
318
328
|
});
|
|
329
|
+
console.debug(`*** EntityManager.query page ${page} result ***\n`, pageResult);
|
|
319
330
|
result.count += pageResult.count;
|
|
320
331
|
result.items = [...result.items, ...pageResult.items];
|
|
321
332
|
result.pageKeys = pageResult.pageKeys;
|
|
@@ -253,8 +253,18 @@ export class EntityManager {
|
|
|
253
253
|
])
|
|
254
254
|
);
|
|
255
255
|
|
|
256
|
+
console.debug('*** EntityManager.query parsed params ***\n', {
|
|
257
|
+
entityToken,
|
|
258
|
+
keyToken,
|
|
259
|
+
item,
|
|
260
|
+
shardQuery,
|
|
261
|
+
limit,
|
|
262
|
+
pageKeys,
|
|
263
|
+
pages,
|
|
264
|
+
});
|
|
265
|
+
|
|
256
266
|
// Return empty result if no pageKeys.
|
|
257
|
-
if (_.isEmpty(pageKeys)) return { items: [], pageKeys: {} };
|
|
267
|
+
if (_.isEmpty(pageKeys)) return { count: 0, items: [], pageKeys: {} };
|
|
258
268
|
|
|
259
269
|
// Calculate shard limit.
|
|
260
270
|
const shardLimit = _.isUndefined(limit)
|
|
@@ -293,6 +303,11 @@ export class EntityManager {
|
|
|
293
303
|
{ count: 0, items: [], pageKeys: {} }
|
|
294
304
|
);
|
|
295
305
|
|
|
306
|
+
console.debug(
|
|
307
|
+
`*** EntityManager.query page ${page} result ***\n`,
|
|
308
|
+
pageResult
|
|
309
|
+
);
|
|
310
|
+
|
|
296
311
|
result.count += pageResult.count;
|
|
297
312
|
result.items = [...result.items, ...pageResult.items];
|
|
298
313
|
result.pageKeys = pageResult.pageKeys;
|