Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
4d3794a057 | |||
7586ac630d |
@ -97,8 +97,8 @@ func SetStructListDB[T any](b *DB, path []string, values []T, fn func(*bolt.Buck
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
// bkt should have the last bucket in the path
|
||||
bkt.SetSequence(0)
|
||||
for _, v := range values {
|
||||
id, _ := bkt.NextSequence()
|
||||
bId := make([]byte, 8)
|
||||
@ -490,6 +490,9 @@ func (b *DB) DeletePair(path []string, key string) error {
|
||||
|
||||
// DeleteBucket deletes the bucket key at path
|
||||
func (b *DB) DeleteBucket(path []string, key string) error {
|
||||
if len(path) == 0 {
|
||||
return errors.New("no path")
|
||||
}
|
||||
var err error
|
||||
if !b.dbIsOpen {
|
||||
if err = b.OpenDB(); err != nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user