diff options
author | Ben Johnson <benbjohnson@yahoo.com> | 2014-02-20 13:24:55 -0700 |
---|---|---|
committer | Ben Johnson <benbjohnson@yahoo.com> | 2014-02-20 13:24:55 -0700 |
commit | b9ec84552bf97db7d55180af513dce26f4539b22 (patch) | |
tree | 0b0c2119fbcf0296631f996c68e2e86b86df60e5 /rwtransaction.go | |
parent | Merge pull request #43 from benbjohnson/cursor-godoc-fix (diff) | |
parent | Cursor.Get is now Cursor.Seek, and returns the first possible key. (diff) | |
download | dedo-b9ec84552bf97db7d55180af513dce26f4539b22.tar.gz dedo-b9ec84552bf97db7d55180af513dce26f4539b22.tar.xz |
Merge pull request #45 from benbjohnson/seek
Cursor.Get is now Cursor.Seek, and returns the first possible key.
Diffstat (limited to 'rwtransaction.go')
-rw-r--r-- | rwtransaction.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/rwtransaction.go b/rwtransaction.go index 84e6425..e22c766 100644 --- a/rwtransaction.go +++ b/rwtransaction.go @@ -20,7 +20,7 @@ func (t *RWTransaction) init(db *DB) { t.Transaction.init(db) t.pages = make(map[pgid]*page) - // Increment the transaction id. + // Increment the transaction id. t.meta.txnid += txnid(1) } @@ -114,7 +114,7 @@ func (t *RWTransaction) Put(name string, key []byte, value []byte) error { // Move cursor to correct position. c := b.cursor() - c.Get(key) + c.Seek(key) // Insert the key/value. c.node(t).put(key, key, value, 0) @@ -133,7 +133,7 @@ func (t *RWTransaction) Delete(name string, key []byte) error { // Move cursor to correct position. c := b.cursor() - c.Get(key) + c.Seek(key) // Delete the node if we have a matching key. c.node(t).del(key) |