Commit Graph

11 Commits (7dafeaa896ac5626e97d17a2d9262518a2bc64c0)

Author SHA1 Message Date
Ben Johnson f8ad21bad3 Make DB/Tx API more consistent.
I consolidated the DB.Tx() and DB.RWTx() calls into a single
DB.Begin(writable bool) call. This is more consistent with the
database/sql library.

I also changed the DB.Do() and DB.With() call to DB.Update() and
DB.View(), respectively. This is more intuitive and more inline with
other database verbiage.
2014-03-24 11:43:06 -06:00
Ben Johnson 59fde2f664 Error refactoring.
Fixed up a few error issues and refactored out the Error type.
2014-03-24 08:31:15 -06:00
Ben Johnson 3cc959fb1a Remove ease-of-use functions from the DB type.
Functions such as DB.Put(), DB.Get(), and DB.Delete() were originally
added to be easy to use, however, after implementing Bolt in multiple
projects I have found these ease-of-use functions useless. Nearly
every use case requires multiple calls in a single transaction.

Using the DB ease of use functions turned out to be an antipattern.
2014-03-21 09:52:01 -06:00
Tommi Virtanen ed909b43ea Skip long-running tests with go test -short 2014-03-13 17:10:33 -07:00
Ben Johnson c551e45a47 Consolidate Tx and RWTx. 2014-03-08 20:40:48 -07:00
Ben Johnson 57376f0905 Rename Transaction to Tx.
I changed the Transaction/RWTransaction types to Tx/RWTx, respectively. This makes the naming
more consistent with other packages such as database/sql. The txnid is changed to txid as well.
2014-03-08 17:04:02 -07:00
Ben Johnson a1f43f4d60 Allow reads of unflushed nodes.
This commit allows cursors to read updated values from within the
RWTransaction.
2014-03-01 09:13:59 -07:00
Ben Johnson a544249dd8 Refactor Bucket. 2014-02-23 08:32:53 -07:00
Ben Johnson 3b2fd8f2d3 Revert "Refactor Transaction/Bucket API."
This reverts commit 1ad2b99f28.
2014-02-22 22:54:54 -07:00
Ben Johnson 1ad2b99f28 Refactor Transaction/Bucket API. 2014-02-21 22:57:50 -07:00
Ben Johnson 1028d571d8 Bucket stats. 2014-02-21 09:20:45 -07:00