Skip to content

Commit

Permalink
DynamoDB: Allow MixedCased table names
Browse files Browse the repository at this point in the history
  • Loading branch information
bblommers committed Sep 6, 2024
1 parent 6c9ebe2 commit 1fe2421
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
CHANGELOG
=========

0.5.6
-----
- DynamoDB table names can now be MixedCased

0.5.5
-----
- Add JsonParser to public API
Expand Down
2 changes: 1 addition & 1 deletion py_partiql_parser/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.5.5"
__version__ = "0.5.6"


from ._internal.parser import DynamoDBStatementParser, S3SelectParser # noqa
Expand Down
2 changes: 1 addition & 1 deletion py_partiql_parser/_internal/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def _parse_select(
# FROM
from_parser = DynamoDBFromParser(from_clause=clauses[2])

source_data = self.documents[list(from_parser.clauses.values())[0].lower()]
source_data = self.documents[list(from_parser.clauses.values())[0]]

# WHERE
if len(clauses) > 3:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "py-partiql-parser"
version = "0.5.5"
version = "0.5.6"
description = "Pure Python PartiQL Parser"
readme = "README.md"
keywords = ["pypartiql", "parser"]
Expand Down
4 changes: 2 additions & 2 deletions tests/test_dynamodb_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@


def test_table_with_single_row() -> None:
query = "select * from msgs"
source = {"msgs": simple_doc}
query = "select * from Msgs"
source = {"Msgs": simple_doc}
assert _get_result(query, source) == [input_object1]


Expand Down

0 comments on commit 1fe2421

Please sign in to comment.