diff options
author | Ben Johnson <benbjohnson@yahoo.com> | 2014-01-24 16:32:18 -0700 |
---|---|---|
committer | Ben Johnson <benbjohnson@yahoo.com> | 2014-01-24 16:32:18 -0700 |
commit | 73ab1d420dedd965ebe6f814dcf016c8e10879f2 (patch) | |
tree | 2a025e8e8daeaba34953c6b92b83bd579c83962b /node.go | |
parent | TODO (diff) | |
download | dedo-73ab1d420dedd965ebe6f814dcf016c8e10879f2.tar.gz dedo-73ab1d420dedd965ebe6f814dcf016c8e10879f2.tar.xz |
TODO
Diffstat (limited to 'node.go')
-rw-r--r-- | node.go | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/node.go b/node.go deleted file mode 100644 index 6ca2d72..0000000 --- a/node.go +++ /dev/null @@ -1,40 +0,0 @@ -package bolt - -import ( - "unsafe" -) - -// node represents a node on a page. -type node struct { - flags uint16 - keySize uint16 -} - -// leafNode represents a node on a leaf page. -type leafNode struct { - node - dataSize uint32 - data uintptr // Pointer to the beginning of the data. -} - -// branchNode represents a node on a branch page. -type branchNode struct { - node - pgno uint32 - data uintptr // Pointer to the beginning of the data. -} - -// key returns a byte slice that of the key data. -func (n *leafNode) key() []byte { - return (*[MaxKeySize]byte)(unsafe.Pointer(&n.data))[:n.keySize] -} - -func leafNodeSize(key []byte, data []byte) int { - // TODO: Return even(sizeof(node) + len(key) + len(data)) - return 0 -} - -func branchNodeSize(key []byte) int { - // TODO: Return even(sizeof(node) + len(key)) - return 0 -} |