mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 04:44:37 +03:00
Optimize allData queries (#3452)
* Add specific fields to allData queries * Add additional allData endpoints
This commit is contained in:
@@ -346,3 +346,11 @@ func (qb *sceneMarkerQueryBuilder) UpdateTags(ctx context.Context, id int, tagID
|
||||
// Delete the existing joins and then create new ones
|
||||
return qb.tagsRepository().replace(ctx, id, tagIDs)
|
||||
}
|
||||
|
||||
func (qb *sceneMarkerQueryBuilder) Count(ctx context.Context) (int, error) {
|
||||
return qb.runCountQuery(ctx, qb.buildCountQuery("SELECT scene_markers.id FROM scene_markers"), nil)
|
||||
}
|
||||
|
||||
func (qb *sceneMarkerQueryBuilder) All(ctx context.Context) ([]*models.SceneMarker, error) {
|
||||
return qb.querySceneMarkers(ctx, selectAll("scene_markers")+qb.getSceneMarkerSort(nil, nil), nil)
|
||||
}
|
||||
|
||||
@@ -222,4 +222,6 @@ func queryMarkers(ctx context.Context, t *testing.T, sqb models.SceneMarkerReade
|
||||
// TODO Find
|
||||
// TODO GetMarkerStrings
|
||||
// TODO Wall
|
||||
// TODO Count
|
||||
// TODO All
|
||||
// TODO Query
|
||||
|
||||
Reference in New Issue
Block a user