-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Cosmos: Translate string.Contains, StartsWith, EndsWith with ComparisonType #25250
Comments
We should probably take a look at Cosmos case sensitivity in general. For relational databases we don't support StringComparison since collations are a much better fit. However, in Cosmos there's no concept of a column collation, and functions such as One thing I'm not sure about, is whether indexes are used for both case-sensitive and insensitive matching (double-indexing?). Some resources include this and this. Bottom line - it seems right to translate StringComparison.OrdinalIgnoreCase as proposed. |
I just stumbled upon this same problem, maybe there is a solution around the corner. Since Cosmos DB This pr added support for the current Mind that this page states it's cheaper (RU wise) to use |
Thanks for this link - that's helpful. Though CONTAINS and StartsWith are two different functions, with different usages. |
Description
The
CONTAINS
function of Cosmos DB supports case-insensitive searching. So I'm assuming that in EF Core with Cosmos Provider, we should be able to usestring.contains
withcomparisionType
specified. But when I try to do that, I got a translation failure.My code
Stack traces
Include provider and version information
EF Core version:
5.0.7
Database provider:
Microsoft.EntityFrameworkCore.Cosmos:5.0.7
Target framework:
NET 5.0
Operating system:
macOS Big Sur 11.4
IDE:
Rider 2021.1
The text was updated successfully, but these errors were encountered: