mirror of
https://github.com/navidrome/navidrome.git
synced 2025-08-10 00:52:20 +00:00
refactor: consolidate query executions into two functions queryOne and queryAll
This commit is contained in:
@@ -49,11 +49,7 @@ func (r sqlRepository) doSearch(q string, offset, size int, results interface{},
|
||||
Like{"full_text": "%" + part + "%"},
|
||||
})
|
||||
}
|
||||
sql, args, err := r.toSql(sq)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
_, err = r.ormer.Raw(sql, args...).QueryRows(results)
|
||||
err := r.queryAll(sq, results)
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user