dendrite/clientapi/auth/storage/accounts
Kiril Vladimiroff 59465746bc
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>
2020-02-06 11:27:24 +02:00
..
account_data_table.go Always defer *sql.Rows.Close and consult with Err 2020-02-06 11:27:24 +02:00
accounts_table.go use go module for dependencies (#594) 2019-05-21 21:56:55 +01:00
filter_table.go Store & retrieve filters as structs rather than []byte (#436) 2019-07-25 00:08:51 +08:00
membership_table.go Always defer *sql.Rows.Close and consult with Err 2020-02-06 11:27:24 +02:00
profile_table.go use go module for dependencies (#594) 2019-05-21 21:56:55 +01:00
storage.go Add empty push rules into account data on account creation (#862) 2020-01-30 11:20:44 +00:00
threepid_table.go Always defer *sql.Rows.Close and consult with Err 2020-02-06 11:27:24 +02:00