aboutsummaryrefslogtreecommitdiff
path: root/db.go
diff options
context:
space:
mode:
authorBen Johnson <benbjohnson@yahoo.com>2014-02-05 22:15:47 -0700
committerBen Johnson <benbjohnson@yahoo.com>2014-02-05 22:15:47 -0700
commit0ed3dc3071d7ef0503f3fcbd015b63bbd6eae93e (patch)
treeac84cf42ed379c1d7b9b0d094a1ac2fe02869dd2 /db.go
parentMerge pull request #7 from benbjohnson/delete (diff)
downloaddedo-0ed3dc3071d7ef0503f3fcbd015b63bbd6eae93e.tar.gz
dedo-0ed3dc3071d7ef0503f3fcbd015b63bbd6eae93e.tar.xz
Rename sys ☞ buckets.
Diffstat (limited to 'db.go')
-rw-r--r--db.go13
1 files changed, 11 insertions, 2 deletions
diff --git a/db.go b/db.go
index 41fbc64..d62114a 100644
--- a/db.go
+++ b/db.go
@@ -156,7 +156,7 @@ func (db *DB) init() error {
m.pageSize = uint32(db.pageSize)
m.version = version
m.free = 2
- m.sys = 3
+ m.buckets = 3
m.pgid = 4
m.txnid = txnid(i)
}
@@ -170,7 +170,7 @@ func (db *DB) init() error {
// Write an empty leaf page at page 4.
p = db.pageInBuffer(buf[:], pgid(3))
p.id = pgid(3)
- p.flags = p_sys
+ p.flags = p_buckets
p.count = 0
// Write the buffer to our data file.
@@ -385,3 +385,12 @@ func (db *DB) Stat() *Stat {
// TODO: Calculate size, depth, page count (by type), entry count, readers, etc.
return nil
}
+
+type Stat struct {
+ PageSize int
+ Depth int
+ BranchPageCount int
+ LeafPageCount int
+ OverflowPageCount int
+ EntryCount int
+}