boltdb/bolt — pull request #50 by benbjohnson (2014-02-22 06:09:18+00:00)
Title: Refactor Transaction/Bucket API

## Overview

This pull request primarily changes the Transaction & Bucket APIs. The Bucket type is now owns all data accessor and mutator methods which the Transaction is only concerned with Bucket management and Commit/Rollback.

## Changes

The following changes have been made:

* Moved `Get()`, `Put()`, `Delete()`, `NextSequence()`, and `ForEach()` from Transaction to Bucket.

* Consolidated the `RWTransaction` and `Transaction` types into a single `Transaction` type. There is a `Writable()` function to check if it's a read-write transaction.

* Added `ErrTransactionNotWritable` for mutators functions on the bucket if created from a read-only transaction.

/cc @tv42