Commit Graph

221 Commits

Author SHA1 Message Date
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
Mike Grima
4d5bf1c5c6
Merge pull request #2605 from bblommers/dynamodb_add_nested_stringsets
Dynamodb - DELETE/ADD item from/to nested sets
2019-12-09 14:14:56 -08:00
Bert Blommers
e41bc9fc58 DynamoDB - DELETE item from nested sets 2019-11-28 13:22:20 +00:00
Bert Blommers
6d7ad717df DynamoDB - ADD item to nested sets 2019-11-27 12:36:42 +00: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
Bert Blommers
afb8f71e9f #1822 - DynamoDB: Add List index operations 2019-10-09 17:30:42 +01:00
Bert Blommers
e759b565da #1874 - Change tests to use resource/client when appropriate 2019-10-09 10:02:40 +01:00
Bert Blommers
1fb844972f Merge branch 'master' into bugfix/1874 2019-10-09 08:33:53 +01:00
gruebel
cb43796daf Add ProjectionExpression & ExpressionAttributeNames o DynamoDB get_item & batch_get_item 2019-10-08 22:30:14 +02:00
Bert Blommers
c9348bc45c #1874 - Add tests for more complex items 2019-10-08 15:51:46 +01:00
gruebel
c9d69681ec Add evaluation of ConditionExpression to DynamoDB2 delete_item 2019-10-06 16:49:02 +02:00
Bert Blommers
dc89b47b40 #1874 - Count item size based on contents of actual dictionary 2019-10-06 14:08:58 +01:00
Bert Blommers
4dec187d80 #1834 - Check item size in DynamoDB 2019-10-05 15:20:43 +01:00
Bert Blommers
d86dcb2ee9
Merge pull request #4 from ZoidBB/master
Initial work by ZoidBB
2019-10-05 10:18:17 +01:00
Mike Grima
60183b29c1
Merge pull request #2447 from bblommers/bugfix/2445
#2445 - DynamoDB - Add validation for AttributeDefinitions
2019-10-03 11:52:29 -07:00
Bert Blommers
c783b8721f #2445 - DynamoDB - Fix tests after adding AttributeDefinitions-validation 2019-10-03 11:57:14 +01:00
Bert Blommers
6005b19ac2 #2445 - DynamoDB - Add validation for AttributeDefinitions 2019-10-03 10:54:10 +01:00
Steve Pulec
cbe1ff1974
Merge pull request #2422 from kiyonori-matsumoto/dynamodb-and-order
fix: raises ValueError on conditional and operator
2019-09-23 21:35:08 -05:00
Kiyonori Matsumoto
7ee35a8510 fix: raises ValueError on conditional and operator
if lhs evaluates to false, rhs must be ignored, but rhs was evaluated then ValueError is occurred.
2019-09-16 23:33:52 +09:00
Julian Graham
f4df7a48ee Prevent overlapping expr name prefixes from corrupting projection expr
h/t @beheh. This patch handles the case when ProjectionExpression looks
like "#1, ..., #10" - the previous code used `replace`, which would make
the resulting projection into "foo, ..., foo0".
2019-09-09 19:08:16 -04:00
Bert Blommers
956592d615 2380 - Validate parameter-list for duplicates in dynamodb.batch_get_item 2019-08-22 16:12:48 +01:00
PND
a2aefc49b4 Fixed update_item of DynamoDB to deal with the list type. 2019-07-22 01:42:20 +09:00
Garrett Heel
0093a7992f dynamodb2: Defer evaluation of the OR RHS in condition expr 2019-07-11 08:29:07 -04:00
Steve Pulec
6a13d54616
Merge pull request #2266 from garrettheel/feat/dynamodb-expressions
Improve DynamoDB condition expression support
2019-07-09 18:22:55 -05:00
IVIURRAY
4ce0e6bbcb add extra test for ProjectionExpression using scan with ExpressionAttributes 2019-06-27 19:37:46 +01:00
IVIURRAY
949637a14c remove debug 2019-06-27 19:12:53 +01:00
IVIURRAY
b60097fab2 improve test case 2019-06-27 19:08:32 +01:00
Garrett Heel
467f669c1e add test for attr doesn't exist 2019-06-27 11:49:08 -04:00
Matthew Stevens
83082df4d9 Adding update_item and attribute_not_exists test 2019-06-26 23:22:07 +01:00
Matthew Stevens
8a90971ba1 Adding test cases for #1587 2019-06-26 23:20:55 +01:00
Matthew Stevens
6fd47f843f Test case for #1819 2019-06-26 23:20:55 +01:00
Matthew Stevens
57b668c832 Using Ops for dynamodb condition expressions 2019-06-26 23:20:55 +01:00
Matthew Stevens
1a2fc66f84 Adding dynamodb2 expression parser and fixing test cases 2019-06-26 23:20:16 +01:00
IVIURRAY
e50ce7287d ProjectionExpression works with table.scan() 2019-06-26 21:54:48 +01:00
Ber Zoidberg
6717cba286 test name fix 2019-06-12 08:12:15 -07:00
Ber Zoidberg
997556f7bb improve test coverage 2019-06-12 08:06:37 -07:00
Ber Zoidberg
26ae13b715 Fix copypasta error in comment 2019-06-11 22:41:56 -07:00
Ber Zoidberg
96c2506fd4 Fix DynamoDB UpdateExpression support for REMOVE on nested maps 2019-06-11 22:38:15 -07:00
Ber Zoidberg
1088c421d2 #2212 add support for delete on update_with_attribute_updates (#2213)
* add support for delete on update_with_attribute_updates
2019-05-22 10:47:02 +01:00
cm-iwata
9bf8fd3417 fix #2011 (#2012)
add support for Scan method using LSI or GSI
2019-05-21 17:45:30 +01:00
shiba24
b822db8d8c Support create_table with PAY_PER_REQUEST billing mode of DynamoDB 2019-04-30 22:36:25 +09:00
Tomoya Iwata
431269bcd0 fix #2161
mock_dynamodb2 query fails when using GSI with range key if target table has record that have no range key attribute
2019-04-19 12:23:06 +09:00
Greg Sterin
f035b9613d support a bit more of the dynamoDB ConditionExpression syntax 2019-02-14 18:10:01 -08:00
Gary Donovan
0b15bb13b6 Make EQ conditions work reliably in DynamoDB.
The AWS API represents a set object as a list of values. Internally
moto also represents a set as a list. This means that when we do value
comparisons, the order of the values can cause a set equality test to
fail.
2019-01-10 21:39:12 +11:00
Steve Pulec
d685a9f50a
Merge pull request #1892 from drewpearce/dynamodb-ne
Dynamodb ne
2018-12-28 21:23:01 -05:00
Steve Pulec
f82d4bb619
Merge pull request #1938 from kgutwin/i-1937-dynamodb2-update-attributes
Correct behavior of ReturnValues parameter to put_item and update_item
2018-12-28 20:36:00 -05:00
Karl Gutwin
2ec32c80f7 Merge in functionality from #1899 2018-11-09 13:21:38 -05:00
Karl Gutwin
770ad1db56 Correct behavior of ReturnValues parameter to put_item and update_item 2018-11-08 16:21:06 -05:00
Karl Gutwin
0b57ffe26a Add StreamSpecification to dynamodb2 package 2018-11-07 15:03:25 -05:00
Drew Pearce
544050ab27 added tests for dynamodb not equals 2018-10-23 15:37:28 -04:00
Kosei Kitahara
13c2e69932
Allow extra spaces to attribute_exists and attribute_not_exists too 2018-10-12 16:59:52 +09:00
Kosei Kitahara
2c15d71c2c
Allow spaces to if_not_exists 2018-10-11 18:21:53 +09:00
Tomoya Iwata
2fad7c7202 update dynamodb2 update_item
add empty string handle, fix(#1744)
2018-08-02 12:38:50 +09:00
Gary Donovan
802402bdba Tweak comparison to treat NULL/NOT_NULL correctly. (#1709)
The AWS documentation says that a ComparisonOperator of NULL means
the attribute should not exist, whereas NOT_NULL means that the
attribute should exist. It explicitly says that an attribute with a
value of NULL is considered to exist, which contradicts our previous
implementation. This affects both put_item and get_item in dynamodb2.

https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_Condition.html
2018-07-13 10:11:10 +01:00
William Richard
014fbbb8cb
Added a test that queries an index when created via the table resource update
When you create an index via the table resource update, in python 3.6, it is saved as a `dict_value`,
which causes an error - this test replicates this bug
2018-06-06 12:51:51 -04:00
William Richard
25b5f03ea4
These tests do not use pytest 2018-06-06 12:09:09 -04:00
Mau Zsófia Ábrahám
64fc0d3556 add region for test 2018-05-14 14:16:39 +02:00
Mau Zsófia Ábrahám
2e75d0219c Support dynamodb2 nested map creation to mirror actual db 2018-05-14 14:02:14 +02:00
Steve Pulec
783504c897 We shouldnt throw a ValidationException on empty dynamodb key. Closes #1505. 2018-04-14 11:16:43 -04:00
sawandas
861c47a552
Update test cases for dynamodb contains filter 2018-04-09 13:42:50 +05:30
Terry Cain
a1f2ba21ee
Adds if_not_exists function to DynamoDB Update Expression
Fixes #1358
2017-11-26 22:29:23 +00:00
Terry Cain
2609f6cd3a
Added support for dynamo update_item on nested dicts (#1345) 2017-11-17 08:49:59 +00:00
Jack Danger
068417b1f2
Merge pull request #1334 from reinecke/fix/dynamo_projection_mutation
dynamodb2: Fix for ProjectionExpressions changing the data in storage
2017-11-12 08:05:33 -08:00
Jack Danger
123f369e6e
Merge pull request #1333 from terrycain/fix_1043
DynamoDB: Fixed requiring optional parameter
2017-11-11 14:06:51 -08:00
Eric Reinecke
64fb0207e2 dynamodb2 was evaluating ProjectionExpression on the wrong local result set 2017-11-10 21:57:16 -08:00
Eric Reinecke
06492026c3 dynamodb2 items are copied when using ProjectionExpression to avoid mutating originals 2017-11-10 21:35:01 -08:00
Terry Cain
5858289596
Fixed Bug 2017-11-10 21:07:22 +00:00
Terry Cain
884fc6f260
Adds FilterExpression to dynamodb.query (#1326)
* Added FilterExpression for dynamodb.query

* flake8

* Fixes using mutable default argument values
2017-11-08 22:53:31 +00:00
Terry Cain
5c02085d3a Fixed testcases after nonglobaling dynamo 2017-10-29 16:25:17 +00:00
Terry Cain
ab767416fe Completed DynamoDBv2 endpoints 2017-10-29 16:06:09 +00:00