diff options
author | Neil Alexander <neilalexander@users.noreply.github.com> | 2020-09-01 11:28:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-01 11:28:35 +0100 |
commit | 0ab5bccd11eea6063968c60fbdf5b36ade22da81 (patch) | |
tree | 0371a076b5ea9acd6693e27587c77c9bbf287f1b /syncapi/storage/postgres | |
parent | 3f9b829bc570d5f6353eda21ecf3d0088e4d9c50 (diff) |
Storage tweaks (#1373)
* Sync API tweaks
* User API tweaks
Diffstat (limited to 'syncapi/storage/postgres')
-rw-r--r-- | syncapi/storage/postgres/invites_table.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/syncapi/storage/postgres/invites_table.go b/syncapi/storage/postgres/invites_table.go index eed58c15..c0dd42c5 100644 --- a/syncapi/storage/postgres/invites_table.go +++ b/syncapi/storage/postgres/invites_table.go @@ -110,9 +110,10 @@ func (s *inviteEventsStatements) InsertInviteEvent( } func (s *inviteEventsStatements) DeleteInviteEvent( - ctx context.Context, inviteEventID string, + ctx context.Context, txn *sql.Tx, inviteEventID string, ) (sp types.StreamPosition, err error) { - err = s.deleteInviteEventStmt.QueryRowContext(ctx, inviteEventID).Scan(&sp) + stmt := sqlutil.TxStmt(txn, s.deleteInviteEventStmt) + err = stmt.QueryRowContext(ctx, inviteEventID).Scan(&sp) return } |