Add method to reset key of record

This commit is contained in:
Daniel 2023-09-19 16:44:54 +02:00
parent 3dffea1d37
commit 1f08d4f02f

View file

@ -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.