import from khatru.

This commit is contained in:
fiatjaf
2023-10-31 15:40:42 -03:00
commit 473d817cc6
29 changed files with 3269 additions and 0 deletions

12
sqlite3/delete.go Normal file
View File

@@ -0,0 +1,12 @@
package sqlite3
import (
"context"
"github.com/nbd-wtf/go-nostr"
)
func (b SQLite3Backend) DeleteEvent(ctx context.Context, evt *nostr.Event) error {
_, err := b.DB.ExecContext(ctx, "DELETE FROM event WHERE id = $1", evt.ID)
return err
}