@awsless/dynamodb-server 0.1.3 → 0.1.4
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/dist/index.js +9 -10
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -694,17 +694,16 @@ function evaluateCondition(expression, item, context) {
|
|
|
694
694
|
consume("RPAREN");
|
|
695
695
|
const segments = parsePath(pathToken.value, context.expressionAttributeNames);
|
|
696
696
|
const value = getValueAtPath(item, segments);
|
|
697
|
-
if (!value) {
|
|
698
|
-
return false;
|
|
699
|
-
}
|
|
700
697
|
let size = 0;
|
|
701
|
-
if (
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
698
|
+
if (value) {
|
|
699
|
+
if ("S" in value) size = value.S.length;
|
|
700
|
+
else if ("B" in value) size = value.B.length;
|
|
701
|
+
else if ("SS" in value) size = value.SS.length;
|
|
702
|
+
else if ("NS" in value) size = value.NS.length;
|
|
703
|
+
else if ("BS" in value) size = value.BS.length;
|
|
704
|
+
else if ("L" in value) size = value.L.length;
|
|
705
|
+
else if ("M" in value) size = Object.keys(value.M).length;
|
|
706
|
+
}
|
|
708
707
|
const nextToken = current();
|
|
709
708
|
if (nextToken?.type === "COMPARATOR") {
|
|
710
709
|
consume("COMPARATOR");
|