pvbouwel
9ed613e197
Better DDB expressions support2: ExpressionTree
...
Part of structured approach for UpdateExpressions:
1) Expression gets parsed into a tokenlist (tokenized)
2) Tokenlist get transformed to expression tree (AST) -> This commit
3) The AST gets validated (full semantic correctness)
4) AST gets processed to perform the update
This commit uses the tokenlist to build an expression tree. This tree is not
yet used. Still it allows to raise additional Validation Exceptions which
previously were missed silently therefore it allows tests to catch these type of
ValidationException. For that reason DDB UpdateExpressions will be parsed
already. It also makes sure we won't break existing tests.
One of the existing tests had to be changed in order to still pass:
- test_dynamodb_table_with_range_key.test_update_item_with_expression
This test passed in a numeric literal which is not supported by DynamoDB
and with the current tokenization it would get the same error as in AWS
DynamoDB.
2020-04-18 09:19:03 +01:00
Andrea Amorosi
349b381390
Fixed dynamodb2 put_item ValidationException
2020-03-28 17:59:42 +00:00
Steve Pulec
14b2811157
Merge pull request #2819 from bblommers/dynamodb_global_index_ordering
...
Dynamodb - Global index ordering
2020-03-19 19:39:09 -05:00
Bert Blommers
71bf314a0f
Merge pull request #2799 from ImFlog/fix_dynamodb_updated_new
...
Fix UPDATED_NEW return values differences
2020-03-18 08:21:01 +00:00
Bert Blommers
aead80c392
Add missing region
2020-03-17 17:11:35 +00:00
Bert Blommers
67c7fce85e
#2760 - DynamoDB - Ensure proper ordering for Numeric sort keys
2020-03-17 16:28:49 +00:00
Steve Pulec
77b1cc2321
Merge pull request #2809 from bblommers/feature/dynamodb-transact-get-items
...
Feature - DynamoDB: transact_get_items
2020-03-15 16:45:03 -05:00
ImFlog
7f6c6660aa
Add some new update_new tests
2020-03-13 09:37:50 +01:00
Bert Blommers
71d3941daf
Linting
2020-03-12 14:26:23 +00:00
Bert Blommers
caebe222d7
DynamoDB - Transact_get_items - Remove error condition
2020-03-12 14:24:53 +00:00
Tomoya Iwata
b74625db0c
add support for dynamodb transact_get_items
2020-03-12 14:15:13 +00:00
ImFlog
ba1bf09474
Fix UPDATED_NEW return values differences between moto and dynamoDB
2020-03-10 18:22:54 +01:00
Bert Blommers
315ac32f09
Add region to test case
2020-03-10 14:28:12 +00:00
Bert Blommers
6ba00d9ad1
#1054 - DynamoDB - Improve error handling for put_item without keys
2020-03-10 13:25:40 +00:00
heyder.dias
f5080e539d
fix lint check
2020-03-05 18:39:20 -03:00
heyder.dias
fa7f83bc2f
add test to nested if_not_exists and property already exists
2020-03-05 17:05:00 -03:00
Bert Blommers
2bd93a76fc
Add region to DDB tests
2020-02-09 11:58:41 +00:00
Bert Blommers
936d686392
#2580 - DynamoDB update_item: Allow list_append and if_not_exists-functions in one expression
2020-02-09 11:47:02 +00:00
Nikita Antonenkov
d4caf14b61
Fixed UnboundLocalError in dynamodb2.query when no filters are passed
2020-02-07 23:39:31 +01:00
Steve Pulec
663d7c289b
Merge pull request #2675 from bblommers/bugfix/#2674
...
DynamoDB - ListAppend should also work when adding maps to a list
2020-01-22 20:01:53 -06:00
Bert Blommers
7ff7ee4e8e
Test fix - Region must be specified
2020-01-22 11:42:06 +00:00
Bert Blommers
6f02782624
#2627 - Change comparison to differentiate between 0 and None
2020-01-22 11:30:17 +00:00
Bert Blommers
8c920cce10
Specify region in tests
2020-01-12 12:20:55 +00:00
Bert Blommers
9ce1ee49d7
#2626 - DynamoDB - FilterExpression should ignore items with non-existent attribute
2020-01-12 12:05:08 +00:00
Bert Blommers
5f59cb7fb0
#2674 - ListAppend should also work when adding maps to a list
2020-01-06 08:16:09 +00:00
Asher Foa
7d4c15d53e
skip part of the test in server mode.
2019-12-24 11:01:54 -08:00
Asher Foa
299e7851d6
Add assertions.
2019-12-24 10:23:46 -08:00
Asher Foa
5bd3827b26
run black
2019-12-20 18:55:58 -08:00
Asher Foa
a6f14eee3f
Add test to repo stream issue
2019-12-20 18:55:58 -08:00
Ilya Shmygol
704a12146b
Improve error reporting for missing index
2019-12-12 10:49:07 +01:00
Ilya Shmygol
3a42079ec7
Merge remote master
2019-12-11 16:17:21 +01:00
Ilya Shmygol
be5986c0b5
Test query by non exists index
2019-12-11 15:08:45 +01:00
Bert Blommers
21a1d4d604
DynamoDB - list_append operation can be made in a nested map
2019-11-25 15:19:22 +00:00
Steve Pulec
72da9e96c2
Lint.
2019-11-21 17:53:58 -05:00
Mike Grima
bd777cad44
Fix for moto not unmocking.
...
- Fixes #2575
- Also upgraded Travis CI to make use of Bionic instead of Xenial
- This may also address concerns raised in #1793
2019-11-18 15:28:31 -08:00
Bert Blommers
993819bd41
#2562 - DynamoDB - allow updates to be of a different type
2019-11-15 15:54:21 +00:00
Bert Blommers
eaa23800bd
Linting
2019-11-03 07:33:27 -08:00
Bert Blommers
5876dc0186
Fix test - List order does not matter for projectionexpression
2019-11-03 07:14:19 -08:00
Bert Blommers
6a601d7d5c
#2527 - DynamoDB - Allow nested attributes in ProjectionExpressions
2019-11-03 14:09:27 +00:00
Asher Foa
96e5b1993d
Run black on moto & test directories.
2019-10-31 10:36:05 -07:00
Bert Blommers
997177e43e
#847 - Fix tests to be compatible with python3
2019-10-23 02:26:26 -07:00
Bert Blommers
730c4be1a3
#847 - DynamoDB - Implement list_append feature when updating
2019-10-23 09:12:03 +01:00
Bert Blommers
64cf1fc2c9
Refactor DynamoDB update expressions ( #2497 )
...
* Refactor DynamoDB.update to use recursive method for nested updates
* Simplify DynamoDB.update_item logic
2019-10-22 12:40:41 -07:00
Bert Blommers
db206e994b
#250 - DynamoDB - Add check for valid query keyconditionexpression
2019-10-18 09:58:09 +01:00
Bert Blommers
009a97db85
Merge branch 'master' into bugfix/1823
2019-10-14 10:02:22 +01:00
Bert Blommers
106692ed88
#1823 - Add support to delete items from a nested list
2019-10-14 09:59:52 +01:00
Mike Grima
893f0d4f83
Merge pull request #2463 from gruebel/fix-dynamodb-get-item-ProjectionExpression
...
Add ProjectionExpression & ExpressionAttributeNames to DynamoDB get_it…
2019-10-13 10:47:25 -07:00
gruebel
97c4174f30
Extract projection_expression adjustment
2019-10-11 14:30:25 +02:00
Steve Pulec
34d4379b9f
Merge branch 'master' into bugfix/2384
2019-10-10 17:02:59 -05:00
Bert Blommers
cf899eecff
#2384 - Add test case
2019-10-10 09:33:11 +01:00