Skip to content

Commit

Permalink
feat: wire page -> btree (#373)
Browse files Browse the repository at this point in the history
  • Loading branch information
friendlymatthew authored Jul 19, 2024
1 parent 0273088 commit 29b1521
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/linkedpage/linkedpage.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"encoding/binary"
"errors"
"fmt"
"github.com/kevmo314/appendable/pkg/btree"
"io"

"github.com/kevmo314/appendable/pkg/bptree"
Expand Down Expand Up @@ -112,6 +113,12 @@ func (m *LinkedPage) BPTree(t *bptree.BPTree) *bptree.BPTree {
return t
}

func (m *LinkedPage) BTree(t *btree.BTree) *btree.BTree {
t.PageFile = m.rws
t.MetaPage = m
return t
}

func (m *LinkedPage) Metadata() ([]byte, error) {
if m.index == ^uint8(0) {
return nil, errNotAPage
Expand Down

0 comments on commit 29b1521

Please sign in to comment.