Documentation ¶
Index ¶
- Constants
- type Page
- type PageImpl
- func (p *PageImpl) GetData() []byte
- func (p *PageImpl) GetPageId() uint32
- func (p *PageImpl) Init()
- func (p *PageImpl) IsDirty() bool
- func (p *PageImpl) ResetMemory() error
- func (p *PageImpl) SetData(d []byte) error
- func (p *PageImpl) SetDirtyBit(val bool)
- func (p *PageImpl) SetPageId(page_id uint32)
- type SchemaPage
- func (sp *SchemaPage) GetFreeSpacePointer() uint16
- func (sp *SchemaPage) GetHeader() []byte
- func (sp *SchemaPage) GetNumberOfTuples() uint16
- func (sp *SchemaPage) GetSlotStart(i uint16) uint16
- func (sp *SchemaPage) Init()
- func (sp *SchemaPage) InsertTuple(tp Tuple) error
- func (sp *SchemaPage) ReadTuple(i uint16) []byte
- func (sp *SchemaPage) SetFreeSpacePointer(fsp uint16) error
- func (sp *SchemaPage) UpdateNumberOfTuples(fsp uint16) error
- type Tuple
- type TupleImpl
- func (st *TupleImpl) GetData() []byte
- func (st *TupleImpl) GetSize() uint64
- func (st *TupleImpl) GetValueFor(column_i uint64) interface{}
- func (st *TupleImpl) Init(s_ []string)
- func (st *TupleImpl) PrintTuple()
- func (st *TupleImpl) ReadTuple(data_ []byte)
- func (st *TupleImpl) SetValueFor(column_i uint64, val interface{})
Constants ¶
View Source
const COLUMN_NAME_LIMT = 2048
View Source
const INVALID_PAGE_ID = 4294967295
View Source
const PAGE_SIZE = 4096
View Source
const SLOT_ID_SIZE = 4
View Source
const SLOT_OFFSET = 24
View Source
const SLOT_SIZE = 6
View Source
const TABLE_NAME_LIMT = 2048
View Source
const TUPLE_LOCATION_SIZE = 2
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Page ¶
type Page interface { Init() GetData() []byte GetPageId() uint32 SetData([]byte) error SetPageId(page_id uint32) IsDirty() bool SetDirtyBit(val bool) }
func InvalidPage ¶
func InvalidPage() Page
type PageImpl ¶
type PageImpl struct {
// contains filtered or unexported fields
}
func (*PageImpl) ResetMemory ¶
func (*PageImpl) SetDirtyBit ¶
type SchemaPage ¶
type SchemaPage struct {
PageImpl
}
func (*SchemaPage) GetFreeSpacePointer ¶
func (sp *SchemaPage) GetFreeSpacePointer() uint16
right now giving it only 2 bytes we have space for more but with 2 byte it means we can only have a page with maxsize 2^16 -> 65535
func (*SchemaPage) GetHeader ¶
func (sp *SchemaPage) GetHeader() []byte
func (*SchemaPage) GetNumberOfTuples ¶
func (sp *SchemaPage) GetNumberOfTuples() uint16
func (*SchemaPage) GetSlotStart ¶
func (sp *SchemaPage) GetSlotStart(i uint16) uint16
func (*SchemaPage) Init ¶
func (sp *SchemaPage) Init()
func (*SchemaPage) InsertTuple ¶
func (sp *SchemaPage) InsertTuple(tp Tuple) error
func (*SchemaPage) ReadTuple ¶
func (sp *SchemaPage) ReadTuple(i uint16) []byte
func (*SchemaPage) SetFreeSpacePointer ¶
func (sp *SchemaPage) SetFreeSpacePointer(fsp uint16) error
probably should be private
func (*SchemaPage) UpdateNumberOfTuples ¶
func (sp *SchemaPage) UpdateNumberOfTuples(fsp uint16) error
type TupleImpl ¶
type TupleImpl struct {
// contains filtered or unexported fields
}
func (*TupleImpl) GetValueFor ¶
func (*TupleImpl) PrintTuple ¶
func (st *TupleImpl) PrintTuple()
func (*TupleImpl) SetValueFor ¶
Click to show internal directories.
Click to hide internal directories.