Switch to squirrel

This commit is contained in:
Jon Staab
2025-09-24 16:21:26 -07:00
parent 9b927842a2
commit 307dcda4a7
8 changed files with 65 additions and 93 deletions
+2 -3
View File
@@ -2,12 +2,11 @@ package sqlite
import (
"fiatjaf.com/nostr"
"github.com/Masterminds/squirrel"
)
func (s *SqliteBackend) DeleteEvent(id nostr.ID) error {
s.Lock()
defer s.Unlock()
_, err := squirrel.Delete("events").Where(squirrel.Eq{"id": id.Hex()}).RunWith(s.db).Exec()
_, err := s.db.Exec("DELETE FROM events WHERE id = ?", id.Hex())
return err
}