mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-05-20 14:00:04 +02:00
#2814 LOWER() column value within search
This commit is contained in:
parent
9a5a27ea8d
commit
ff731ea07d
5 changed files with 6 additions and 6 deletions
|
@ -1520,7 +1520,7 @@ func SearchRepositoryByName(opts *SearchRepoOptions) (repos []*Repository, _ int
|
|||
repos = make([]*Repository, 0, opts.PageSize)
|
||||
|
||||
// Append conditions
|
||||
sess := x.Where("lower_name like ?", "%"+opts.Keyword+"%")
|
||||
sess := x.Where("LOWER(lower_name) LIKE ?", "%"+opts.Keyword+"%")
|
||||
if opts.OwnerID > 0 {
|
||||
sess.And("owner_id = ?", opts.OwnerID)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue