Use parameter binding for all queries

This commit is contained in:
Infinite
2020-02-29 16:18:59 +01:00
parent 97ab40595e
commit 716c33fc8e
6 changed files with 15 additions and 28 deletions

View File

@@ -108,7 +108,9 @@ func (qb *StudioQueryBuilder) Query(findFilter *FindFilterType) ([]*Studio, int)
if q := findFilter.Q; q != nil && *q != "" {
searchColumns := []string{"studios.name"}
whereClauses = append(whereClauses, getSearch(searchColumns, *q))
clause, thisArgs := getSearchBinding(searchColumns, *q, false)
whereClauses = append(whereClauses, clause)
args = append(args, thisArgs...)
}
sortAndPagination := qb.getStudioSort(findFilter) + getPagination(findFilter)