Skip to content

Commit edd2d96

Browse files
committed
upgrade sqlean.py
1 parent 7cf9f5f commit edd2d96

4 files changed

Lines changed: 7 additions & 4 deletions

File tree

pydynamodb/sql/common.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,10 +353,11 @@ def get_query_type(sql: str) -> QueryType:
353353

354354
def escape_keyword(word: str) -> str:
355355
if word.upper() in RESERVED_WORDS:
356-
return f"\"{word}\""
356+
return f'"{word}"'
357357
else:
358358
return word
359359

360+
360361
# DynamoDB reserved words
361362
# https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html
362363
RESERVED_WORDS = [

pydynamodb/sql/dml_sql.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ class DmlBase(Base):
3636
],
3737
)
3838

39-
ATTR_NAME = Opt('"') + Word(alphanums + "_-")("attr_name").set_name("attr_name") + Opt('"')
39+
ATTR_NAME = (
40+
Opt('"') + Word(alphanums + "_-")("attr_name").set_name("attr_name") + Opt('"')
41+
)
4042
ATTR_ARRAY_NAME = ATTR_NAME + "[" + Word(nums) + "]"
4143

4244
_COLUMN_NAME = (

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ boto3>=1.21.0
22
botocore>=1.24.7
33
tenacity>=4.1.0
44
pyparsing>=3.0.0
5-
sqlean.py==3.45.1
5+
sqlean.py>=3.45.0

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"botocore>=1.24.7",
1515
"tenacity>=4.1.0",
1616
"pyparsing>=3.0.0",
17-
"sqlean.py==3.45.1",
17+
"sqlean.py>=3.45.0",
1818
]
1919

2020
extras_require = {

0 commit comments

Comments
 (0)