-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Startswith Operator #47
Comments
hey @AngellusMortis, thank you for the idea. Sounds interesting. I wonder if this concept should be extended to full SQL thanks, Denis |
That sounds about right. `field like "value%" would make it verbose enough to handle this use case very well. It is certainly a lot better than anything I was thinking of. |
Django has a lookup which supports starts with natively, We can simply add a new token and get it working right? |
the discussion above is mostly not about the implementation, but about the query language design. Yes, we could probably add another operator for "startswith". And what's next? One more operator for "endswith"? And another one for "like"? |
@stebunovd I was referring to the original issue that is "adding support for the starts with operator" I had the exact same issue and I solved it by adding a new token which seems like an easy fix if one only requires starts with operator and yes, a general operator would be better and would solve the problem in a much more efficient way. |
What if we take operators from the regular expressions language? |
one more idea: add full support for regular expressions by introducing a new |
resolves ivelum#47
Will this issue be merged ? I am planning to implement on my own fork. |
It would be great to add support for the
__startswith
QuerySet
feature.~
is great, but it does anicontains
which completely bypasses a index on the DB. Starts with would allow us to maintain the index on a large tables for indexed fields.The text was updated successfully, but these errors were encountered: