electrodb 2.1.0 → 2.1.1
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/package.json +1 -1
- package/src/entity.js +6 -6
package/package.json
CHANGED
package/src/entity.js
CHANGED
|
@@ -624,7 +624,7 @@ class Entity {
|
|
|
624
624
|
|
|
625
625
|
if (config._isPagination || response.LastEvaluatedKey) {
|
|
626
626
|
const nextPage = this._formatReturnPager(config, response.LastEvaluatedKey);
|
|
627
|
-
return { cursor: nextPage
|
|
627
|
+
return { cursor: nextPage || null, data: results };
|
|
628
628
|
}
|
|
629
629
|
|
|
630
630
|
return { data: results };
|
|
@@ -652,19 +652,19 @@ class Entity {
|
|
|
652
652
|
}
|
|
653
653
|
|
|
654
654
|
_formatReturnPager(config, lastEvaluatedKey) {
|
|
655
|
-
let page = lastEvaluatedKey
|
|
655
|
+
let page = lastEvaluatedKey || null;
|
|
656
656
|
if (config.raw || config.pager === Pager.raw) {
|
|
657
657
|
return page;
|
|
658
658
|
}
|
|
659
|
-
return config.formatCursor.serialize(page)
|
|
659
|
+
return config.formatCursor.serialize(page) || null;
|
|
660
660
|
}
|
|
661
661
|
|
|
662
662
|
_formatExclusiveStartKey(config) {
|
|
663
663
|
let exclusiveStartKey = config.cursor;
|
|
664
664
|
if (config.raw || config.pager === Pager.raw) {
|
|
665
|
-
return exclusiveStartKey
|
|
665
|
+
return exclusiveStartKey || null;
|
|
666
666
|
}
|
|
667
|
-
return config.formatCursor.deserialize(exclusiveStartKey)
|
|
667
|
+
return config.formatCursor.deserialize(exclusiveStartKey) || null;
|
|
668
668
|
}
|
|
669
669
|
|
|
670
670
|
_getTableName() {
|
|
@@ -1972,7 +1972,7 @@ class Entity {
|
|
|
1972
1972
|
_buildQueryFacets(facets, skFacets) {
|
|
1973
1973
|
let queryFacets = this._findProperties(facets, skFacets).reduce(
|
|
1974
1974
|
(result, [name, value]) => {
|
|
1975
|
-
if (value) {
|
|
1975
|
+
if (value !== undefined) {
|
|
1976
1976
|
result[name] = value;
|
|
1977
1977
|
}
|
|
1978
1978
|
return result;
|