Documentation
¶
Overview ¶
Package view contains general page view constants and functions.
PageView is the super-struct for all page views. A page view is special object attached to a particular StorageFile record. A view provides specialised functions for the record it is attached to.
Use GetPageView() if the record has already view information stored on it or NewPageView() to initialise or reassign a given record.
Index ¶
Constants ¶
const OffsetData = OffsetPrevPage + file.SizeLong
OffsetData is the offset for page specific data
const OffsetNextPage = file.SizeShort
OffsetNextPage is the offset for next page id
const OffsetPrevPage = OffsetNextPage + file.SizeLong
OffsetPrevPage is the offset for previous page id
const TypeDataPage = 1
TypeDataPage is a page which is in use and contains data
const TypeFreeLogicalSlotPage = 3
TypeFreeLogicalSlotPage is a page which holds free logical slot ids (used to give stable ids to objects which can grow in size)
const TypeFreePage = 0
TypeFreePage is a free page waiting to be (re)allocated
const TypeFreePhysicalSlotPage = 4
TypeFreePhysicalSlotPage is a page which holds free physical slot ids
const TypeTranslationPage = 2
TypeTranslationPage is a page which translates between physical and logical row ids
const ViewPageHeader = 0x1990
ViewPageHeader is the header magic number to identify view pages
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PageView ¶
PageView data structure
func GetPageView ¶
GetPageView returns the page view of a given record.
func NewPageView ¶
NewPageView creates a new page view for a given record.
func (*PageView) SetNextPage ¶
SetNextPage sets the id of the next page.
func (*PageView) SetPrevPage ¶
SetPrevPage sets the id of the previous page.