aboutsummaryrefslogtreecommitdiff
path: root/syncapi/storage/sqlite3/backwards_extremities_table.go
diff options
context:
space:
mode:
Diffstat (limited to 'syncapi/storage/sqlite3/backwards_extremities_table.go')
-rw-r--r--syncapi/storage/sqlite3/backwards_extremities_table.go14
1 files changed, 0 insertions, 14 deletions
diff --git a/syncapi/storage/sqlite3/backwards_extremities_table.go b/syncapi/storage/sqlite3/backwards_extremities_table.go
index 662cb025..c5674dde 100644
--- a/syncapi/storage/sqlite3/backwards_extremities_table.go
+++ b/syncapi/storage/sqlite3/backwards_extremities_table.go
@@ -47,15 +47,11 @@ 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 {
db *sql.DB
insertBackwardExtremityStmt *sql.Stmt
selectBackwardExtremitiesForRoomStmt *sql.Stmt
deleteBackwardExtremityStmt *sql.Stmt
- deleteBackwardExtremitiesForRoomStmt *sql.Stmt
}
func NewSqliteBackwardsExtremitiesTable(db *sql.DB) (tables.BackwardsExtremities, error) {
@@ -75,9 +71,6 @@ func NewSqliteBackwardsExtremitiesTable(db *sql.DB) (tables.BackwardsExtremities
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
}
@@ -116,10 +109,3 @@ func (s *backwardExtremitiesStatements) DeleteBackwardExtremity(
_, err = sqlutil.TxStmt(txn, s.deleteBackwardExtremityStmt).ExecContext(ctx, roomID, knownEventID)
return err
}
-
-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
-}