You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
nit: consistently close sql rows, check for errors (#34)
[Detail](https://detail.dev) reported a number of edge-case problems
with the data-loading logic in internal/schema. Fundamentally, I was
being lazy, and omitted some basic error checking.
- Need to `defer rows.Close()` after making a query
- Need to check `rows.Err()` after iterating through the rows.
This PR addresses these issues consistently throughout all the
data-loading code.
Additionally, with newer versions of golang, the compiler is able to
infer more
types when calling generic functions, so I've fixed all the editor
warnings
related to not needing to infer the types when calling the `Sort()`
method.
## Testing
- CI and existing unit tests.