From a6700331cee70a3ca04c834efdc68cc2ef63947d Mon Sep 17 00:00:00 2001 From: Sam Date: Thu, 24 Sep 2020 12:10:14 +0200 Subject: Update all usages of tx.Stmt to sqlutil.TxStmt (#1423) * Replace all usages of txn.Stmt with sqlutil.TxStmt Signed-off-by: Sam Day * Fix sign off link in PR template. Signed-off-by: Sam Day Co-authored-by: Neil Alexander --- syncapi/storage/postgres/send_to_device_table.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'syncapi/storage/postgres/send_to_device_table.go') diff --git a/syncapi/storage/postgres/send_to_device_table.go b/syncapi/storage/postgres/send_to_device_table.go index 07af9ad6..be9c347b 100644 --- a/syncapi/storage/postgres/send_to_device_table.go +++ b/syncapi/storage/postgres/send_to_device_table.go @@ -160,13 +160,13 @@ func (s *sendToDeviceStatements) SelectSendToDeviceMessages( func (s *sendToDeviceStatements) UpdateSentSendToDeviceMessages( ctx context.Context, txn *sql.Tx, token string, nids []types.SendToDeviceNID, ) (err error) { - _, err = txn.Stmt(s.updateSentSendToDeviceMessagesStmt).ExecContext(ctx, token, pq.Array(nids)) + _, err = sqlutil.TxStmt(txn, s.updateSentSendToDeviceMessagesStmt).ExecContext(ctx, token, pq.Array(nids)) return } func (s *sendToDeviceStatements) DeleteSendToDeviceMessages( ctx context.Context, txn *sql.Tx, nids []types.SendToDeviceNID, ) (err error) { - _, err = txn.Stmt(s.deleteSendToDeviceMessagesStmt).ExecContext(ctx, pq.Array(nids)) + _, err = sqlutil.TxStmt(txn, s.deleteSendToDeviceMessagesStmt).ExecContext(ctx, pq.Array(nids)) return } -- cgit v1.2.3