Add slim endpoints for entities to speed up filters (#460)

* Move performers image column to end of table
* Remove redundant index
This commit is contained in:
InfiniteTF
2020-04-19 04:03:51 +02:00
committed by GitHub
parent 7ef0000744
commit 2a3c9742cc
14 changed files with 156 additions and 12 deletions

View File

@@ -93,6 +93,10 @@ func (qb *StudioQueryBuilder) All() ([]*Studio, error) {
return qb.queryStudios(selectAll("studios")+qb.getStudioSort(nil), nil, nil)
}
func (qb *StudioQueryBuilder) AllSlim() ([]*Studio, error) {
return qb.queryStudios("SELECT studios.id, studios.name FROM studios "+qb.getStudioSort(nil), nil, nil)
}
func (qb *StudioQueryBuilder) Query(findFilter *FindFilterType) ([]*Studio, int) {
if findFilter == nil {
findFilter = &FindFilterType{}