Fix DynamoDb2 ExpressionAttributeNames can start with a number (#3206)
When using pynamodb's support for transactions it makes use of of ExpressionAttributeNames that look like #0 #1 etc. According to https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.ExpressionAttributeNames.html And when testing against dynamodb-local these work without issue, however, when testing with moto they fail.
This commit is contained in:
parent
8162947ebb
commit
88a1134657
2 changed files with 13 additions and 1 deletions
|
|
@ -109,7 +109,7 @@ class ExpressionTokenizer(object):
|
|||
|
||||
@classmethod
|
||||
def is_expression_attribute(cls, input_string):
|
||||
return re.compile("^[a-zA-Z][a-zA-Z0-9_]*$").match(input_string) is not None
|
||||
return re.compile("^[a-zA-Z0-9][a-zA-Z0-9_]*$").match(input_string) is not None
|
||||
|
||||
@classmethod
|
||||
def is_expression_attribute_name(cls, input_string):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue