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