Documentation
¶
Index ¶
- type Index
- type IndexMetadata
- type IndexRangeScanIterator
- type LinearProbeHashTableIndex
- func (htidx *LinearProbeHashTableIndex) DeleteEntry(key *tuple.Tuple, rid page.RID, transaction interface{})
- func (htidx *LinearProbeHashTableIndex) GetHeaderPageId() types.PageID
- func (htidx *LinearProbeHashTableIndex) GetIndexColumnCount() uint32
- func (htidx *LinearProbeHashTableIndex) GetKeyAttrs() []uint32
- func (htidx *LinearProbeHashTableIndex) GetMetadata() *IndexMetadata
- func (htidx *LinearProbeHashTableIndex) GetName() *string
- func (htidx *LinearProbeHashTableIndex) GetRangeScanIterator(startkey *tuple.Tuple, endKey *tuple.Tuple, txn interface{}) IndexRangeScanIterator
- func (htidx *LinearProbeHashTableIndex) GetTupleSchema() *schema.Schema
- func (htidx *LinearProbeHashTableIndex) InsertEntry(key *tuple.Tuple, rid page.RID, transaction interface{})
- func (htidx *LinearProbeHashTableIndex) ScanKey(key *tuple.Tuple, transaction interface{}) []page.RID
- func (htidx *LinearProbeHashTableIndex) UpdateEntry(oldKey *tuple.Tuple, oldRID page.RID, newKey *tuple.Tuple, newRID page.RID, ...)
- type SkipListIndex
- func (slidx *SkipListIndex) DeleteEntry(key *tuple.Tuple, rid page.RID, txn interface{})
- func (slidx *SkipListIndex) GetHeaderPageId() types.PageID
- func (slidx *SkipListIndex) GetIndexColumnCount() uint32
- func (slidx *SkipListIndex) GetKeyAttrs() []uint32
- func (slidx *SkipListIndex) GetMetadata() *IndexMetadata
- func (slidx *SkipListIndex) GetName() *string
- func (slidx *SkipListIndex) GetRangeScanIterator(start_key *tuple.Tuple, end_key *tuple.Tuple, transaction interface{}) IndexRangeScanIterator
- func (slidx *SkipListIndex) GetTupleSchema() *schema.Schema
- func (slidx *SkipListIndex) InsertEntry(key *tuple.Tuple, rid page.RID, txn interface{})
- func (slidx *SkipListIndex) ScanKey(key *tuple.Tuple, txn interface{}) []page.RID
- func (slidx *SkipListIndex) UpdateEntry(oldKey *tuple.Tuple, oldRID page.RID, newKey *tuple.Tuple, newRID page.RID, ...)
- type UniqSkipListIndex
- func (slidx *UniqSkipListIndex) DeleteEntry(key *tuple.Tuple, rid page.RID, transaction interface{})
- func (slidx *UniqSkipListIndex) GetHeaderPageId() types.PageID
- func (slidx *UniqSkipListIndex) GetIndexColumnCount() uint32
- func (slidx *UniqSkipListIndex) GetKeyAttrs() []uint32
- func (slidx *UniqSkipListIndex) GetMetadata() *IndexMetadata
- func (slidx *UniqSkipListIndex) GetName() *string
- func (slidx *UniqSkipListIndex) GetRangeScanIterator(start_key *tuple.Tuple, end_key *tuple.Tuple, transaction interface{}) IndexRangeScanIterator
- func (slidx *UniqSkipListIndex) GetTupleSchema() *schema.Schema
- func (slidx *UniqSkipListIndex) InsertEntry(key *tuple.Tuple, rid page.RID, transaction interface{})
- func (slidx *UniqSkipListIndex) ScanKey(key *tuple.Tuple, transaction interface{}) []page.RID
- func (slidx *UniqSkipListIndex) UpdateEntry(oldKey *tuple.Tuple, oldRID page.RID, newKey *tuple.Tuple, newRID page.RID, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Index ¶
type Index interface { // Return the metadata object associated with the index GetMetadata() *IndexMetadata GetIndexColumnCount() uint32 GetName() *string GetTupleSchema() *schema.Schema GetKeyAttrs() []uint32 /////////////////////////////////////////////////////////////////// // Point Modification /////////////////////////////////////////////////////////////////// // designed for secondary indexes. InsertEntry(*tuple.Tuple, page.RID, interface{}) // delete the index entry linked to given tuple DeleteEntry(*tuple.Tuple, page.RID, interface{}) // update entry. internally, delete first entry and insert seconde entry atomically UpdateEntry(*tuple.Tuple, page.RID, *tuple.Tuple, page.RID, interface{}) ScanKey(*tuple.Tuple, interface{}) []page.RID // pass start key and end key. nil is also ok. GetRangeScanIterator(*tuple.Tuple, *tuple.Tuple, interface{}) IndexRangeScanIterator }
type IndexMetadata ¶
type IndexMetadata struct {
// contains filtered or unexported fields
}
func NewIndexMetadata ¶
func (*IndexMetadata) GetIndexColumnCount ¶
func (im *IndexMetadata) GetIndexColumnCount() uint32
Return the number of columns inside index key (not in tuple key) Note that this must be defined inside the cpp source file because it uses the member of catalog::Schema which is not known here
func (*IndexMetadata) GetKeyAttrs ¶
func (im *IndexMetadata) GetKeyAttrs() []uint32
Returns the mapping relation between indexed columns and base table columns
func (*IndexMetadata) GetName ¶
func (im *IndexMetadata) GetName() *string
func (*IndexMetadata) GetTableName ¶
func (im *IndexMetadata) GetTableName() *string
func (*IndexMetadata) GetTupleSchema ¶
func (im *IndexMetadata) GetTupleSchema() *schema.Schema
Returns a schema object pointer that represents the indexed key
type IndexRangeScanIterator ¶ added in v0.0.2
type LinearProbeHashTableIndex ¶
type LinearProbeHashTableIndex struct {
// contains filtered or unexported fields
}
func NewLinearProbeHashTableIndex ¶
func NewLinearProbeHashTableIndex(metadata *IndexMetadata, buffer_pool_manager *buffer.BufferPoolManager, col_idx uint32, num_buckets int, headerPageId types.PageID) *LinearProbeHashTableIndex
func (*LinearProbeHashTableIndex) DeleteEntry ¶
func (htidx *LinearProbeHashTableIndex) DeleteEntry(key *tuple.Tuple, rid page.RID, transaction interface{})
func (*LinearProbeHashTableIndex) GetHeaderPageId ¶ added in v0.0.2
func (htidx *LinearProbeHashTableIndex) GetHeaderPageId() types.PageID
func (*LinearProbeHashTableIndex) GetIndexColumnCount ¶
func (htidx *LinearProbeHashTableIndex) GetIndexColumnCount() uint32
func (*LinearProbeHashTableIndex) GetKeyAttrs ¶
func (htidx *LinearProbeHashTableIndex) GetKeyAttrs() []uint32
func (*LinearProbeHashTableIndex) GetMetadata ¶
func (htidx *LinearProbeHashTableIndex) GetMetadata() *IndexMetadata
Return the metadata object associated with the index
func (*LinearProbeHashTableIndex) GetName ¶
func (htidx *LinearProbeHashTableIndex) GetName() *string
func (*LinearProbeHashTableIndex) GetRangeScanIterator ¶ added in v0.0.2
func (htidx *LinearProbeHashTableIndex) GetRangeScanIterator(startkey *tuple.Tuple, endKey *tuple.Tuple, txn interface{}) IndexRangeScanIterator
func (*LinearProbeHashTableIndex) GetTupleSchema ¶
func (htidx *LinearProbeHashTableIndex) GetTupleSchema() *schema.Schema
func (*LinearProbeHashTableIndex) InsertEntry ¶
func (htidx *LinearProbeHashTableIndex) InsertEntry(key *tuple.Tuple, rid page.RID, transaction interface{})
type SkipListIndex ¶ added in v0.0.2
type SkipListIndex struct {
// contains filtered or unexported fields
}
func NewSkipListIndex ¶ added in v0.0.2
func NewSkipListIndex(metadata *IndexMetadata, buffer_pool_manager *buffer.BufferPoolManager, col_idx uint32) *SkipListIndex
func (*SkipListIndex) DeleteEntry ¶ added in v0.0.2
func (slidx *SkipListIndex) DeleteEntry(key *tuple.Tuple, rid page.RID, txn interface{})
func (*SkipListIndex) GetHeaderPageId ¶ added in v0.0.2
func (slidx *SkipListIndex) GetHeaderPageId() types.PageID
func (*SkipListIndex) GetIndexColumnCount ¶ added in v0.0.2
func (slidx *SkipListIndex) GetIndexColumnCount() uint32
func (*SkipListIndex) GetKeyAttrs ¶ added in v0.0.2
func (slidx *SkipListIndex) GetKeyAttrs() []uint32
func (*SkipListIndex) GetMetadata ¶ added in v0.0.2
func (slidx *SkipListIndex) GetMetadata() *IndexMetadata
Return the metadata object associated with the index
func (*SkipListIndex) GetName ¶ added in v0.0.2
func (slidx *SkipListIndex) GetName() *string
func (*SkipListIndex) GetRangeScanIterator ¶ added in v0.0.2
func (slidx *SkipListIndex) GetRangeScanIterator(start_key *tuple.Tuple, end_key *tuple.Tuple, transaction interface{}) IndexRangeScanIterator
get iterator which iterates entry in key sorted order and iterates specified key range. when start_key arg is nil , start point is head of entry list. when end_key, end point is tail of the list Attention: returned itr's containing keys are string type Value which is constructed with byte arr of concatenated original key and value
func (*SkipListIndex) GetTupleSchema ¶ added in v0.0.2
func (slidx *SkipListIndex) GetTupleSchema() *schema.Schema
func (*SkipListIndex) InsertEntry ¶ added in v0.0.2
func (slidx *SkipListIndex) InsertEntry(key *tuple.Tuple, rid page.RID, txn interface{})
type UniqSkipListIndex ¶ added in v0.0.4
type UniqSkipListIndex struct {
// contains filtered or unexported fields
}
func NewUniqSkipListIndex ¶ added in v0.0.4
func NewUniqSkipListIndex(metadata *IndexMetadata, buffer_pool_manager *buffer.BufferPoolManager, col_idx uint32) *UniqSkipListIndex
func (*UniqSkipListIndex) DeleteEntry ¶ added in v0.0.4
func (slidx *UniqSkipListIndex) DeleteEntry(key *tuple.Tuple, rid page.RID, transaction interface{})
func (*UniqSkipListIndex) GetHeaderPageId ¶ added in v0.0.4
func (slidx *UniqSkipListIndex) GetHeaderPageId() types.PageID
func (*UniqSkipListIndex) GetIndexColumnCount ¶ added in v0.0.4
func (slidx *UniqSkipListIndex) GetIndexColumnCount() uint32
func (*UniqSkipListIndex) GetKeyAttrs ¶ added in v0.0.4
func (slidx *UniqSkipListIndex) GetKeyAttrs() []uint32
func (*UniqSkipListIndex) GetMetadata ¶ added in v0.0.4
func (slidx *UniqSkipListIndex) GetMetadata() *IndexMetadata
Return the metadata object associated with the index
func (*UniqSkipListIndex) GetName ¶ added in v0.0.4
func (slidx *UniqSkipListIndex) GetName() *string
func (*UniqSkipListIndex) GetRangeScanIterator ¶ added in v0.0.4
func (slidx *UniqSkipListIndex) GetRangeScanIterator(start_key *tuple.Tuple, end_key *tuple.Tuple, transaction interface{}) IndexRangeScanIterator
get iterator which iterates entry in key sorted order and iterates specified key range. when start_key arg is nil , start point is head of entry list. when end_key, end point is tail of the list
func (*UniqSkipListIndex) GetTupleSchema ¶ added in v0.0.4
func (slidx *UniqSkipListIndex) GetTupleSchema() *schema.Schema
func (*UniqSkipListIndex) InsertEntry ¶ added in v0.0.4
func (slidx *UniqSkipListIndex) InsertEntry(key *tuple.Tuple, rid page.RID, transaction interface{})