aboutsummaryrefslogtreecommitdiff
path: root/page.go
diff options
context:
space:
mode:
authorBen Johnson <benbjohnson@yahoo.com>2014-04-07 16:24:51 -0600
committerBen Johnson <benbjohnson@yahoo.com>2014-04-11 12:36:54 -0600
commit698b07b074dc554578ecddd138972702f46d0879 (patch)
treef171f10bd4f17986cb9120d71263995b28273a7a /page.go
parentUpdate cursor benchmark. (diff)
downloaddedo-698b07b074dc554578ecddd138972702f46d0879.tar.gz
dedo-698b07b074dc554578ecddd138972702f46d0879.tar.xz
Add nested buckets.
This commit adds the ability to create buckets inside of other buckets. It also replaces the buckets page with a root bucket. Fixes #56.
Diffstat (limited to 'page.go')
-rw-r--r--page.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/page.go b/page.go
index 0d46f09..56cf064 100644
--- a/page.go
+++ b/page.go
@@ -19,10 +19,13 @@ const (
branchPageFlag = 0x01
leafPageFlag = 0x02
metaPageFlag = 0x04
- bucketsPageFlag = 0x08
freelistPageFlag = 0x10
)
+const (
+ bucketLeafFlag = 0x01
+)
+
type pgid uint64
type page struct {
@@ -41,8 +44,6 @@ func (p *page) typ() string {
return "leaf"
} else if (p.flags & metaPageFlag) != 0 {
return "meta"
- } else if (p.flags & bucketsPageFlag) != 0 {
- return "buckets"
} else if (p.flags & freelistPageFlag) != 0 {
return "freelist"
}