aboutsummaryrefslogtreecommitdiff
path: root/syncapi/storage/postgres/backwards_extremities_table.go
diff options
context:
space:
mode:
Diffstat (limited to 'syncapi/storage/postgres/backwards_extremities_table.go')
-rw-r--r--syncapi/storage/postgres/backwards_extremities_table.go14
1 files changed, 0 insertions, 14 deletions
diff --git a/syncapi/storage/postgres/backwards_extremities_table.go b/syncapi/storage/postgres/backwards_extremities_table.go
index d5cf563a..d4515735 100644
--- a/syncapi/storage/postgres/backwards_extremities_table.go
+++ b/syncapi/storage/postgres/backwards_extremities_table.go
@@ -47,14 +47,10 @@ const selectBackwardExtremitiesForRoomSQL = "" +
const deleteBackwardExtremitySQL = "" +
"DELETE FROM syncapi_backward_extremities WHERE room_id = $1 AND prev_event_id = $2"
-const deleteBackwardExtremitiesForRoomSQL = "" +
- "DELETE FROM syncapi_backward_extremities WHERE room_id = $1"
-
type backwardExtremitiesStatements struct {
insertBackwardExtremityStmt *sql.Stmt
selectBackwardExtremitiesForRoomStmt *sql.Stmt
deleteBackwardExtremityStmt *sql.Stmt
- deleteBackwardExtremitiesForRoomStmt *sql.Stmt
}
func NewPostgresBackwardsExtremitiesTable(db *sql.DB) (tables.BackwardsExtremities, error) {
@@ -72,9 +68,6 @@ func NewPostgresBackwardsExtremitiesTable(db *sql.DB) (tables.BackwardsExtremiti
if s.deleteBackwardExtremityStmt, err = db.Prepare(deleteBackwardExtremitySQL); err != nil {
return nil, err
}
- if s.deleteBackwardExtremitiesForRoomStmt, err = db.Prepare(deleteBackwardExtremitiesForRoomSQL); err != nil {
- return nil, err
- }
return s, nil
}
@@ -113,10 +106,3 @@ func (s *backwardExtremitiesStatements) DeleteBackwardExtremity(
_, err = sqlutil.TxStmt(txn, s.deleteBackwardExtremityStmt).ExecContext(ctx, roomID, knownEventID)
return
}
-
-func (s *backwardExtremitiesStatements) DeleteBackwardExtremitiesForRoom(
- ctx context.Context, txn *sql.Tx, roomID string,
-) (err error) {
- _, err = sqlutil.TxStmt(txn, s.deleteBackwardExtremitiesForRoomStmt).ExecContext(ctx, roomID)
- return err
-}