SQL: close rows to release connection (#97147)

* SQL: close rows to release connection

* dont return err from rows.Close()
This commit is contained in:
Matheus Macabu
2024-11-28 14:28:55 +01:00
committed by GitHub
parent 0bf9d68070
commit f2b96593ea
6 changed files with 25 additions and 4 deletions
+5
View File
@@ -29,6 +29,11 @@ func (s *StandardDocumentBuilders) GetDocumentBuilders() ([]resource.DocumentBui
if err != nil {
return nil, err
}
defer func() {
_ = rows.Close()
}()
for rows.Next() {
info := &dashboard.DatasourceQueryResult{}
err = rows.Scan(&info.UID, &info.Type, &info.Name, &info.IsDefault)