ForEach invokes the passed function with every key/value pair in the bucket. This does not include nested buckets or the key/value pairs 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.
Returns the following errors as required by the interface contract:
- ErrTxClosed if the transaction has already been closed
NOTE: The values returned by this function are only valid during a transaction. Attempting to access them after a transaction has ended will likely result in an access violation.
This function is part of the database.Bucket interface implementation.