diff options
author | Ben Johnson <benbjohnson@yahoo.com> | 2014-01-17 15:23:39 -0700 |
---|---|---|
committer | Ben Johnson <benbjohnson@yahoo.com> | 2014-01-17 15:23:39 -0700 |
commit | 153372abd4adbcdb0a8be7eecddcfe5b5c885d9f (patch) | |
tree | c4bb425337b467a9f6d06206f03c0101403c8a43 /db.go | |
parent | Add system buckets. (diff) | |
download | dedo-153372abd4adbcdb0a8be7eecddcfe5b5c885d9f.tar.gz dedo-153372abd4adbcdb0a8be7eecddcfe5b5c885d9f.tar.xz |
Refactoring to RWCursor, RWTxn, and branch/leaf nodes and pages.
Diffstat (limited to 'db.go')
-rw-r--r-- | db.go | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -45,9 +45,8 @@ type DB struct { mmapSize int /**< size of the data memory map */ size int /**< current file size */ pbuf []byte - transaction *Transaction /**< current write transaction */ + transaction *RWTransaction /**< current write transaction */ maxPageNumber int /**< me_mapsize / me_psize */ - pagestate pagestate /**< state of old pages from freeDB */ dpages []*page /**< list of malloc'd blocks for re-use */ freePages []int /** IDL of pages that became unused in a write txn */ dirtyPages []int /** ID2L of pages written during a write txn. Length MDB_IDL_UM_SIZE. */ @@ -223,6 +222,8 @@ func (db *DB) Transaction(writable bool) (*Transaction, error) { db: db, meta: db.meta(), writable: writable, + buckets: make(map[string]*Bucket), + cursors: make(map[uint32]*Cursor), } // Save references to the sys•free and sys•buckets buckets. |