From 1f08d4f02f731214abb5b02fe530e92d50b75c42 Mon Sep 17 00:00:00 2001
From: Daniel <dhaavi@users.noreply.github.com>
Date: Tue, 19 Sep 2023 16:44:54 +0200
Subject: [PATCH] Add method to reset key of record

---
 database/record/base.go | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/database/record/base.go b/database/record/base.go
index bb24bcb..ef157f4 100644
--- a/database/record/base.go
+++ b/database/record/base.go
@@ -44,6 +44,13 @@ func (b *Base) SetKey(key string) {
 	}
 }
 
+// ResetKey resets the database name and key.
+// Use with caution!
+func (b *Base) ResetKey() {
+	b.dbName = ""
+	b.dbKey = ""
+}
+
 // Key returns the key of the database record.
 // As the key must be set before any usage and can only be set once, this
 // function may be used without locking the record.