mvcc/backend/batch_tx.go
func (t *batchTx) UnsafeRange(bucketName, key, endKey []byte, limit int64) ([][]byte, [][]byte) {
	bucket := t.tx.Bucket(bucketName)
	if bucket == nil {
		if t.backend.lg != nil {
			t.backend.lg.Fatal(
				"failed to find a bucket",
				zap.String("bucket-name", string(bucketName)),
			)
		} else {
			plog.Fatalf("bucket %s does not exist", bucketName)
		}
	}
	return unsafeRange(bucket.Cursor(), key, endKey, limit)
}
func (t *batchTx) UnsafeRange(bucketName, key, endKey []byte, limit int64) ([][]byte, [][]byte) {
	bucket := t.tx.Bucket(bucketName)
	if bucket == nil {
		if t.backend.lg != nil {
			t.backend.lg.Fatal(
				"failed to find a bucket",
				zap.String("bucket-name", string(bucketName)),
			)
		} else {
			plog.Fatalf("bucket %s does not exist", bucketName)
		}
	}
	return unsafeRange(bucket.Cursor(), key, endKey, limit)
}
func ( t * batchTx ) UnsafeRange ( bucketName , key , endKey [ ] byte , limit int64 ) ( [ ] [ ] byte , [ ] [ ] byte ) { bucket := t . tx . Bucket ( bucketName ) if bucket == nil { if t . backend . lg != nil { t . backend . lg . Fatal ( " " , zap . String ( " " , string ( bucketName ) ) , ) } else { plog . Fatalf ( " " , bucketName ) } } return unsafeRange ( bucket . Cursor ( ) , key , endKey , limit ) }
// UnsafeRange must be called holding the lock on the tx.
UnsafeRange must be called holding the lock on the tx .