summaryrefslogtreecommitdiff
path: root/pkg/database
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--pkg/database/states.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkg/database/states.go b/pkg/database/states.go
index ef2263b..3a0b0b9 100644
--- a/pkg/database/states.go
+++ b/pkg/database/states.go
@@ -4,6 +4,11 @@ import (
"database/sql"
)
+func (db *DB) DeleteState(name string) error {
+ _, err := db.Exec(`DELETE FROM states WHERE name = ?;`, name)
+ return err
+}
+
func (db *DB) GetState(name string) ([]byte, error) {
var encryptedData []byte
err := db.QueryRow(`SELECT data FROM states WHERE name = ?;`, name).Scan(&encryptedData)