Skip to content

Commit

Permalink
add DATE index type
Browse files Browse the repository at this point in the history
  • Loading branch information
capjamesg committed Aug 24, 2024
1 parent 0fa62ab commit a0a0a87
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions jamesql/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -768,9 +768,13 @@ def _run(self, query: dict, query_field: str) -> List[str]:
QUERY_TYPE_COMPARISON_METHODS[query_type](query_term, gsi)
)
elif query_type in QUERY_TYPE_COMPARISON_METHODS and gsi_type == GSI_INDEX_STRATEGIES.DATE:
matching_documents.extend(
*QUERY_TYPE_COMPARISON_METHODS[query_type](query_term, gsi)
)
result = QUERY_TYPE_COMPARISON_METHODS[query_type](query_term, gsi)
if isinstance(result[0], list):
for item in result:
matching_documents.extend(item)
else:
matching_documents.extend(result)

else:
for key, value in gsi.items():
if query_term is None or key is None:
Expand Down

0 comments on commit a0a0a87

Please sign in to comment.