| Commit message (Expand) | Author | Files | Lines |
| 2014-03-24 | 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.
| Ben Johnson | 1 | -3/+3 |
| 2014-03-24 | Error refactoring.•••Fixed up a few error issues and refactored out the Error type.
| Ben Johnson | 8 | -106/+94 |
| 2014-03-24 | Re-add tests for write failures•••Commit d2173f5f0ecbf4ed93c768e975435b04df3186ec removed the complete
os & syscall mocking layer as overly complex. This commit adds back
the simplest possible thing: hooks to control the database file
writes.
Missing tests: TestDBOpenMetaFileError, TestDBMmapStatError.
These are harder to test without more extensive mocking.
Conflicts:
db_test.go
| Tommi Virtanen | 3 | -3/+78 |
| 2014-03-24 | Resolve remaining errcheck warnings. | Ben Johnson | 2 | -11/+29 |
| 2014-03-23 | Check errors from file close in DB.CopyFile•••Write errors are often delayed and reported only by the close.
The extra close in defer on success is harmless, (*os.File).Close
protects itself against multiple closes, and this way it's immediately
obvious there is no code path that would leak open files.
| Tommi Virtanen | 1 | -1/+5 |
| 2014-03-23 | Check spill error in Commit | Tommi Virtanen | 1 | -1/+3 |
| 2014-03-23 | Check meta page write error in Commit | Tommi Virtanen | 1 | -1/+3 |
| 2014-03-23 | Add ErrTxClosed error.•••Commit/Rollback and mutable calls on Tx and Bucket now return ErrTxClosed
if the transaction has already been committed or rolled back. Non-mutable
calls have added an assertion to check if the transaction is closed which
will cause a panic. I don't want to introduce an error return for accessor
methods that are being used improperly so I think the panic is appropriate.
| Ben Johnson | 5 | -17/+89 |
| 2014-03-23 | Mark Do()/With() transaction as managed.•••Transaction created from Do() and With() are now considered "managed".
Managed transactions cannot be manually committed or rolled back since
the Do() and With() functions provide that functionally automatically.
Previously, a Tx could be manually committed and then any changes after
that would be lost.
| Ben Johnson | 3 | -5/+43 |
| 2014-03-23 | Consolidate syscall files. | Ben Johnson | 2 | -1/+0 |
| 2014-03-23 | fix 32bit build fails: bucket.go#67 | binz | 1 | -1/+1 |
| 2014-03-22 | Call fdatasync/fsync after writing out non-meta pages•••This avoids a case where writes can be reordered so meta page is
written before a page it refers to, potentially causing a corrupt
database after a power loss or kernel crash.
| Tommi Virtanen | 3 | -0/+23 |
| 2014-03-21 | Fix print. | Ben Johnson | 1 | -6/+31 |
| 2014-03-21 | Add 'bolt buckets'. | Ben Johnson | 2 | -0/+54 |
| 2014-03-21 | Add 'bolt set'. | Ben Johnson | 2 | -3/+69 |
| 2014-03-21 | Add 'bolt pages'. | Ben Johnson | 4 | -0/+97 |
| 2014-03-21 | Add 'bolt keys'. | Ben Johnson | 2 | -3/+75 |
| 2014-03-21 | Add 'bolt get'. | Ben Johnson | 2 | -0/+190 |
| 2014-03-21 | Fix db.munmap() to return an error.•••Changes munmap to return an error and the DB now implements io.Closer.
I also removed all the OS and Syscall mocking because it's causing issues.
Corrupt file tests need to be recreated but directly using the file system
instead.
| Ben Johnson | 9 | -347/+36 |
| 2014-03-21 | 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.
| Ben Johnson | 6 | -500/+472 |
| 2014-03-15 | Fix Bucket.ForEach() comment. | Ben Johnson | 1 | -1/+2 |
| 2014-03-13 | Skip long-running tests with go test -short | Tommi Virtanen | 3 | -0/+28 |
| 2014-03-13 | Fix Tx.Buckets() sort order.•••@tv42 reported an issue with bucket names returning incorrectly. Not sure if
this fixes the issue but it is necessary anyway.
| Ben Johnson | 2 | -0/+7 |
| 2014-03-13 | Fix Cursor.Last() on empty buckets.•••@tv42 reported that creating a cursor on an empty bucket and then calling
Cursor.Last() causes an index out of range error and panics. This commit
adds a check for the page's item count being greater than zero.
Fixes #63.
| Ben Johnson | 2 | -7/+22 |
| 2014-03-10 | README | Ben Johnson | 1 | -2/+2 |
| 2014-03-08 | Consolidate Tx and RWTx. | Ben Johnson | 16 | -718/+718 |
| 2014-03-08 | 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.
| Ben Johnson | 17 | -273/+259 |
| 2014-03-04 | Add benchmarks. | Ben Johnson | 5 | -1/+106 |
| 2014-03-01 | Ignore multiple transaction commit/rollback/close. | Ben Johnson | 3 | -5/+16 |
| 2014-03-01 | Allow reads of unflushed nodes.•••This commit allows cursors to read updated values from within the
RWTransaction.
| Ben Johnson | 7 | -62/+172 |
| 2014-02-28 | Minor refactor. | Ben Johnson | 6 | -32/+26 |
| 2014-02-27 | Fix the mmap resize to use the correct size.•••Fixes #54. Previously the DB was calculating a minimum mmap size but
using the wrong variable after it calculated the size. This commit
changes the DB to use the correct variable.
| Ben Johnson | 1 | -1/+1 |
| 2014-02-27 | Add bucket reclamation.•••After RWTransaction.DeleteBucket() is called, all pages related to the
bucket are moved to the freelist for that transaction.
| Ben Johnson | 2 | -2/+12 |
| 2014-02-26 | Add bolt.Open().•••Per the suggestion of @tv42 and @cespare, this commit adds a package level
function to create and initialize a database at a given path. This is
a common interface for database packages.
| Ben Johnson | 2 | -0/+36 |
| 2014-02-25 | Remove RWTransaction.Bucket().•••Add an reference to the RWTransaction onto Transaction so that calls to
Transaction.Bucket() and Transaction.Buckets() return writable buckets
when attached to a writabe transaction.
| Ben Johnson | 2 | -32/+20 |
| 2014-02-23 | Refactor Bucket. | Ben Johnson | 11 | -453/+549 |
| 2014-02-22 | Revert "Refactor Transaction/Bucket API."•••This reverts commit 1ad2b99f281d587b767b36f886401e81d17915a9.
| Ben Johnson | 15 | -853/+856 |
| 2014-02-21 | Refactor Transaction/Bucket API. | Ben Johnson | 15 | -856/+853 |
| 2014-02-21 | Add DB.Stat(). | Ben Johnson | 2 | -0/+97 |
| 2014-02-21 | Bucket stats. | Ben Johnson | 3 | -0/+107 |
| 2014-02-20 | Bidirectional cursors. | Ben Johnson | 4 | -4/+134 |
| 2014-02-20 | Cursor.Get is now Cursor.Seek, and returns the first possible key.•••This makes range and prefix queries possible.
Closes: #44
| Tommi Virtanen | 3 | -16/+21 |
| 2014-02-20 | Fix Cursor godoc for First(), Next(), and Get(). | Ben Johnson | 1 | -3/+3 |
| 2014-02-20 | Update project status. | Ben Johnson | 1 | -1/+1 |
| 2014-02-20 | Check for sequence overflow. | Ben Johnson | 4 | -0/+32 |
| 2014-02-20 | Add 'make cloc'. | Ben Johnson | 1 | -1/+5 |
| 2014-02-18 | Change project status to 'Alpha'. | Ben Johnson | 1 | -1/+1 |
| 2014-02-16 | Read-only transactional block. | Ben Johnson | 3 | -5/+37 |
| 2014-02-16 | Add Transaction.ForEach(). | Ben Johnson | 4 | -0/+121 |
| 2014-02-16 | Add CreateBucketIfNotExists(). | Ben Johnson | 3 | -0/+31 |