Chore: Add support bundle for folders (#83360)

* add support bundle for folders

* fix ProvideService in tests

* add a test for collector
This commit is contained in:
Serge Zaitsev
2024-02-26 11:27:22 +01:00
committed by GitHub
parent ae00b4fb53
commit d0679f0993
14 changed files with 163 additions and 18 deletions
+5 -2
View File
@@ -464,8 +464,11 @@ func (ss *sqlStore) GetFolders(ctx context.Context, q getFoldersQuery) ([]*folde
s.WriteString(getFullpathJoinsSQL())
}
// covered by UQE_folder_org_id_uid
s.WriteString(` WHERE f0.org_id=?`)
args := []any{q.OrgID}
args := []any{}
if q.OrgID > 0 {
s.WriteString(` WHERE f0.org_id=?`)
args = []any{q.OrgID}
}
if len(partialUIDs) > 0 {
s.WriteString(` AND f0.uid IN (?` + strings.Repeat(", ?", len(partialUIDs)-1) + `)`)
for _, uid := range partialUIDs {