Part of structured approach for UpdateExpressions: 1) Expression gets parsed into a tokenlist (tokenized) 2) Tokenlist get transformed to expression tree (AST) 3) The AST gets validated (full semantic correctness) 4) AST gets processed to perform the update -> this commit This commit uses the AST to execute the UpdateExpression. All the existing tests pass. The only tests that have been updated are in test_dynamodb_table_with_range_key.py because they wrongly allow adding a set to a path that doesn't exist. This has been alligend to correspond to the behavior of AWS DynamoDB. This commit will resolve https://github.com/spulec/moto/issues/2806 Multiple tests have been implemented that verify this. |
||
---|---|---|
.. | ||
test_dynamodb_executor.py | ||
test_dynamodb_expression_tokenizer.py | ||
test_dynamodb_expressions.py | ||
test_dynamodb_table_with_range_key.py | ||
test_dynamodb_table_without_range_key.py | ||
test_dynamodb_validation.py | ||
test_dynamodb.py | ||
test_server.py |