aboutsummaryrefslogtreecommitdiff
path: root/cursor.go (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Move code to src/ and tests/EuAndreh2024-10-251-400/+0
|
* skip empty pages during cursor seekLuke Champine2015-11-051-19/+35
| | | | | | | | This commit fixes an issue where keys are skipped by cursors after deletions occur in a bucket. This occurred because the cursor seeks to the leaf page but does not check if it is empty. Fixes #429, #450
* Document key/value safety.Ben Johnson2015-03-241-0/+7
| | | | | | This commit adds safety documentation to the data accessor functions in Bolt as well as the README. This was documented once in the package level godoc but it's important enough that it should be more clear.
* Expand assertion statements.Ben Johnson2015-01-301-2/+3
| | | | | | This commit expands calls to _assert() that use variadic arguments. These calls require conversion to interface{} so there was a large number of calls to Go's internal convT2E() function. In some profiling this was taking over 20% of total runtime. I don't remember seeing this before Go 1.4 so perhaps something has changed.
* Clarify cursor behavior after mutation.Ben Johnson2014-11-271-0/+4
|
* add Cursor.Delete()Martin Kobetic2014-06-111-0/+19
|
* Refactor Cursor.Next() to use Cursor.next().Ben Johnson2014-06-091-23/+1
|
* Fix last element seek.Ben Johnson2014-06-091-7/+42
| | | | | | | | | | | | | This commit fixes a bug with seeks where seeking to a key between the end of a page and the beginning of the next page causes it to return nil. This was fixed by calling Cursor.next() when the cursor ends up between pages. This also changes Cursor.Next() so that calling Next() at the end of a bucket leaves the cursor at the end instead of zeroing out the stack. Fixes #186. /cc @PreetamJinka
* Fix freelist allocation direction.Ben Johnson2014-05-191-1/+1
| | | | | | This commit fixes the freelist so that it frees from the beginning of the data file instead of the end. It also adds a fast path for pages which can be allocated from the first free pages and it includes read transaction stats.
* Fix bucket free.Ben Johnson2014-05-071-1/+1
|
* Document cursors seeing nested bucketsTommi Virtanen2014-05-041-0/+1
|
* Cursor.Seek validity is indicated by key being nilTommi Virtanen2014-05-041-1/+1
|
* Refactor split/spill.Ben Johnson2014-05-031-1/+1
|
* Add Cursor.Bucket() function.Ben Johnson2014-04-161-0/+5
| | | | | This commit adds an accessor to the Cursor type to retrieve the Bucket that it was created from.
* Add nested buckets.Ben Johnson2014-04-111-25/+55
| | | | | | | This commit adds the ability to create buckets inside of other buckets. It also replaces the buckets page with a root bucket. Fixes #56.
* Rename internal local Tx variables.Ben Johnson2014-04-041-2/+2
| | | | | | This commit changes the local Tx variables from "t" to "tx". This is partly for consistency with external documentation but also because it just annoys me for some reason.
* Add ErrTxClosed error.Ben Johnson2014-03-231-0/+8
| | | | | | | | 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.
* Fix Cursor.Last() on empty buckets.Ben Johnson2014-03-131-1/+1
| | | | | | | | @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.
* Consolidate Tx and RWTx.Ben Johnson2014-03-081-1/+1
|
* Rename Transaction to Tx.Ben Johnson2014-03-081-10/+10
| | | | | 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.
* Allow reads of unflushed nodes.Ben Johnson2014-03-011-51/+134
| | | | | This commit allows cursors to read updated values from within the RWTransaction.
* Minor refactor.Ben Johnson2014-02-281-6/+2
|
* Revert "Refactor Transaction/Bucket API."Ben Johnson2014-02-221-1/+1
| | | | This reverts commit 1ad2b99f281d587b767b36f886401e81d17915a9.
* Refactor Transaction/Bucket API.Ben Johnson2014-02-211-1/+1
|
* Bidirectional cursors.Ben Johnson2014-02-201-1/+53
|
* Cursor.Get is now Cursor.Seek, and returns the first possible key.Tommi Virtanen2014-02-201-12/+8
| | | | | | This makes range and prefix queries possible. Closes: #44
* Fix Cursor godoc for First(), Next(), and Get().Ben Johnson2014-02-201-3/+3
|
* Improve test coverage.Ben Johnson2014-02-151-3/+1
|
* API Documentation.Ben Johnson2014-02-131-10/+16
|
* Cursor iteration.Ben Johnson2014-02-111-3/+50
|
* Add freelist.Ben Johnson2014-02-101-9/+1
|
* Rebalance after deletion.Ben Johnson2014-02-081-5/+5
|
* Refactor node lookup.Ben Johnson2014-02-071-18/+31
|
* Fix quick tests.Ben Johnson2014-02-051-1/+0
|
* Add RWTransaction.Put().Ben Johnson2014-02-011-24/+43
|
* gofmtBen Johnson2014-01-301-3/+3
|
* Fix leaf/branch deserialization.Ben Johnson2014-01-301-6/+39
|
* Refactor meta.copy() and page.init().Ben Johnson2014-01-291-1/+0
|
* lpageBen Johnson2014-01-271-2/+7
|
* Intermediate.Ben Johnson2014-01-271-8/+29
|
* Initialize transaction/rwtransaction.Ben Johnson2014-01-261-30/+10
|
* TODOBen Johnson2014-01-241-2646/+28
|
* TODOBen Johnson2014-01-241-11/+0
|
* Intermediate commit.Ben Johnson2014-01-211-36/+12
|
* Refactoring to RWCursor, RWTxn, and branch/leaf nodes and pages.Ben Johnson2014-01-171-1113/+264
|
* Add system buckets.Ben Johnson2014-01-141-42/+9
|
* Begin Transaction.Cursor().Ben Johnson2014-01-131-120/+101
|
* Initial db.open.Ben Johnson2014-01-111-2880/+2883
|
* DB.Open(), pages, and meta.Ben Johnson2014-01-101-0/+7
|
* Move all C code into repo.Ben Johnson2014-01-091-0/+3557
|