Ignore case on exact match

This commit is contained in:
Nassim Jahnke 2023-08-26 16:30:04 +10:00
parent d8edb075f0
commit 700d23880c
3 changed files with 2 additions and 4 deletions

View File

@ -91,7 +91,7 @@ public interface ProjectsApiDAO {
p.donation_enabled,
p.donation_subject,
p.sponsors,
CASE WHEN :query IS NULL THEN 1 WHEN p.name = :query THEN 2 ELSE 3 END AS exact_match
CASE WHEN :query IS NULL THEN 1 WHEN lower(p.name) = :query THEN 2 ELSE 3 END AS exact_match
FROM home_projects hp
JOIN projects p ON hp.id = p.id
LEFT JOIN project_versions pv ON p.id = pv.project_id

View File

@ -74,7 +74,7 @@ public class ProjectsApiService extends HangarComponent {
String query = null;
for (final Filter.FilterInstance filterInstance : pagination.getFilters().values()) {
if (filterInstance instanceof final ProjectQueryFilter.ProjectQueryFilterInstance queryFilter) {
query = queryFilter.query();
query = queryFilter.query().toLowerCase();
}
}

View File

@ -47,7 +47,6 @@ declare module "vue" {
IconMdiEye: typeof import("~icons/mdi/eye")["default"];
IconMdiEyeOff: typeof import("~icons/mdi/eye-off")["default"];
IconMdiFileDocument: typeof import("~icons/mdi/file-document")["default"];
IconMdiFileFind: typeof import("~icons/mdi/file-find")["default"];
IconMdiFlag: typeof import("~icons/mdi/flag")["default"];
IconMdiFolderPlusOutline: typeof import("~icons/mdi/folder-plus-outline")["default"];
IconMdiFormatListNumbered: typeof import("~icons/mdi/format-list-numbered")["default"];
@ -90,7 +89,6 @@ declare module "vue" {
IconMdiSubdirectoryArrowLeft: typeof import("~icons/mdi/subdirectory-arrow-left")["default"];
IconMdiTag: typeof import("~icons/mdi/tag")["default"];
IconMdiTools: typeof import("~icons/mdi/tools")["default"];
IconMdiTriangleOutline: typeof import("~icons/mdi/triangle-outline")["default"];
IconMdiTrophy: typeof import("~icons/mdi/trophy")["default"];
IconMdiUndo: typeof import("~icons/mdi/undo")["default"];
IconMdiUpload: typeof import("~icons/mdi/upload")["default"];