Documentation
¶
Index ¶
- Variables
- func BTreeSearchCost(numBlocks, rpb int) int
- func HashSearchCost(numBlocks, rpb int) int
- func NewIndexLayout(field schema.Field) *record.Layout
- type BTreeDir
- func (btd *BTreeDir) Close() error
- func (btd *BTreeDir) Dump(leafLayout *record.Layout, leafTableName string) (*BTreeDirDump, error)
- func (btd *BTreeDir) Insert(e DirEntry) (*DirEntry, error)
- func (btd *BTreeDir) InsertEntry(e DirEntry) (*DirEntry, error)
- func (btd *BTreeDir) MakeNewRoot(e DirEntry) error
- func (btd *BTreeDir) Search(searchKey schema.Constant) (int32, error)
- type BTreeDirDump
- type BTreeIndex
- func (bti *BTreeIndex) BeforeFirst(searchKey schema.Constant) error
- func (bti *BTreeIndex) Close() error
- func (bti *BTreeIndex) DataRID() (schema.RID, error)
- func (bti *BTreeIndex) Delete(dataVal schema.Constant, dataRID schema.RID) error
- func (bti *BTreeIndex) Dump() (*BTreeDirDump, error)
- func (bti *BTreeIndex) Insert(dataVal schema.Constant, dataRID schema.RID) error
- func (bti *BTreeIndex) Next() (bool, error)
- type BTreeLeaf
- type BTreePage
- func (btp *BTreePage) AppendNew(flag int32) error
- func (btp *BTreePage) ChildNum(slot int32) (int32, error)
- func (btp *BTreePage) Close() error
- func (btp *BTreePage) DataRID(slot int32) (schema.RID, error)
- func (btp *BTreePage) Delete(slot int32) error
- func (btp *BTreePage) FindSlotBefore(searchKey schema.Constant) (int32, error)
- func (btp *BTreePage) Format(blockId file.BlockID, flag int32) error
- func (btp *BTreePage) InsertDir(slot int32, val schema.Constant, blockNum int32) error
- func (btp *BTreePage) InsertLeaf(slot int32, val schema.Constant, rid schema.RID) error
- func (btp *BTreePage) IsFull() (bool, error)
- func (btp *BTreePage) Split(splitPos int32, flag int32) (file.BlockID, error)
- type Config
- type DirEntry
- type HashIndex
- func (h *HashIndex) BeforeFirst(searchKey schema.Constant) error
- func (h *HashIndex) Close() error
- func (h *HashIndex) DataRID() (schema.RID, error)
- func (h *HashIndex) Delete(dataVal schema.Constant, dataRID schema.RID) error
- func (h *HashIndex) Insert(dataVal schema.Constant, dataRID schema.RID) error
- func (h *HashIndex) Next() (bool, error)
- type Index
- type Initializer
- type JoinScan
- func (j JoinScan) BeforeFirst() error
- func (j JoinScan) Close() error
- func (j JoinScan) HasField(fieldName schema.FieldName) bool
- func (j JoinScan) Int32(fieldName schema.FieldName) (int32, error)
- func (j JoinScan) Next() (bool, error)
- func (j JoinScan) Str(fieldName schema.FieldName) (string, error)
- func (j JoinScan) Val(fieldName schema.FieldName) (schema.Constant, error)
- type SearchCost
- type SelectScan
- func (s SelectScan) BeforeFirst() error
- func (s SelectScan) Close() error
- func (s SelectScan) HasField(fieldName schema.FieldName) bool
- func (s SelectScan) Int32(fieldName schema.FieldName) (int32, error)
- func (s SelectScan) Next() (bool, error)
- func (s SelectScan) Str(fieldName schema.FieldName) (string, error)
- func (s SelectScan) Val(fieldName schema.FieldName) (schema.Constant, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ConfigHash = &Config{ Initializer: NewHashIndex, SearchCost: HashSearchCost, } ConfigBTree = &Config{ Initializer: NewBTreeIndex, SearchCost: BTreeSearchCost, } )
Functions ¶
func BTreeSearchCost ¶
func HashSearchCost ¶
Types ¶
type BTreeDir ¶
type BTreeDir struct {
// contains filtered or unexported fields
}
func NewBTreeDir ¶
func NewBTreeDir(tx *transaction.Transaction, blockID file.BlockID, layout *record.Layout) (*BTreeDir, error)
func (*BTreeDir) MakeNewRoot ¶
type BTreeDirDump ¶
type BTreeDirDump struct { Level int32 Keys []string Vals []string Children []BTreeDirDump }
func (BTreeDirDump) String ¶
func (d BTreeDirDump) String() string
type BTreeIndex ¶
type BTreeIndex struct {
// contains filtered or unexported fields
}
func (*BTreeIndex) BeforeFirst ¶
func (bti *BTreeIndex) BeforeFirst(searchKey schema.Constant) error
func (*BTreeIndex) Close ¶
func (bti *BTreeIndex) Close() error
func (*BTreeIndex) Dump ¶
func (bti *BTreeIndex) Dump() (*BTreeDirDump, error)
func (*BTreeIndex) Next ¶
func (bti *BTreeIndex) Next() (bool, error)
type BTreeLeaf ¶
type BTreeLeaf struct {
// contains filtered or unexported fields
}
func NewBTreeLeaf ¶
func NewBTreeLeaf(tx *transaction.Transaction, blockID file.BlockID, layout *record.Layout, searchKey schema.Constant) (*BTreeLeaf, error)
type BTreePage ¶
type BTreePage struct {
// contains filtered or unexported fields
}
func NewBTreePage ¶
func NewBTreePage(tx *transaction.Transaction, currentBlockID file.BlockID, layout *record.Layout) (*BTreePage, error)
func (*BTreePage) FindSlotBefore ¶
func (*BTreePage) InsertLeaf ¶
type Config ¶
type Config struct { Initializer Initializer SearchCost SearchCost }
type HashIndex ¶
type HashIndex struct {
// contains filtered or unexported fields
}
type Index ¶
type Index interface { BeforeFirst(searchKey schema.Constant) error Next() (bool, error) DataRID() (schema.RID, error) Insert(dataVal schema.Constant, dataRID schema.RID) error Delete(dataVal schema.Constant, dataRID schema.RID) error Close() error }
func NewBTreeIndex ¶
func NewBTreeIndex(tx *transaction.Transaction, idxName string, leafLayout *record.Layout) (Index, error)
func NewHashIndex ¶
func NewHashIndex(tx *transaction.Transaction, idxName string, layout *record.Layout) (Index, error)
type Initializer ¶
type Initializer = func(tx *transaction.Transaction, idxName string, layout *record.Layout) (Index, error)
type JoinScan ¶
type JoinScan struct {
// contains filtered or unexported fields
}
func NewJoinScan ¶
func (JoinScan) BeforeFirst ¶
type SearchCost ¶
type SelectScan ¶
type SelectScan struct {
// contains filtered or unexported fields
}
func NewSelectScan ¶
func (SelectScan) BeforeFirst ¶
func (s SelectScan) BeforeFirst() error
func (SelectScan) Close ¶
func (s SelectScan) Close() error
func (SelectScan) Next ¶
func (s SelectScan) Next() (bool, error)
Click to show internal directories.
Click to hide internal directories.