Skip to content

Conversation

@lukedukeus
Copy link
Contributor

The following methods now get translated to to SQL:

  • string.Compare(string? strA, string? strB, CultureInfo? culture, CompareOptions options)
  • string.Compare(string? strA, string? strB, bool ignoreCase, CultureInfo? culture)
  • string.Compare(string? strA, string? strB, bool ignoreCase)
  • string.Compare(string? strA, string? strB, StringComparison comparisonType)

Note: for the tests to pass, you will have to make sure that the the collation for the culture exists in the database. For example: create collation "de-DE" (locale='de-DE.utf8');

Please also check that access modifiers and file locations are correct

@jeremydmiller
Copy link
Member

@lukedukeus Hey, sorry, this won't make the next release. We'll need to do something to make the tests run. Might have to do something to the docker image we use I guess, or whatever to get those cultures there first. There are unrelated CI failures in master, but the LINQ tests are failing in CI on these tests.

We won't let this linger too long hopefully.

@lukedukeus
Copy link
Contributor Author

No worries the functionality I was after already got merged, jut thought it was prudent to add support for case and culture. Just curious, why not use something like testcontainers to test against db?

@jeremydmiller
Copy link
Member

@lukedukeus We do use Docker containers for testing (docker compose), but which image you use can easily impact things like culture. I've never seen any real value in switching from docker compose to TestContainers. Marten used a very early version years ago, and we switched out to what we do now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants