diff options
author | Neil Alexander <neilalexander@users.noreply.github.com> | 2022-09-28 10:18:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-28 10:18:03 +0100 |
commit | 3f9e38e80a7be356aaf1294038888df27e0697a8 (patch) | |
tree | 529efc1f8841e409c590d698495c4a9e96383308 /syncapi/storage/postgres/backwards_extremities_table.go | |
parent | a574ed53696c06e6be6dbe313af0caaa56a659ec (diff) |
Consistent `*sql.Tx` usage across sync API (#2744)
This tidies up the `storage` package so that everything takes a
transaction parameter instead of something things that do and some that
don't.
Diffstat (limited to 'syncapi/storage/postgres/backwards_extremities_table.go')
-rw-r--r-- | syncapi/storage/postgres/backwards_extremities_table.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/syncapi/storage/postgres/backwards_extremities_table.go b/syncapi/storage/postgres/backwards_extremities_table.go index d4515735..8fc92091 100644 --- a/syncapi/storage/postgres/backwards_extremities_table.go +++ b/syncapi/storage/postgres/backwards_extremities_table.go @@ -79,9 +79,9 @@ func (s *backwardExtremitiesStatements) InsertsBackwardExtremity( } func (s *backwardExtremitiesStatements) SelectBackwardExtremitiesForRoom( - ctx context.Context, roomID string, + ctx context.Context, txn *sql.Tx, roomID string, ) (bwExtrems map[string][]string, err error) { - rows, err := s.selectBackwardExtremitiesForRoomStmt.QueryContext(ctx, roomID) + rows, err := sqlutil.TxStmt(txn, s.selectBackwardExtremitiesForRoomStmt).QueryContext(ctx, roomID) if err != nil { return } |