ForEachBucket invokes the passed function with the key of every nested bucket in the current bucket. This does not include any nested buckets within those nested buckets.

WARNING: It is not safe to mutate data while iterating with this method. Doing so may cause the underlying cursor to be invalidated and return unexpected keys and/or values.

The interface contract guarantees at least the following errors will be returned (other implementation-specific errors are possible):

- ErrTxClosed if the transaction has already been closed

NOTE: The keys returned by this function are only valid during a transaction. Attempting to access them after a transaction has ended results in undefined behavior. This constraint prevents additional data copies and allows support for memory-mapped database implementations.

ForEachBucket is referenced in 1 repository