Skip to content

Commit

Permalink
feat: Removing statement semi-colon
Browse files Browse the repository at this point in the history
  • Loading branch information
aadel committed Aug 7, 2024
1 parent 1ee5d85 commit c9e23d3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/sqlalchemy_solr/solrdbapi/_solrdbapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ def func_wrapper(self, *args, **kwargs):
@staticmethod
def substitute_in_query(string_query, parameters):
query = string_query

# Statement semi-colon is not supported in Solr syntax
if query.endswith(";"):
query = query[:-1]

for param in parameters:
if isinstance(param, str):
query = query.replace("?", f"{param!r}", 1)
Expand Down

0 comments on commit c9e23d3

Please sign in to comment.