mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-06 22:43:10 -06:00
* Always defer *sql.Rows.Close and consult with Err database/sql.Rows.Next() makes sure to call Close only after exhausting result rows which would NOT happen when returning early from a bad Scan. Close being idempotent makes it a great candidate to get always deferred regardless of what happens later on the result set. This change also makes sure call Err() after exhausting Next() and propagate non-nil results from it as the documentation advises. Closes #764 Signed-off-by: Kiril Vladimiroff <kiril@vladimiroff.org> * Override named result parameters in last returns Signed-off-by: Kiril Vladimiroff <kiril@vladimiroff.org> * Do the same over new changes that got merged Signed-off-by: Kiril Vladimiroff <kiril@vladimiroff.org> Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| event_json_table.go | ||
| event_state_keys_table.go | ||
| event_types_table.go | ||
| events_table.go | ||
| invite_table.go | ||
| membership_table.go | ||
| prepare.go | ||
| previous_events_table.go | ||
| room_aliases_table.go | ||
| rooms_table.go | ||
| sql.go | ||
| state_block_table.go | ||
| state_block_table_test.go | ||
| state_snapshot_table.go | ||
| storage.go | ||
| transactions_table.go | ||