MoveBucket moves a sub-bucket from the source bucket to the destination bucket. Returns an error if 1. the sub-bucket cannot be found in the source bucket; 2. or the key already exists in the destination bucket; 3. the key represents a non-bucket value. If src is nil, it means moving a top level bu
(child []byte, src *Bucket, dst *Bucket)
| 141 | // If src is nil, it means moving a top level bucket into the target bucket. |
| 142 | // If dst is nil, it means converting the child bucket into a top level bucket. |
| 143 | func (tx *Tx) MoveBucket(child []byte, src *Bucket, dst *Bucket) error { |
| 144 | if src == nil { |
| 145 | src = &tx.root |
| 146 | } |
| 147 | if dst == nil { |
| 148 | dst = &tx.root |
| 149 | } |
| 150 | return src.MoveBucket(child, dst) |
| 151 | } |
| 152 | |
| 153 | // ForEach executes a function for each bucket in the root. |
| 154 | // If the provided function returns an error then the iteration is stopped and |
no outgoing calls