Skip to content

fix(api): enable ilike filter for REST API search - #806

Merged
vcnainala merged 3 commits into
developmentfrom
fix/api-search-ilike-filter
Jun 22, 2026
Merged

vcnainala merged 3 commits into
developmentfrom
fix/api-search-ilike-filter

Conversation

@vcnainala

Copy link
Copy Markdown
Member

Summary

  • Add ilike to allowed Lomkit REST API search filter operators for PostgreSQL case-insensitive matching
  • Extend Lomkit SearchRequest validation via dedicated App\Http\Requests\Rest\SearchRequest and custom search rules
  • No custom query builder required — Laravel's PostgreSQL grammar already handles ilike once validation passes

Closes #335

Supersedes the closed PR #398, which targeted an older Lomkit API and included unnecessary CustomBuilder wiring.

Test plan

  • php artisan test --filter=MoleculeSearchIlike
  • ilike matches case-insensitively (e.g. %caffeine% finds Caffeine)
  • like remains case-sensitive on PostgreSQL
  • Unknown operators return 422 validation error

Extend Lomkit search validation to accept the PostgreSQL ilike operator,
enabling case-insensitive filtering on REST resource endpoints.

Closes #335
@codecov-commenter

codecov-commenter commented Jun 7, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.83333% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 16.14%. Comparing base (a4c26c6) to head (08e2385).
⚠️ Report is 16 commits behind head on development.

Files with missing lines Patch % Lines
app/Rules/Search/SearchFilter.php 94.59% 2 Missing ⚠️
Additional details and impacted files
@@                Coverage Diff                @@
##             development     #806      +/-   ##
=================================================
+ Coverage           6.14%   16.14%   +9.99%     
- Complexity          1736     1868     +132     
=================================================
  Files                227      234       +7     
  Lines               8945     9497     +552     
=================================================
+ Hits                 550     1533     +983     
+ Misses              8395     7964     -431     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

vcnainala added 2 commits June 7, 2026 21:40
Remove empty constructor parentheses and align unary operator spacing so PHP Lint & Security passes on PR #806.
@vcnainala
vcnainala merged commit cb93976 into development Jun 22, 2026
5 checks passed
@vcnainala
vcnainala deleted the fix/api-search-ilike-filter branch June 22, 2026 13:17
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