fix(search): add case insensitive
This commit is contained in:
@@ -91,10 +91,10 @@ public class ClubService {
|
||||
PanacheQuery<ClubModel> query;
|
||||
|
||||
if (country == null || country.isBlank())
|
||||
query = repository.find("name LIKE ?1",
|
||||
query = repository.find("LOWER(name) LIKE LOWER(?1)",
|
||||
Sort.ascending("name"), search).page(Page.ofSize(limit));
|
||||
else
|
||||
query = repository.find("name LIKE ?1 AND country LIKE ?2",
|
||||
query = repository.find("LOWER(name) LIKE LOWER(?1) AND country LIKE ?2",
|
||||
Sort.ascending("name"), search, country + "%").page(Page.ofSize(limit));
|
||||
return getPageResult(query, limit, page);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user