Skip to content

Support partial user email search - #20

Merged
PANiXiDA merged 5 commits into
developmentfrom
feature/user-email-substring-search
Aug 2, 2026
Merged

Support partial user email search#20
PANiXiDA merged 5 commits into
developmentfrom
feature/user-email-substring-search

Conversation

@PANiXiDA

@PANiXiDA PANiXiDA commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

What changed

  • Changed the user email filter from exact equality to a case-insensitive PostgreSQL ILIKE substring search.
  • Standardized ILIKE calls on two named arguments with a $%{value.Trim()}% pattern.
  • Removed the redundant explicit null guard around ILIKE match expressions.
  • Aligned UserReadDbModel.Email nullability with the existing NOT NULL database column and removed the obsolete explicit Mapperly mapping and null suppression for Email.
  • Removed full email-address validation from the list query while retaining pagination validation.
  • Added architecture conventions that enforce the agreed ILIKE call shape and reject explicit null guards for its match expression.
  • Updated unit, integration, and functional test scenarios to use partial mixed-case email filters.

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.email is already NOT NULL; only the read-model annotation incorrectly described it as nullable.

Verification

  • GitHub CI run: passed.
  • All 10 test projects passed.
  • Architecture tests: 110 passed, 0 failed, 0 skipped.
  • Formatting, Helm validation, aggregated test reports, coverage generation, and the coverage threshold passed.
  • Local Release build of Identity.Infrastructure and its dependencies passed with 0 warnings and 0 errors.
  • Local tests were not run by request.

Compatibility

  • Migrations: none; the email column is already NOT NULL.
  • Contract changes: no request or response shape changes; the existing email filter now accepts substrings and matches case-insensitively.
  • Configuration changes: none.
  • Breaking changes: none.

@PANiXiDA
PANiXiDA marked this pull request as ready for review August 2, 2026 13:21
@PANiXiDA
PANiXiDA merged commit 052daab into development Aug 2, 2026
18 checks passed
@PANiXiDA
PANiXiDA deleted the feature/user-email-substring-search branch August 2, 2026 13:21
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