forked from forgejo/forgejo
Fix NuGet search endpoints (#25613)
Fixes #25564 Fixes #23191 - Api v2 search endpoint should return only the latest version matching the query - Api v3 search endpoint should return `take` packages not package versions
This commit is contained in:
parent
56b6b2b88e
commit
ecd51f710b
6 changed files with 115 additions and 21 deletions
|
@ -37,3 +37,19 @@ func BuildCaseInsensitiveIn(key string, values []string) builder.Cond {
|
|||
|
||||
return builder.In("UPPER("+key+")", uppers)
|
||||
}
|
||||
|
||||
// BuilderDialect returns the xorm.Builder dialect of the engine
|
||||
func BuilderDialect() string {
|
||||
switch {
|
||||
case setting.Database.Type.IsMySQL():
|
||||
return builder.MYSQL
|
||||
case setting.Database.Type.IsSQLite3():
|
||||
return builder.SQLITE
|
||||
case setting.Database.Type.IsPostgreSQL():
|
||||
return builder.POSTGRES
|
||||
case setting.Database.Type.IsMSSQL():
|
||||
return builder.MSSQL
|
||||
default:
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue