You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for(constpartialExpressionofpartialExpressions){constpartialExpressionOrderedTokens=(partialExpression||'').replace(/^(DELETE|ADD|SET|REMOVE)\s+/i,'').trim().split(',').filter(token=>token).map(token=>token.trim());constisValidKey=operand=>operand.match(/^#\w+(\.#\w)*$/);constisValidOperand=operand=>operand.match(/^:\w+$/)||operand.match(/^(#\w+(\.#\w)*|:\w+)[-+](#\w+(\.#\w)*|:\w+)$/);constarrayIterator=partialExpressionOrderedTokens[Symbol.iterator]();letresult;while((result=arrayIterator.next())&&!result.done){constkey=arrayIterator.next().value;constequalSign=arrayIterator.next().value;constoperand=arrayIterator.next().value;if(!isValidKey(key)||equalSign!=='='||!isValidOperand(operand)){logger({code: 'InvalidExpression', expression });thrownewDynamoDbError({title: 'Invalid Expression: the expression does not match what DynamoDB expects: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.UpdateExpressions.html', expression,tokens: [key,equalSign,operand]},'InvalidExpression');}// parseExpressionRecursive(token, orderedTokens);}}
The text was updated successfully, but these errors were encountered:
Example:
The text was updated successfully, but these errors were encountered: