diff options
author | Ben Johnson <benbjohnson@yahoo.com> | 2014-01-31 12:22:58 -0500 |
---|---|---|
committer | Ben Johnson <benbjohnson@yahoo.com> | 2014-01-31 12:22:58 -0500 |
commit | a901cf6a25d301c6c67da3f8f1e51ca2f9c25bd4 (patch) | |
tree | b270b94589bab6b3e39f07886d30b52427b6b23d /rwtransaction.go | |
parent | Merge pull request #3 from benbjohnson/spill (diff) | |
download | dedo-a901cf6a25d301c6c67da3f8f1e51ca2f9c25bd4.tar.gz dedo-a901cf6a25d301c6c67da3f8f1e51ca2f9c25bd4.tar.xz |
Clean up API.
Diffstat (limited to 'rwtransaction.go')
-rw-r--r-- | rwtransaction.go | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/rwtransaction.go b/rwtransaction.go index 1667609..145e0cf 100644 --- a/rwtransaction.go +++ b/rwtransaction.go @@ -79,7 +79,7 @@ func (t *RWTransaction) Put(name string, key []byte, value []byte) error { return nil } -func (t *RWTransaction) Delete(key []byte) error { +func (t *RWTransaction) Delete(name string, key []byte) error { // TODO: Traverse to the correct node. // TODO: If missing, exit. // TODO: Remove node from page. @@ -116,17 +116,15 @@ func (t *RWTransaction) Commit() error { return nil } -func (t *RWTransaction) Rollback() error { - return t.close() +func (t *RWTransaction) Rollback() { + t.close() } -func (t *RWTransaction) close() error { +func (t *RWTransaction) close() { // Clear temporary pages. t.leafs = nil // TODO: Release writer lock. - - return nil } // allocate returns a contiguous block of memory starting at a given page. |