From c51fe8edd6700d0c03b633d69fe2edb19329a141 Mon Sep 17 00:00:00 2001 From: capjamesg Date: Sat, 24 Aug 2024 16:32:27 +0100 Subject: [PATCH] add DATE index type --- jamesql/index.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/jamesql/index.py b/jamesql/index.py index d16f538..a532f84 100644 --- a/jamesql/index.py +++ b/jamesql/index.py @@ -763,11 +763,7 @@ def _run(self, query: dict, query_field: str) -> List[str]: for doc_uuid in gsi.values(min=lower_bound, max=upper_bound) ] ) - elif query_type in QUERY_TYPE_COMPARISON_METHODS and gsi_type == GSI_INDEX_STRATEGIES.NUMERIC: - matching_documents.extend( - QUERY_TYPE_COMPARISON_METHODS[query_type](query_term, gsi) - ) - elif query_type in QUERY_TYPE_COMPARISON_METHODS and gsi_type == GSI_INDEX_STRATEGIES.DATE: + elif query_type in QUERY_TYPE_COMPARISON_METHODS and gsi_type in {GSI_INDEX_STRATEGIES.DATE, GSI_INDEX_STRATEGIES.NUMERIC}: result = QUERY_TYPE_COMPARISON_METHODS[query_type](query_term, gsi) if isinstance(result[0], list): for item in result: