Skip to content
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

Added support for IsNullOrEmpty and IsNullOrWhiteSpace string operators in Linq queries #2823

Merged
merged 2 commits into from
Nov 28, 2023

Conversation

oskardudycz
Copy link
Collaborator

@oskardudycz oskardudycz commented Nov 28, 2023

  • Added new ISqlFragment for IsNullOrEmpty and ``IsNullOrWhiteSpace`
  • Added new IMethodCallParser implementations accordingly,
  • Added tests and extended current test suite with more pemutations

Fixes #2815

@Hawxy FYI

Note: I recommend to check it with whitespace hidden: https://github.com/JasperFx/marten/pull/2823/files?diff=split&w=1

@oskardudycz
Copy link
Collaborator Author

@jeremydmiller, you mentioned that:

Another ISqlFragment for the reverse NOT case so they can reverse to each other

It seems to work without it and wrapping the SQL parts with Not() should I add explicit fragments or is it fine as it is?

@oskardudycz oskardudycz added this to the 7.0.0 milestone Nov 28, 2023
@oskardudycz oskardudycz merged commit cd256c4 into master Nov 28, 2023
11 checks passed
@oskardudycz oskardudycz deleted the IsNullOrEmpty branch November 28, 2023 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support string.IsNullOrEmpty() in Linq Where() clauses
1 participant