feat: legacy ListIterator with batches (#115038)

* feat: legacy ListIterator with batches

* chore: address code review

* chore: remove nil check in nextBatch

* chore: move close before count check

* chore: add err field to batchingIterator for its own errors

* chore: remove unused import
This commit is contained in:
Rafael Bortolon Paulovic
2025-12-10 16:12:08 +01:00
committed by GitHub
parent 8c6ccdd1ab
commit 5eae7d4f22
18 changed files with 775 additions and 8 deletions
@@ -71,6 +71,9 @@ WHERE dashboard.is_folder = {{ .Arg .Query.GetFolders }}
COALESCE(dashboard_version.version, dashboard.version) {{ .Query.Order }},
{{ end }}
dashboard.uid ASC
{{ if .Query.MaxRows }}
LIMIT {{ .Arg .Query.MaxRows }}
{{ end }}
{{ else }}
{{ if .Query.UID }}
AND dashboard.uid = {{ .Arg .Query.UID }}
@@ -83,4 +86,7 @@ WHERE dashboard.is_folder = {{ .Arg .Query.GetFolders }}
AND dashboard.deleted IS NULL
{{ end }}
ORDER BY dashboard.id DESC
{{ if .Query.MaxRows }}
LIMIT {{ .Arg .Query.MaxRows }}
{{ end }}
{{ end }}