aboutsummaryrefslogtreecommitdiff
path: root/userapi/storage/accounts/postgres/profile_table.go
diff options
context:
space:
mode:
authorSam <me@samcday.com>2020-09-24 12:10:14 +0200
committerGitHub <noreply@github.com>2020-09-24 11:10:14 +0100
commita6700331cee70a3ca04c834efdc68cc2ef63947d (patch)
tree10420639a2a4685b2562ff1d106d1ae9a11712d4 /userapi/storage/accounts/postgres/profile_table.go
parent60524f4b994ba070fff74fa47599e0fcc7856fc0 (diff)
Update all usages of tx.Stmt to sqlutil.TxStmt (#1423)
* Replace all usages of txn.Stmt with sqlutil.TxStmt Signed-off-by: Sam Day <me@samcday.com> * Fix sign off link in PR template. Signed-off-by: Sam Day <me@samcday.com> Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
Diffstat (limited to 'userapi/storage/accounts/postgres/profile_table.go')
-rw-r--r--userapi/storage/accounts/postgres/profile_table.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/userapi/storage/accounts/postgres/profile_table.go b/userapi/storage/accounts/postgres/profile_table.go
index 14b12c35..45d802f1 100644
--- a/userapi/storage/accounts/postgres/profile_table.go
+++ b/userapi/storage/accounts/postgres/profile_table.go
@@ -21,6 +21,7 @@ import (
"github.com/matrix-org/dendrite/clientapi/auth/authtypes"
"github.com/matrix-org/dendrite/internal"
+ "github.com/matrix-org/dendrite/internal/sqlutil"
)
const profilesSchema = `
@@ -84,7 +85,7 @@ func (s *profilesStatements) prepare(db *sql.DB) (err error) {
func (s *profilesStatements) insertProfile(
ctx context.Context, txn *sql.Tx, localpart string,
) (err error) {
- _, err = txn.Stmt(s.insertProfileStmt).ExecContext(ctx, localpart, "", "")
+ _, err = sqlutil.TxStmt(txn, s.insertProfileStmt).ExecContext(ctx, localpart, "", "")
return
}