Describe the bug
When providing a string filter to __gte the query fails if the string contains a - character
To Reproduce
Steps to reproduce the behavior:
Run soul-cli, connecting to chinook.db
Enter this URL: http://localhost:8000/api/tables/invoices/rows?_filters=BillingAddress__gte:Theodor
Note that there are 21 matching records, and the first has a BillingAddress of Theodor-Heuss-Straße 34
Now filter for address including the hyphen: Theodor-Heuss. So a URL of: http://localhost:8000/api/tables/invoices/rows?_filters=BillingAddress__gte:Theodor-Heuss
Describe the bug When providing a string filter to
__gte
the query fails if the string contains a-
characterTo Reproduce Steps to reproduce the behavior:
soul-cli
, connecting tochinook.db
http://localhost:8000/api/tables/invoices/rows?_filters=BillingAddress__gte:Theodor
Theodor-Heuss-Straße 34
Theodor-Heuss
. So a URL of:http://localhost:8000/api/tables/invoices/rows?_filters=BillingAddress__gte:Theodor-Heuss
Soul
returns an error:Note: We seem to have a related issue with filters on InvoiceDate that contain a "-".
Returns this:
Note 2:
The invoices are all dated 2009. So this query reports 412 matching records:
But, if I change the year to 2030, there are still 412 matching records:
In contrast, using a
__lt
operator, records are never returned:These suggest
__lt
,__gt
,__lte
and__gte
aren't working properly.Separately to that, the query parsing is failing if the filter value includes a hyphen, like:
2009-01
.Expected behavior I expected the 21 matching records to still be returned