Case-insensitive equals
See original GitHub issueIs your feature request related to a problem? Please describe. Since we have case-insensitive contains and case-insensitive starts/ends with, it would be really nice to just be able to case-insensitive compare!
Describe the solution you’d like
Perhaps value__iequals="ThE VaLuE"
Describe alternatives you’ve considered Using startswith/endswith would obviously be error prone
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Is there a C# case insensitive equals operator? - Stack Overflow
If Microsoft developers see this, I think there is a need for a case-insensitive operator in the next version of csharp. This string.Equal()...
Read more >Java String equalsIgnoreCase() method - HowToDoInJava
In equalsIgnoreCase() method, two strings are considered equal if they are of the same length and corresponding characters in the two strings ...
Read more >(equals) string operator - The case-insensitive - Microsoft Learn
Learn how to use the =~ (equals) operator to filter a record set for data with a case-insensitive string.
Read more >Compare Two JavaScript Strings, Ignoring Case - Mastering JS
The most basic way to do case insensitive string comparison in JavaScript is using either the toLowerCase() or toUpperCase() method to make sure ......
Read more >Case-sensitive and Case-insensitive String Comparisons in ...
Case -Insensitive Equals (-eq). You can use -eq to perform a case-insensitive string comparison. ❯ "Ivan Kahl's Blog" -eq "ivan kahl's BLOG" ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It seems the doc is wrong here. From what I see in the code, it seems the filter is called
iexact
, notiequals
:https://github.com/tortoise/tortoise-orm/blob/5627f11c7df4907d9b12dcd369769226a7b6219b/tortoise/filters.py#L345-L350
I found
iequals
in doc of0.16.13
https://tortoise-orm.readthedocs.io/en/latest/query.html?highlight=iequals#filtering But I cant use it and got exceptionUnknown filter param 'username__iequals'. Allowed base values are ['id' ... 'username' ...]
. I have installed 0.16.13, but it’s not available.So, which option is correct?