migrate all built-in storage backends.

This commit is contained in:
fiatjaf
2023-05-01 19:40:16 -03:00
parent e3d4655dba
commit 4e15120111
15 changed files with 120 additions and 80 deletions

View File

@@ -1,6 +1,8 @@
package sqlite3
func (b SQLite3Backend) DeleteEvent(id string, pubkey string) error {
_, err := b.DB.Exec("DELETE FROM event WHERE id = $1 AND pubkey = $2", id, pubkey)
import "context"
func (b SQLite3Backend) DeleteEvent(ctx context.Context, id string, pubkey string) error {
_, err := b.DB.ExecContext(ctx, "DELETE FROM event WHERE id = $1 AND pubkey = $2", id, pubkey)
return err
}