Documentation ¶
Index ¶
Constants ¶
View Source
const ( PageSize = 4096 MaxPages = 1024 )
Variables ¶
View Source
var ( CommonHeaderSize = leaf.CommonHeader.Size() InternalNodeHeaderSize = CommonHeaderSize + internalNode.Header.Size() InternalNodeSize = internalNode.Size() InternalNodeCellSize = internalNode.ICells[0].Size() InternalNodeMaxCells = uint32(len(internalNode.ICells)) LeafNodeHeaderSize = CommonHeaderSize + leaf.Header.Size() LeafNodeSize = leaf.Size() LeafNodeCellSize = leaf.Cells[0].Size() LeafNodeMaxCells = uint32(len(leaf.Cells)) RightSplitCount = (LeafNodeMaxCells + 1) / 2 LeftSplitCount = LeafNodeMaxCells + 1 - RightSplitCount )
View Source
var (
RowSize = (&Row{}).Size()
)
Functions ¶
Types ¶
type InternalNode ¶
type InternalNode struct { CommonHeader Header Header InternalNodeHeader ICells [510]ICell }
func (*InternalNode) Child ¶
func (d *InternalNode) Child(childIdx uint32) (ptr *uint32)
func (*InternalNode) FindChildByKey ¶
func (d *InternalNode) FindChildByKey(key uint32) uint32
FindChildByKey returns the index of the child which should contain
the given key.
func (*InternalNode) Size ¶
func (d *InternalNode) Size() (s uint64)
type InternalNodeHeader ¶
func (*InternalNodeHeader) Marshal ¶
func (d *InternalNodeHeader) Marshal(buf []byte) ([]byte, error)
func (*InternalNodeHeader) Size ¶
func (d *InternalNodeHeader) Size() (s uint64)
type LeafNode ¶
type LeafNode struct { CommonHeader Header Header LeafNodeHeader Cells [17]Cell }
type LeafNodeHeader ¶
func (*LeafNodeHeader) Size ¶
func (d *LeafNodeHeader) Size() (s uint64)
Click to show internal directories.
Click to hide internal directories.