Support partial user email search - #20
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
ILIKEsubstring search.ILIKEcalls on two named arguments with a$%{value.Trim()}%pattern.ILIKEmatch expressions.UserReadDbModel.Emailnullability with the existingNOT NULLdatabase column and removed the obsolete explicit Mapperly mapping and null suppression forEmail.ILIKEcall shape and reject explicit null guards for its match expression.Why
The list endpoint accepts an email search fragment, not a complete email address. The previous domain email validation rejected valid search fragments with HTTP 400, while the repository required an exact case-sensitive match.
PostgreSQL already excludes a row when a nullable expression evaluates to
NULL ILIKE pattern, so an explicit null guard is redundant. In this schema,identity.asp_net_users.emailis alreadyNOT NULL; only the read-model annotation incorrectly described it as nullable.Verification
Compatibility
NOT NULL.emailfilter now accepts substrings and matches case-insensitively.