Documentation ¶
Index ¶
- Constants
- Variables
- func ActiveWithNoTxnFilter(be *MetaBaseEntry) bool
- func AppendableBlkFilter(be *BlockEntry) bool
- func CmdName(t int16) string
- func CompareDBBaseNode(e, o txnif.MVCCNode) int
- func CompareMetaBaseNode(e, o txnif.MVCCNode) int
- func CompareTableBaseNode(e, o txnif.MVCCNode) int
- func CompareUint64(left, right uint64) int
- func GetAttrIdx(attrs []string, name string) int
- func MarshalDefault(w *bytes.Buffer, data Default) (err error)
- func MarshalOnUpdate(w *bytes.Buffer, data OnUpdate) (err error)
- func MockBatch(schema *Schema, rows int) *containers.Batch
- func MockTxnFactory(catalog *Catalog) txnbase.TxnFactory
- func MockTxnStoreFactory(catalog *Catalog) txnbase.TxnStoreFactory
- func NewEmptyDBMVCCNode() txnif.MVCCNode
- func NewEmptyMetadataMVCCNode() txnif.MVCCNode
- func NewEmptyTableMVCCNode() txnif.MVCCNode
- func NonAppendableBlkFilter(be *BlockEntry) bool
- func UnMarshalDefault(r io.Reader, data *Default) (n int64, err error)
- func UnMarshalOnUpdate(r io.Reader, data *OnUpdate) (n int64, err error)
- type BaseEntry
- type BlockDataFactory
- type BlockEntry
- func (entry *BlockEntry) AsCommonID() *common.ID
- func (entry *BlockEntry) DestroyData() (err error)
- func (entry *BlockEntry) GetBlockData() data.Block
- func (entry *BlockEntry) GetCatalog() *Catalog
- func (entry *BlockEntry) GetSchema() *Schema
- func (entry *BlockEntry) GetSegment() *SegmentEntry
- func (entry *BlockEntry) GetTerminationTS() (ts types.TS, terminated bool)
- func (entry *BlockEntry) InitData(factory DataFactory)
- func (entry *BlockEntry) Is1PC() bool
- func (entry *BlockEntry) IsActive() bool
- func (entry *BlockEntry) IsAppendable() bool
- func (entry *BlockEntry) MakeCommand(id uint32) (cmd txnif.TxnCmd, err error)
- func (entry *BlockEntry) MakeKey() []byte
- func (entry *BlockEntry) PPString(level common.PPLevel, depth int, prefix string) string
- func (entry *BlockEntry) PrepareCompact() bool
- func (entry *BlockEntry) PrepareRollback() (err error)
- func (entry *BlockEntry) ReadFrom(r io.Reader) (n int64, err error)
- func (entry *BlockEntry) Repr() string
- func (entry *BlockEntry) Set1PC()
- func (entry *BlockEntry) String() string
- func (entry *BlockEntry) StringLocked() string
- func (entry *BlockEntry) StringWithLevel(level common.PPLevel) string
- func (entry *BlockEntry) StringWithLevelLocked(level common.PPLevel) string
- func (entry *BlockEntry) WriteTo(w io.Writer) (n int64, err error)
- type Catalog
- func (catalog *Catalog) AddColumnCnt(cnt int)
- func (catalog *Catalog) AddEntryLocked(database *DBEntry, txn txnif.TxnReader, skipDedup bool) error
- func (catalog *Catalog) AddTableCnt(cnt int)
- func (catalog *Catalog) Close() error
- func (catalog *Catalog) CoarseColumnCnt() int
- func (catalog *Catalog) CoarseDBCnt() int
- func (catalog *Catalog) CoarseTableCnt() int
- func (catalog *Catalog) CreateDBEntry(name, createSql string, txn txnif.AsyncTxn) (*DBEntry, error)
- func (catalog *Catalog) CreateDBEntryByTS(name string, ts types.TS) (*DBEntry, error)
- func (catalog *Catalog) CreateDBEntryWithID(name, createSql string, id uint64, txn txnif.AsyncTxn) (*DBEntry, error)
- func (catalog *Catalog) DropDBEntry(name string, txn txnif.AsyncTxn) (newEntry bool, deleted *DBEntry, err error)
- func (catalog *Catalog) DropDBEntryByID(id uint64, txn txnif.AsyncTxn) (newEntry bool, deleted *DBEntry, err error)
- func (catalog *Catalog) GetDBEntryByName(tenantID uint32, name string, ts types.TS) (db *DBEntry, err error)
- func (catalog *Catalog) GetDatabaseByID(id uint64) (db *DBEntry, err error)
- func (catalog *Catalog) GetItemNodeByIDLocked(id uint64) *common.GenericDLNode[*DBEntry]
- func (catalog *Catalog) GetScheduler() tasks.TaskScheduler
- func (catalog *Catalog) InitSystemDB()
- func (catalog *Catalog) MakeDBIt(reverse bool) *common.GenericSortedDListIt[*DBEntry]
- func (catalog *Catalog) OnReplayBlockBatch(ins, insTxn, del, delTxn *containers.Batch, dataFactory DataFactory)
- func (catalog *Catalog) OnReplayDatabaseBatch(ins, insTxn, del, delTxn *containers.Batch)
- func (catalog *Catalog) OnReplaySegmentBatch(ins, insTxn, del, delTxn *containers.Batch, dataFactory DataFactory)
- func (catalog *Catalog) OnReplayTableBatch(ins, insTxn, insCol, del, delTxn *containers.Batch, dataFactory DataFactory)
- func (catalog *Catalog) PPString(level common.PPLevel, depth int, prefix string) string
- func (catalog *Catalog) RecurLoop(processor Processor) (err error)
- func (catalog *Catalog) RemoveEntry(database *DBEntry) error
- func (catalog *Catalog) ReplayCmd(txncmd txnif.TxnCmd, dataFactory DataFactory, idxCtx *wal.Index, ...)
- func (catalog *Catalog) ReplayTableRows()
- func (catalog *Catalog) SimplePPString(level common.PPLevel) string
- func (catalog *Catalog) TxnGetDBEntryByID(id uint64, txn txnif.AsyncTxn) (*DBEntry, error)
- func (catalog *Catalog) TxnGetDBEntryByName(name string, txn txnif.AsyncTxn) (*DBEntry, error)
- type ColDef
- type ComposedFilter
- type ComputeIndexInfo
- type DBBaseEntry
- func (be *DBBaseEntry) CloneCommittedInRange(start, end types.TS) BaseEntry
- func (be *DBBaseEntry) CreateWithTS(ts types.TS)
- func (be *DBBaseEntry) CreateWithTxn(txn txnif.AsyncTxn)
- func (be *DBBaseEntry) DeleteAfter(ts types.TS) bool
- func (be *DBBaseEntry) DeleteBefore(ts types.TS) bool
- func (be *DBBaseEntry) DeleteLocked(txn txnif.TxnReader) (isNewNode bool, err error)
- func (be *DBBaseEntry) DoCompre(voe BaseEntry) int
- func (be *DBBaseEntry) DropEntryLocked(txn txnif.TxnReader) (isNewNode bool, err error)
- func (be *DBBaseEntry) GetCreatedAt() types.TS
- func (be *DBBaseEntry) GetDeleteAt() types.TS
- func (be *DBBaseEntry) GetID() uint64
- func (be *DBBaseEntry) GetVisibility(ts types.TS) (visible, dropped bool)
- func (be *DBBaseEntry) GetVisibilityLocked(ts types.TS) (visible, dropped bool)
- func (be *DBBaseEntry) HasDropCommitted() bool
- func (be *DBBaseEntry) HasDropCommittedLocked() bool
- func (be *DBBaseEntry) IsVisible(ts types.TS, mu *sync.RWMutex) (ok bool, err error)
- func (be *DBBaseEntry) NeedWaitCommitting(startTS types.TS) (bool, txnif.TxnReader)
- func (be *DBBaseEntry) PPString(level common.PPLevel, depth int, prefix string) string
- func (be *DBBaseEntry) PrepareAdd(txn txnif.TxnReader) (err error)
- func (be *DBBaseEntry) ReadAllFrom(r io.Reader) (n int64, err error)
- func (be *DBBaseEntry) ReadOneNodeFrom(r io.Reader) (n int64, err error)
- func (be *DBBaseEntry) String() string
- func (be *DBBaseEntry) StringLocked() string
- func (be *DBBaseEntry) TryGetTerminatedTS(waitIfcommitting bool) (terminated bool, TS types.TS)
- func (be *DBBaseEntry) WriteAllTo(w io.Writer) (n int64, err error)
- func (be *DBBaseEntry) WriteOneNodeTo(w io.Writer) (n int64, err error)
- type DBEntry
- func NewDBEntry(catalog *Catalog, name, createSql string, txn txnif.AsyncTxn) *DBEntry
- func NewDBEntryByTS(catalog *Catalog, name string, ts types.TS) *DBEntry
- func NewDBEntryWithID(catalog *Catalog, name string, createSql string, id uint64, txn txnif.AsyncTxn) *DBEntry
- func NewReplayDBEntry() *DBEntry
- func NewSystemDBEntry(catalog *Catalog) *DBEntry
- func (e *DBEntry) AddEntryLocked(table *TableEntry, txn txnif.TxnReader, skipDedup bool) (err error)
- func (e *DBEntry) CoarseTableCnt() int
- func (e *DBEntry) CreateTableEntry(schema *Schema, txn txnif.AsyncTxn, dataFactory TableDataFactory) (created *TableEntry, err error)
- func (e *DBEntry) CreateTableEntryWithTableId(schema *Schema, txn txnif.AsyncTxn, dataFactory TableDataFactory, ...) (created *TableEntry, err error)
- func (e *DBEntry) DropTableEntry(name string, txn txnif.AsyncTxn) (newEntry bool, deleted *TableEntry, err error)
- func (e *DBEntry) DropTableEntryByID(id uint64, txn txnif.AsyncTxn) (newEntry bool, deleted *TableEntry, err error)
- func (e *DBEntry) GetBlockEntryByID(id *common.ID) (blk *BlockEntry, err error)
- func (e *DBEntry) GetCatalog() *Catalog
- func (e *DBEntry) GetCreateAt() types.Timestamp
- func (e *DBEntry) GetCreateSql() string
- func (e *DBEntry) GetFullName() string
- func (e *DBEntry) GetItemNodeByIDLocked(id uint64) *common.GenericDLNode[*TableEntry]
- func (e *DBEntry) GetName() string
- func (e *DBEntry) GetRoleID() uint32
- func (e *DBEntry) GetTableEntryByID(id uint64) (table *TableEntry, err error)
- func (e *DBEntry) GetTableEntryByName(tenantID uint32, name string, ts types.TS) (entry *TableEntry, err error)
- func (e *DBEntry) GetTenantID() uint32
- func (e *DBEntry) GetUserID() uint32
- func (e *DBEntry) Is1PC() bool
- func (e *DBEntry) IsActive() bool
- func (e *DBEntry) IsSystemDB() bool
- func (e *DBEntry) MakeCommand(id uint32) (txnif.TxnCmd, error)
- func (e *DBEntry) MakeTableIt(reverse bool) *common.GenericSortedDListIt[*TableEntry]
- func (e *DBEntry) PPString(level common.PPLevel, depth int, prefix string) string
- func (e *DBEntry) PrepareRollback() (err error)
- func (e *DBEntry) ReadFrom(r io.Reader) (n int64, err error)
- func (e *DBEntry) RecurLoop(processor Processor) (err error)
- func (e *DBEntry) RemoveEntry(table *TableEntry) (err error)
- func (e *DBEntry) Set1PC()
- func (e *DBEntry) String() string
- func (e *DBEntry) StringLocked() string
- func (e *DBEntry) StringWithLevel(level common.PPLevel) string
- func (e *DBEntry) StringWithlevelLocked(level common.PPLevel) string
- func (e *DBEntry) TxnGetTableEntryByID(id uint64, txn txnif.AsyncTxn) (entry *TableEntry, err error)
- func (e *DBEntry) TxnGetTableEntryByName(name string, txn txnif.AsyncTxn) (entry *TableEntry, err error)
- func (e *DBEntry) WriteTo(w io.Writer) (n int64, err error)
- type DBMVCCNode
- func (e *DBMVCCNode) ApplyCommit(index *wal.Index) (err error)
- func (e *DBMVCCNode) ApplyRollback(index *wal.Index) (err error)
- func (e *DBMVCCNode) CloneAll() txnif.MVCCNode
- func (e *DBMVCCNode) CloneData() txnif.MVCCNode
- func (e *DBMVCCNode) PrepareCommit() (err error)
- func (e *DBMVCCNode) ReadFrom(r io.Reader) (n int64, err error)
- func (e *DBMVCCNode) String() string
- func (e *DBMVCCNode) Update(vun txnif.MVCCNode)
- func (e *DBMVCCNode) WriteTo(w io.Writer) (n int64, err error)
- type DataFactory
- type Default
- type EntryCommand
- func (cmd *EntryCommand) ApplyCommit()
- func (cmd *EntryCommand) ApplyRollback()
- func (cmd *EntryCommand) Desc() string
- func (cmd *EntryCommand) GetID() (uint64, *common.ID)
- func (cmd *EntryCommand) GetLogIndex() *wal.Index
- func (cmd *EntryCommand) GetTs() types.TS
- func (cmd *EntryCommand) GetType() int16
- func (cmd *EntryCommand) IDString() string
- func (cmd *EntryCommand) Marshal() (buf []byte, err error)
- func (cmd *EntryCommand) ReadFrom(r io.Reader) (n int64, err error)
- func (cmd *EntryCommand) SetReplayTxn(txn txnif.AsyncTxn)
- func (cmd *EntryCommand) String() string
- func (cmd *EntryCommand) Unmarshal(buf []byte) (err error)
- func (cmd *EntryCommand) VerboseString() string
- func (cmd *EntryCommand) WriteTo(w io.Writer) (n int64, err error)
- type EntryMVCCNode
- func (un *EntryMVCCNode) ApplyCommit(ts types.TS) (err error)
- func (un *EntryMVCCNode) Clone() *EntryMVCCNode
- func (un *EntryMVCCNode) CloneData() *EntryMVCCNode
- func (un *EntryMVCCNode) Delete()
- func (un *EntryMVCCNode) GetCreatedAt() types.TS
- func (un *EntryMVCCNode) GetDeletedAt() types.TS
- func (un *EntryMVCCNode) HasDropCommitted() bool
- func (un *EntryMVCCNode) HasDropIntent() bool
- func (un *EntryMVCCNode) IsCreating() bool
- func (un *EntryMVCCNode) PrepareCommit() (err error)
- func (un *EntryMVCCNode) ReadFrom(r io.Reader) (n int64, err error)
- func (un *EntryMVCCNode) String() string
- func (un *EntryMVCCNode) WriteTo(w io.Writer) (n int64, err error)
- type EntryState
- type IDAlloctor
- func (alloc *IDAlloctor) CurrBlock() uint64
- func (alloc *IDAlloctor) CurrDB() uint64
- func (alloc *IDAlloctor) CurrSegment() uint64
- func (alloc *IDAlloctor) CurrTable() uint64
- func (alloc *IDAlloctor) IDStates() string
- func (alloc *IDAlloctor) Init(prevDb, prevTbl, prevSeg, prevBlk uint64)
- func (alloc *IDAlloctor) NextBlock() uint64
- func (alloc *IDAlloctor) NextDB() uint64
- func (alloc *IDAlloctor) NextSegment() uint64
- func (alloc *IDAlloctor) NextTable() uint64
- func (alloc *IDAlloctor) OnReplayBlockID(id uint64)
- func (alloc *IDAlloctor) OnReplayDBID(id uint64)
- func (alloc *IDAlloctor) OnReplaySegmentID(id uint64)
- func (alloc *IDAlloctor) OnReplayTableID(id uint64)
- type IndexInfo
- type IndexT
- type LoopProcessor
- func (p *LoopProcessor) OnBlock(block *BlockEntry) error
- func (p *LoopProcessor) OnDatabase(database *DBEntry) error
- func (p *LoopProcessor) OnPostSegment(segment *SegmentEntry) error
- func (p *LoopProcessor) OnSegment(segment *SegmentEntry) error
- func (p *LoopProcessor) OnTable(table *TableEntry) error
- type MetaBaseEntry
- func (be *MetaBaseEntry) CloneCommittedInRange(start, end types.TS) BaseEntry
- func (be *MetaBaseEntry) CreateWithTS(ts types.TS)
- func (be *MetaBaseEntry) CreateWithTxn(txn txnif.AsyncTxn)
- func (be *MetaBaseEntry) DeleteAfter(ts types.TS) bool
- func (be *MetaBaseEntry) DeleteBefore(ts types.TS) bool
- func (be *MetaBaseEntry) DeleteLocked(txn txnif.TxnReader) (isNewNode bool, err error)
- func (be *MetaBaseEntry) DoCompre(voe BaseEntry) int
- func (be *MetaBaseEntry) DropEntryLocked(txn txnif.TxnReader) (isNewNode bool, err error)
- func (be *MetaBaseEntry) GetCreatedAt() types.TS
- func (be *MetaBaseEntry) GetDeleteAt() types.TS
- func (be *MetaBaseEntry) GetDeltaLoc() string
- func (be *MetaBaseEntry) GetID() uint64
- func (be *MetaBaseEntry) GetMetaLoc() string
- func (be *MetaBaseEntry) GetVisibility(ts types.TS) (visible, dropped bool)
- func (be *MetaBaseEntry) GetVisibilityLocked(ts types.TS) (visible, dropped bool)
- func (be *MetaBaseEntry) GetVisibleDeltaLoc(ts types.TS) string
- func (be *MetaBaseEntry) GetVisibleMetaLoc(ts types.TS) string
- func (be *MetaBaseEntry) HasDropCommitted() bool
- func (be *MetaBaseEntry) HasDropCommittedLocked() bool
- func (be *MetaBaseEntry) HasPersistedData() bool
- func (be *MetaBaseEntry) HasPersistedDeltaData() bool
- func (be *MetaBaseEntry) IsVisible(ts types.TS, mu *sync.RWMutex) (ok bool, err error)
- func (be *MetaBaseEntry) NeedWaitCommitting(startTS types.TS) (bool, txnif.TxnReader)
- func (be *MetaBaseEntry) PPString(level common.PPLevel, depth int, prefix string) string
- func (be *MetaBaseEntry) ReadAllFrom(r io.Reader) (n int64, err error)
- func (be *MetaBaseEntry) ReadOneNodeFrom(r io.Reader) (n int64, err error)
- func (be *MetaBaseEntry) String() string
- func (be *MetaBaseEntry) StringLocked() string
- func (be *MetaBaseEntry) TryGetTerminatedTS(waitIfcommitting bool) (terminated bool, TS types.TS)
- func (be *MetaBaseEntry) UpdateDeltaLoc(txn txnif.TxnReader, deltaloc string) (isNewNode bool, err error)
- func (be *MetaBaseEntry) UpdateMetaLoc(txn txnif.TxnReader, metaloc string) (isNewNode bool, err error)
- func (be *MetaBaseEntry) WriteAllTo(w io.Writer) (n int64, err error)
- func (be *MetaBaseEntry) WriteOneNodeTo(w io.Writer) (n int64, err error)
- type MetadataMVCCNode
- func (e *MetadataMVCCNode) ApplyCommit(index *wal.Index) (err error)
- func (e *MetadataMVCCNode) ApplyRollback(index *wal.Index) (err error)
- func (e *MetadataMVCCNode) CloneAll() txnif.MVCCNode
- func (e *MetadataMVCCNode) CloneData() txnif.MVCCNode
- func (e *MetadataMVCCNode) PrepareCommit() (err error)
- func (e *MetadataMVCCNode) PrepareRollback() (err error)
- func (e *MetadataMVCCNode) ReadFrom(r io.Reader) (n int64, err error)
- func (e *MetadataMVCCNode) String() string
- func (e *MetadataMVCCNode) Update(vun txnif.MVCCNode)
- func (e *MetadataMVCCNode) UpdateDeltaLoc(deltaLoc string)
- func (e *MetadataMVCCNode) UpdateMetaLoc(metaLoc string)
- func (e *MetadataMVCCNode) WriteTo(w io.Writer) (n int64, err error)
- type OnUpdate
- type Processor
- type Schema
- func (s *Schema) AllNames() []string
- func (s *Schema) AllNullables() []bool
- func (s *Schema) AllTypes() []types.Type
- func (s *Schema) AppendCol(name string, typ types.Type) error
- func (s *Schema) AppendColDef(def *ColDef) (err error)
- func (s *Schema) AppendColWithAttribute(attr engine.Attribute) error
- func (s *Schema) AppendColWithDefault(name string, typ types.Type, val Default) error
- func (s *Schema) AppendPKCol(name string, typ types.Type, idx int) error
- func (s *Schema) AppendPKColWithAttribute(attr engine.Attribute, idx int) error
- func (s *Schema) AppendSortKey(name string, typ types.Type, idx int, isPrimary bool) error
- func (s *Schema) Attrs() []string
- func (s *Schema) Clone() *Schema
- func (s *Schema) Finalize(rebuild bool) (err error)
- func (s *Schema) GetColIdx(attr string) int
- func (s *Schema) GetSingleSortKey() *ColDef
- func (s *Schema) GetSingleSortKeyIdx() int
- func (s *Schema) GetSortKeyType() types.Type
- func (s *Schema) HasPK() bool
- func (s *Schema) HasSortKey() bool
- func (s *Schema) IsPartOfPK(idx int) bool
- func (s *Schema) Marshal() (buf []byte, err error)
- func (s *Schema) Nullables() []bool
- func (s *Schema) ReadFrom(r io.Reader) (n int64, err error)
- func (s *Schema) ReadFromBatch(bat *containers.Batch, offset int) (next int)
- func (s *Schema) String() string
- func (s *Schema) Types() []types.Type
- type SegmentDataFactory
- type SegmentEntry
- func (entry *SegmentEntry) AddEntryLocked(block *BlockEntry)
- func (entry *SegmentEntry) AsCommonID() *common.ID
- func (entry *SegmentEntry) BlockCnt() int
- func (entry *SegmentEntry) CollectBlockEntries(commitFilter func(be *MetaBaseEntry) bool, ...) []*BlockEntry
- func (entry *SegmentEntry) CreateBlock(txn txnif.AsyncTxn, state EntryState, dataFactory BlockDataFactory) (created *BlockEntry, err error)
- func (entry *SegmentEntry) DestroyData() (err error)
- func (entry *SegmentEntry) DropBlockEntry(id uint64, txn txnif.AsyncTxn) (deleted *BlockEntry, err error)
- func (entry *SegmentEntry) GetAppendableBlock() (blk *BlockEntry)
- func (entry *SegmentEntry) GetAppendableBlockCnt() int
- func (entry *SegmentEntry) GetBlockEntryByID(id uint64) (blk *BlockEntry, err error)
- func (entry *SegmentEntry) GetBlockEntryByIDLocked(id uint64) (blk *BlockEntry, err error)
- func (entry *SegmentEntry) GetCatalog() *Catalog
- func (entry *SegmentEntry) GetScheduler() tasks.TaskScheduler
- func (entry *SegmentEntry) GetSegmentData() data.Segment
- func (entry *SegmentEntry) GetTable() *TableEntry
- func (entry *SegmentEntry) GetTerminationTS() (ts types.TS, terminated bool)
- func (entry *SegmentEntry) InitData(factory DataFactory)
- func (entry *SegmentEntry) Is1PC() bool
- func (entry *SegmentEntry) IsActive() bool
- func (entry *SegmentEntry) IsAppendable() bool
- func (entry *SegmentEntry) LastAppendableBlock() (blk *BlockEntry)
- func (entry *SegmentEntry) MakeBlockIt(reverse bool) *common.GenericSortedDListIt[*BlockEntry]
- func (entry *SegmentEntry) MakeCommand(id uint32) (cmd txnif.TxnCmd, err error)
- func (entry *SegmentEntry) PPString(level common.PPLevel, depth int, prefix string) string
- func (entry *SegmentEntry) PrepareRollback() (err error)
- func (entry *SegmentEntry) ReadFrom(r io.Reader) (n int64, err error)
- func (entry *SegmentEntry) RemoveEntry(block *BlockEntry) (err error)
- func (entry *SegmentEntry) Repr() string
- func (entry *SegmentEntry) Set1PC()
- func (entry *SegmentEntry) String() string
- func (entry *SegmentEntry) StringLocked() string
- func (entry *SegmentEntry) StringWithLevel(level common.PPLevel) string
- func (entry *SegmentEntry) StringWithLevelLocked(level common.PPLevel) string
- func (entry *SegmentEntry) TreeMaxDropCommitEntry() BaseEntry
- func (entry *SegmentEntry) WriteTo(w io.Writer) (n int64, err error)
- type SortKey
- type TableBaseEntry
- func (be *TableBaseEntry) CloneCommittedInRange(start, end types.TS) BaseEntry
- func (be *TableBaseEntry) CreateWithTS(ts types.TS)
- func (be *TableBaseEntry) CreateWithTxn(txn txnif.AsyncTxn)
- func (be *TableBaseEntry) DeleteAfter(ts types.TS) bool
- func (be *TableBaseEntry) DeleteBefore(ts types.TS) bool
- func (be *TableBaseEntry) DeleteLocked(txn txnif.TxnReader) (isNewNode bool, err error)
- func (be *TableBaseEntry) DoCompre(voe BaseEntry) int
- func (be *TableBaseEntry) DropEntryLocked(txnCtx txnif.TxnReader) (isNewNode bool, err error)
- func (be *TableBaseEntry) GetCreatedAt() types.TS
- func (be *TableBaseEntry) GetDeleteAt() types.TS
- func (be *TableBaseEntry) GetID() uint64
- func (be *TableBaseEntry) GetVisibility(ts types.TS) (visible, dropped bool)
- func (be *TableBaseEntry) GetVisibilityLocked(ts types.TS) (visible, dropped bool)
- func (be *TableBaseEntry) HasDropCommitted() bool
- func (be *TableBaseEntry) HasDropCommittedLocked() bool
- func (be *TableBaseEntry) IsVisible(ts types.TS, mu *sync.RWMutex) (ok bool, err error)
- func (be *TableBaseEntry) NeedWaitCommitting(startTS types.TS) (bool, txnif.TxnReader)
- func (be *TableBaseEntry) PPString(level common.PPLevel, depth int, prefix string) string
- func (be *TableBaseEntry) PrepareAdd(txn txnif.TxnReader) (err error)
- func (be *TableBaseEntry) ReadAllFrom(r io.Reader) (n int64, err error)
- func (be *TableBaseEntry) ReadOneNodeFrom(r io.Reader) (n int64, err error)
- func (be *TableBaseEntry) String() string
- func (be *TableBaseEntry) StringLocked() string
- func (be *TableBaseEntry) TryGetTerminatedTS(waitIfcommitting bool) (terminated bool, TS types.TS)
- func (be *TableBaseEntry) WriteAllTo(w io.Writer) (n int64, err error)
- func (be *TableBaseEntry) WriteOneNodeTo(w io.Writer) (n int64, err error)
- type TableDataFactory
- type TableEntry
- func MockStaloneTableEntry(id uint64, schema *Schema) *TableEntry
- func NewReplayTableEntry() *TableEntry
- func NewSystemTableEntry(db *DBEntry, id uint64, schema *Schema) *TableEntry
- func NewTableEntry(db *DBEntry, schema *Schema, txnCtx txnif.AsyncTxn, ...) *TableEntry
- func NewTableEntryWithTableId(db *DBEntry, schema *Schema, txnCtx txnif.AsyncTxn, ...) *TableEntry
- func (entry *TableEntry) AddEntryLocked(segment *SegmentEntry)
- func (entry *TableEntry) AddRows(delta uint64) uint64
- func (entry *TableEntry) AsCommonID() *common.ID
- func (entry *TableEntry) CreateSegment(txn txnif.AsyncTxn, state EntryState, dataFactory SegmentDataFactory) (created *SegmentEntry, err error)
- func (entry *TableEntry) DropSegmentEntry(id uint64, txn txnif.AsyncTxn) (deleted *SegmentEntry, err error)
- func (entry *TableEntry) GetCatalog() *Catalog
- func (entry *TableEntry) GetColDefs() []*ColDef
- func (entry *TableEntry) GetDB() *DBEntry
- func (entry *TableEntry) GetFullName() string
- func (entry *TableEntry) GetRows() uint64
- func (entry *TableEntry) GetSchema() *Schema
- func (entry *TableEntry) GetSegmentByID(id uint64) (seg *SegmentEntry, err error)
- func (entry *TableEntry) GetTableData() data.Table
- func (entry *TableEntry) GetTerminationTS() (ts types.TS, terminated bool)
- func (entry *TableEntry) Is1PC() bool
- func (entry *TableEntry) IsActive() bool
- func (entry *TableEntry) IsVirtual() bool
- func (entry *TableEntry) LastAppendableSegmemt() (seg *SegmentEntry)
- func (entry *TableEntry) MakeCommand(id uint32) (cmd txnif.TxnCmd, err error)
- func (entry *TableEntry) MakeSegmentIt(reverse bool) *common.GenericSortedDListIt[*SegmentEntry]
- func (entry *TableEntry) PPString(level common.PPLevel, depth int, prefix string) string
- func (entry *TableEntry) PrepareRollback() (err error)
- func (entry *TableEntry) ReadFrom(r io.Reader) (n int64, err error)
- func (entry *TableEntry) RecurLoop(processor Processor) (err error)
- func (entry *TableEntry) RemoveEntry(segment *SegmentEntry) (err error)
- func (entry *TableEntry) RemoveRows(delta uint64) uint64
- func (entry *TableEntry) Set1PC()
- func (entry *TableEntry) String() string
- func (entry *TableEntry) StringLocked() string
- func (entry *TableEntry) StringLockedWithLevel(level common.PPLevel) string
- func (entry *TableEntry) StringWithLevel(level common.PPLevel) string
- func (entry *TableEntry) WriteTo(w io.Writer) (n int64, err error)
- type TableMVCCNode
- func (e *TableMVCCNode) ApplyCommit(index *wal.Index) (err error)
- func (e *TableMVCCNode) ApplyRollback(index *wal.Index) (err error)
- func (e *TableMVCCNode) CloneAll() txnif.MVCCNode
- func (e *TableMVCCNode) CloneData() txnif.MVCCNode
- func (e *TableMVCCNode) PrepareCommit() (err error)
- func (e *TableMVCCNode) ReadFrom(r io.Reader) (n int64, err error)
- func (e *TableMVCCNode) String() string
- func (e *TableMVCCNode) Update(vun txnif.MVCCNode)
- func (e *TableMVCCNode) WriteTo(w io.Writer) (n int64, err error)
Constants ¶
const ( SnapshotAttr_SegID = "segment_id" SnapshotAttr_TID = "table_id" SnapshotAttr_DBID = "db_id" SegmentAttr_ID = "id" SegmentAttr_CreateAt = "create_at" SegmentAttr_State = "state" SnapshotAttr_BlockMaxRow = "block_max_row" SnapshotAttr_SegmentMaxBlock = "segment_max_block" )
+--------+---------+----------+----------+------------+ | ID | Name | CreateAt | DeleteAt | CommitInfo | +--------+---------+----------+----------+------------+ |(uint64)|(varchar)| (uint64) | (uint64) | (varchar) | +--------+---------+----------+----------+------------+
const ( CmdUpdateDatabase = int16(256) + iota CmdUpdateTable CmdUpdateSegment CmdUpdateBlock )
const ( PhyAddrColumnName = catalog.Row_ID PhyAddrColumnComment = "Physical address" SortKeyNamePrefx = "_SORT_" AttrRowID = PhyAddrColumnName AttrCommitTs = "commit_time" AttrAborted = "aborted" TenantSysID = uint32(0) SystemSegment_DB_ID = uint64(101) SystemSegment_Table_ID = uint64(102) SystemSegment_Columns_ID = uint64(103) SystemBlock_DB_ID = uint64(201) SystemBlock_Table_ID = uint64(202) SystemBlock_Columns_ID = uint64(203) )
const ( ModelSchemaName = "_ModelSchema" ModelAttrET = "ET" ModelAttrID = "ID" ModelAttrName = "NAME" ModelAttrTS = "TS" ModelAttrOpT = "OPT" ModelAttrLogIdx = "LOGIDX" ModelAttrInfo = "INFO" ModelAttrParentID = "PARENTID" )
Variables ¶
var (
PhyAddrColumnType types.Type
)
Functions ¶
func ActiveWithNoTxnFilter ¶
func ActiveWithNoTxnFilter(be *MetaBaseEntry) bool
func AppendableBlkFilter ¶
func AppendableBlkFilter(be *BlockEntry) bool
func CompareDBBaseNode ¶ added in v0.6.0
func CompareMetaBaseNode ¶ added in v0.6.0
func CompareTableBaseNode ¶ added in v0.6.0
func CompareUint64 ¶
func GetAttrIdx ¶
func MarshalOnUpdate ¶ added in v0.6.0
func MockTxnFactory ¶
func MockTxnFactory(catalog *Catalog) txnbase.TxnFactory
func MockTxnStoreFactory ¶
func MockTxnStoreFactory(catalog *Catalog) txnbase.TxnStoreFactory
func NewEmptyDBMVCCNode ¶ added in v0.6.0
func NewEmptyMetadataMVCCNode ¶ added in v0.6.0
func NewEmptyTableMVCCNode ¶ added in v0.6.0
func NonAppendableBlkFilter ¶
func NonAppendableBlkFilter(be *BlockEntry) bool
Types ¶
type BaseEntry ¶
type BaseEntry interface { RLock() RUnlock() String() string StringLocked() string PPString(common.PPLevel, int, string) string GetTxn() txnif.TxnReader GetID() uint64 GetIndexes() []*wal.Index GetLogIndex() *wal.Index GetLatestNodeLocked() txnif.MVCCNode IsVisible(ts types.TS, mu *sync.RWMutex) (ok bool, err error) HasCommittedNodeInRange(minTs, MaxTs types.TS) bool IsCreatingOrAborted() bool IsCommitting() bool DeleteBefore(ts types.TS) bool HasDropCommitted() bool HasDropCommittedLocked() bool WriteOneNodeTo(w io.Writer) (n int64, err error) ReadOneNodeFrom(r io.Reader) (n int64, err error) CloneCommittedInRange(start, end types.TS) (ret BaseEntry) PrepareCommit() error PrepareRollback() (bool, error) ApplyCommit(index *wal.Index) error ApplyRollback(index *wal.Index) error }
JXM TODO: Generic BaseEntry can't work in go 1.19 because of compiler bug: https://github.com/golang/go/issues/54671 Refactor catalog and use generic BaseEntry after go 1.19.1 release.
type BlockDataFactory ¶
type BlockDataFactory = func(meta *BlockEntry) data.Block
type BlockEntry ¶
type BlockEntry struct { *MetaBaseEntry // contains filtered or unexported fields }
func NewBlockEntry ¶
func NewBlockEntry(segment *SegmentEntry, txn txnif.AsyncTxn, state EntryState, dataFactory BlockDataFactory) *BlockEntry
func NewReplayBlockEntry ¶
func NewReplayBlockEntry() *BlockEntry
func NewStandaloneBlock ¶
func NewStandaloneBlock(segment *SegmentEntry, id uint64, ts types.TS) *BlockEntry
func NewSysBlockEntry ¶
func NewSysBlockEntry(segment *SegmentEntry, id uint64) *BlockEntry
func (*BlockEntry) AsCommonID ¶
func (entry *BlockEntry) AsCommonID() *common.ID
func (*BlockEntry) DestroyData ¶
func (entry *BlockEntry) DestroyData() (err error)
func (*BlockEntry) GetBlockData ¶
func (entry *BlockEntry) GetBlockData() data.Block
func (*BlockEntry) GetCatalog ¶
func (entry *BlockEntry) GetCatalog() *Catalog
func (*BlockEntry) GetSchema ¶
func (entry *BlockEntry) GetSchema() *Schema
func (*BlockEntry) GetSegment ¶
func (entry *BlockEntry) GetSegment() *SegmentEntry
func (*BlockEntry) GetTerminationTS ¶
func (entry *BlockEntry) GetTerminationTS() (ts types.TS, terminated bool)
GetTerminationTS is coarse API: no consistency check
func (*BlockEntry) InitData ¶
func (entry *BlockEntry) InitData(factory DataFactory)
func (*BlockEntry) Is1PC ¶ added in v0.6.0
func (entry *BlockEntry) Is1PC() bool
func (*BlockEntry) IsActive ¶
func (entry *BlockEntry) IsActive() bool
IsActive is coarse API: no consistency check
func (*BlockEntry) IsAppendable ¶
func (entry *BlockEntry) IsAppendable() bool
func (*BlockEntry) MakeCommand ¶
func (entry *BlockEntry) MakeCommand(id uint32) (cmd txnif.TxnCmd, err error)
func (*BlockEntry) MakeKey ¶
func (entry *BlockEntry) MakeKey() []byte
func (*BlockEntry) PrepareCompact ¶ added in v0.6.0
func (entry *BlockEntry) PrepareCompact() bool
PrepareCompact is performance insensitive a block can be compacted: 1. no uncommited node 2. at least one committed node 3. not compacted
func (*BlockEntry) PrepareRollback ¶
func (entry *BlockEntry) PrepareRollback() (err error)
func (*BlockEntry) Repr ¶
func (entry *BlockEntry) Repr() string
func (*BlockEntry) Set1PC ¶ added in v0.6.0
func (entry *BlockEntry) Set1PC()
func (*BlockEntry) String ¶
func (entry *BlockEntry) String() string
func (*BlockEntry) StringLocked ¶
func (entry *BlockEntry) StringLocked() string
func (*BlockEntry) StringWithLevel ¶ added in v0.6.0
func (entry *BlockEntry) StringWithLevel(level common.PPLevel) string
func (*BlockEntry) StringWithLevelLocked ¶ added in v0.6.0
func (entry *BlockEntry) StringWithLevelLocked(level common.PPLevel) string
type Catalog ¶
type Catalog struct { *IDAlloctor *sync.RWMutex // contains filtered or unexported fields }
func MockCatalog ¶
func MockCatalog(scheduler tasks.TaskScheduler) *Catalog
func NewEmptyCatalog ¶ added in v0.6.0
func NewEmptyCatalog() *Catalog
func OpenCatalog ¶
func OpenCatalog(scheduler tasks.TaskScheduler, dataFactory DataFactory) (*Catalog, error)
func (*Catalog) AddColumnCnt ¶
func (*Catalog) AddEntryLocked ¶
func (*Catalog) AddTableCnt ¶
func (*Catalog) CoarseColumnCnt ¶
func (*Catalog) CoarseDBCnt ¶
func (*Catalog) CoarseTableCnt ¶
func (*Catalog) CreateDBEntry ¶
func (*Catalog) CreateDBEntryByTS ¶ added in v0.6.0
func (*Catalog) CreateDBEntryWithID ¶ added in v0.6.0
func (*Catalog) DropDBEntry ¶
func (*Catalog) DropDBEntryByID ¶ added in v0.6.0
func (*Catalog) GetDBEntryByName ¶ added in v0.6.0
func (*Catalog) GetDatabaseByID ¶
func (*Catalog) GetItemNodeByIDLocked ¶ added in v0.6.0
func (catalog *Catalog) GetItemNodeByIDLocked(id uint64) *common.GenericDLNode[*DBEntry]
func (*Catalog) GetScheduler ¶
func (catalog *Catalog) GetScheduler() tasks.TaskScheduler
func (*Catalog) InitSystemDB ¶
func (catalog *Catalog) InitSystemDB()
func (*Catalog) MakeDBIt ¶
func (catalog *Catalog) MakeDBIt(reverse bool) *common.GenericSortedDListIt[*DBEntry]
func (*Catalog) OnReplayBlockBatch ¶ added in v0.6.0
func (catalog *Catalog) OnReplayBlockBatch(ins, insTxn, del, delTxn *containers.Batch, dataFactory DataFactory)
func (*Catalog) OnReplayDatabaseBatch ¶ added in v0.6.0
func (catalog *Catalog) OnReplayDatabaseBatch(ins, insTxn, del, delTxn *containers.Batch)
func (*Catalog) OnReplaySegmentBatch ¶ added in v0.6.0
func (catalog *Catalog) OnReplaySegmentBatch(ins, insTxn, del, delTxn *containers.Batch, dataFactory DataFactory)
func (*Catalog) OnReplayTableBatch ¶ added in v0.6.0
func (catalog *Catalog) OnReplayTableBatch(ins, insTxn, insCol, del, delTxn *containers.Batch, dataFactory DataFactory)
func (*Catalog) RemoveEntry ¶
func (*Catalog) ReplayCmd ¶
func (catalog *Catalog) ReplayCmd( txncmd txnif.TxnCmd, dataFactory DataFactory, idxCtx *wal.Index, observer wal.ReplayObserver)
func (*Catalog) ReplayTableRows ¶
func (catalog *Catalog) ReplayTableRows()
func (*Catalog) SimplePPString ¶
func (*Catalog) TxnGetDBEntryByID ¶ added in v0.6.0
type ColDef ¶
type ColDef struct { Name string Idx int // indicates its position in all coldefs Type types.Type Hidden bool // Hidden Column is generated by compute layer, keep hidden from user PhyAddr bool // PhyAddr Column is generated by tae as rowid NullAbility bool AutoIncrement bool Primary bool SortIdx int8 // indicates its position in all sort keys SortKey bool Comment string Default Default OnUpdate OnUpdate }
func (*ColDef) IsAutoIncrement ¶ added in v0.6.0
type ComposedFilter ¶
type ComposedFilter struct { CommitFilters []func(*MetaBaseEntry) bool BlockFilters []func(*BlockEntry) bool }
func NewComposedFilter ¶
func NewComposedFilter() *ComposedFilter
func (*ComposedFilter) AddBlockFilter ¶
func (filter *ComposedFilter) AddBlockFilter(f func(*BlockEntry) bool)
func (*ComposedFilter) AddCommitFilter ¶
func (filter *ComposedFilter) AddCommitFilter(f func(*MetaBaseEntry) bool)
func (*ComposedFilter) FilteBlock ¶
func (filter *ComposedFilter) FilteBlock(be *BlockEntry) bool
func (*ComposedFilter) FilteCommit ¶
func (filter *ComposedFilter) FilteCommit(be *MetaBaseEntry) bool
type ComputeIndexInfo ¶ added in v0.6.0
type DBBaseEntry ¶ added in v0.6.0
func NewDBBaseEntry ¶ added in v0.6.0
func NewDBBaseEntry(id uint64) *DBBaseEntry
func NewReplayDBBaseEntry ¶ added in v0.6.0
func NewReplayDBBaseEntry() *DBBaseEntry
func (*DBBaseEntry) CloneCommittedInRange ¶ added in v0.6.0
func (be *DBBaseEntry) CloneCommittedInRange(start, end types.TS) BaseEntry
func (*DBBaseEntry) CreateWithTS ¶ added in v0.6.0
func (be *DBBaseEntry) CreateWithTS(ts types.TS)
func (*DBBaseEntry) CreateWithTxn ¶ added in v0.6.0
func (be *DBBaseEntry) CreateWithTxn(txn txnif.AsyncTxn)
func (*DBBaseEntry) DeleteAfter ¶ added in v0.6.0
func (be *DBBaseEntry) DeleteAfter(ts types.TS) bool
func (*DBBaseEntry) DeleteBefore ¶ added in v0.6.0
func (be *DBBaseEntry) DeleteBefore(ts types.TS) bool
func (*DBBaseEntry) DeleteLocked ¶ added in v0.6.0
func (be *DBBaseEntry) DeleteLocked(txn txnif.TxnReader) (isNewNode bool, err error)
func (*DBBaseEntry) DoCompre ¶ added in v0.6.0
func (be *DBBaseEntry) DoCompre(voe BaseEntry) int
func (*DBBaseEntry) DropEntryLocked ¶ added in v0.6.0
func (be *DBBaseEntry) DropEntryLocked(txn txnif.TxnReader) (isNewNode bool, err error)
func (*DBBaseEntry) GetCreatedAt ¶ added in v0.6.0
func (be *DBBaseEntry) GetCreatedAt() types.TS
func (*DBBaseEntry) GetDeleteAt ¶ added in v0.6.0
func (be *DBBaseEntry) GetDeleteAt() types.TS
func (*DBBaseEntry) GetID ¶ added in v0.6.0
func (be *DBBaseEntry) GetID() uint64
func (*DBBaseEntry) GetVisibility ¶ added in v0.6.0
func (be *DBBaseEntry) GetVisibility(ts types.TS) (visible, dropped bool)
func (*DBBaseEntry) GetVisibilityLocked ¶ added in v0.6.0
func (be *DBBaseEntry) GetVisibilityLocked(ts types.TS) (visible, dropped bool)
func (*DBBaseEntry) HasDropCommitted ¶ added in v0.6.0
func (be *DBBaseEntry) HasDropCommitted() bool
func (*DBBaseEntry) HasDropCommittedLocked ¶ added in v0.6.0
func (be *DBBaseEntry) HasDropCommittedLocked() bool
func (*DBBaseEntry) NeedWaitCommitting ¶ added in v0.6.0
func (*DBBaseEntry) PrepareAdd ¶ added in v0.6.0
func (be *DBBaseEntry) PrepareAdd(txn txnif.TxnReader) (err error)
func (*DBBaseEntry) ReadAllFrom ¶ added in v0.6.0
func (be *DBBaseEntry) ReadAllFrom(r io.Reader) (n int64, err error)
func (*DBBaseEntry) ReadOneNodeFrom ¶ added in v0.6.0
func (be *DBBaseEntry) ReadOneNodeFrom(r io.Reader) (n int64, err error)
func (*DBBaseEntry) String ¶ added in v0.6.0
func (be *DBBaseEntry) String() string
func (*DBBaseEntry) StringLocked ¶ added in v0.6.0
func (be *DBBaseEntry) StringLocked() string
func (*DBBaseEntry) TryGetTerminatedTS ¶ added in v0.6.0
func (be *DBBaseEntry) TryGetTerminatedTS(waitIfcommitting bool) (terminated bool, TS types.TS)
func (*DBBaseEntry) WriteAllTo ¶ added in v0.6.0
func (be *DBBaseEntry) WriteAllTo(w io.Writer) (n int64, err error)
func (*DBBaseEntry) WriteOneNodeTo ¶ added in v0.6.0
func (be *DBBaseEntry) WriteOneNodeTo(w io.Writer) (n int64, err error)
type DBEntry ¶
type DBEntry struct { *DBBaseEntry // contains filtered or unexported fields }
func NewDBEntry ¶
func NewDBEntryByTS ¶ added in v0.6.0
func NewDBEntryWithID ¶ added in v0.6.0
func NewReplayDBEntry ¶
func NewReplayDBEntry() *DBEntry
func NewSystemDBEntry ¶
func (*DBEntry) AddEntryLocked ¶
func (e *DBEntry) AddEntryLocked(table *TableEntry, txn txnif.TxnReader, skipDedup bool) (err error)
Catalog entry is created in following steps: 1. Locate the record. Creating always gets the latest DBEntry. 2.1 If there doesn't exist a DBEntry, add new entry and return. 2.2 If there exists a DBEntry: 2.2.1 Check conflication.
- Wait for the related txn if need.
- w-w conflict when: there's an active txn; or he CommitTS of the latest related txn is larger than StartTS of write txn
2.2.2 Check duplicate/not found. If the entry hasn't been dropped, return ErrDuplicate.
func (*DBEntry) CoarseTableCnt ¶
func (*DBEntry) CreateTableEntry ¶
func (e *DBEntry) CreateTableEntry(schema *Schema, txn txnif.AsyncTxn, dataFactory TableDataFactory) (created *TableEntry, err error)
func (*DBEntry) CreateTableEntryWithTableId ¶ added in v0.6.0
func (e *DBEntry) CreateTableEntryWithTableId(schema *Schema, txn txnif.AsyncTxn, dataFactory TableDataFactory, tableId uint64) (created *TableEntry, err error)
func (*DBEntry) DropTableEntry ¶
func (e *DBEntry) DropTableEntry(name string, txn txnif.AsyncTxn) (newEntry bool, deleted *TableEntry, err error)
Catalog entry is dropped in following steps: 1. Locate the record by timestamp 2. Check conflication. 2.1 Wait for the related txn if need. 2.2 w-w conflict when 1. there's an active txn; or
- the CommitTS of the latest related txn is larger than StartTS of write txn
3. Check duplicate/not found. If the entry has already been dropped, return ErrNotFound.
func (*DBEntry) DropTableEntryByID ¶ added in v0.6.0
func (*DBEntry) GetBlockEntryByID ¶
func (e *DBEntry) GetBlockEntryByID(id *common.ID) (blk *BlockEntry, err error)
func (*DBEntry) GetCatalog ¶
func (*DBEntry) GetCreateAt ¶ added in v0.6.0
func (*DBEntry) GetCreateSql ¶ added in v0.6.0
func (*DBEntry) GetFullName ¶ added in v0.6.0
func (*DBEntry) GetItemNodeByIDLocked ¶ added in v0.6.0
func (e *DBEntry) GetItemNodeByIDLocked(id uint64) *common.GenericDLNode[*TableEntry]
func (*DBEntry) GetTableEntryByID ¶
func (e *DBEntry) GetTableEntryByID(id uint64) (table *TableEntry, err error)
func (*DBEntry) GetTableEntryByName ¶ added in v0.6.0
func (*DBEntry) GetTenantID ¶ added in v0.6.0
func (*DBEntry) IsSystemDB ¶
func (*DBEntry) MakeTableIt ¶
func (e *DBEntry) MakeTableIt(reverse bool) *common.GenericSortedDListIt[*TableEntry]
func (*DBEntry) PrepareRollback ¶
func (*DBEntry) RemoveEntry ¶
func (e *DBEntry) RemoveEntry(table *TableEntry) (err error)
func (*DBEntry) StringLocked ¶
func (*DBEntry) StringWithLevel ¶ added in v0.6.0
func (*DBEntry) StringWithlevelLocked ¶ added in v0.6.0
func (*DBEntry) TxnGetTableEntryByID ¶ added in v0.6.0
func (*DBEntry) TxnGetTableEntryByName ¶ added in v0.6.0
type DBMVCCNode ¶ added in v0.6.0
type DBMVCCNode struct { *EntryMVCCNode *txnbase.TxnMVCCNode }
func (*DBMVCCNode) ApplyCommit ¶ added in v0.6.0
func (e *DBMVCCNode) ApplyCommit(index *wal.Index) (err error)
func (*DBMVCCNode) ApplyRollback ¶ added in v0.6.0
func (e *DBMVCCNode) ApplyRollback(index *wal.Index) (err error)
func (*DBMVCCNode) CloneAll ¶ added in v0.6.0
func (e *DBMVCCNode) CloneAll() txnif.MVCCNode
func (*DBMVCCNode) CloneData ¶ added in v0.6.0
func (e *DBMVCCNode) CloneData() txnif.MVCCNode
func (*DBMVCCNode) PrepareCommit ¶ added in v0.6.0
func (e *DBMVCCNode) PrepareCommit() (err error)
func (*DBMVCCNode) ReadFrom ¶ added in v0.6.0
func (e *DBMVCCNode) ReadFrom(r io.Reader) (n int64, err error)
func (*DBMVCCNode) String ¶ added in v0.6.0
func (e *DBMVCCNode) String() string
func (*DBMVCCNode) Update ¶ added in v0.6.0
func (e *DBMVCCNode) Update(vun txnif.MVCCNode)
for create drop in one txn
type DataFactory ¶
type DataFactory interface { MakeTableFactory() TableDataFactory MakeSegmentFactory() SegmentDataFactory MakeBlockFactory() BlockDataFactory }
type EntryCommand ¶
type EntryCommand struct { *txnbase.BaseCustomizedCmd DBID uint64 TableID uint64 SegmentID uint64 DB *DBEntry Table *TableEntry Segment *SegmentEntry Block *BlockEntry // contains filtered or unexported fields }
func (*EntryCommand) ApplyCommit ¶ added in v0.6.0
func (cmd *EntryCommand) ApplyCommit()
func (*EntryCommand) ApplyRollback ¶ added in v0.6.0
func (cmd *EntryCommand) ApplyRollback()
func (*EntryCommand) Desc ¶
func (cmd *EntryCommand) Desc() string
func (*EntryCommand) GetLogIndex ¶
func (cmd *EntryCommand) GetLogIndex() *wal.Index
func (*EntryCommand) GetTs ¶
func (cmd *EntryCommand) GetTs() types.TS
func (*EntryCommand) GetType ¶
func (cmd *EntryCommand) GetType() int16
func (*EntryCommand) IDString ¶
func (cmd *EntryCommand) IDString() string
func (*EntryCommand) Marshal ¶
func (cmd *EntryCommand) Marshal() (buf []byte, err error)
func (*EntryCommand) SetReplayTxn ¶ added in v0.6.0
func (cmd *EntryCommand) SetReplayTxn(txn txnif.AsyncTxn)
func (*EntryCommand) String ¶
func (cmd *EntryCommand) String() string
func (*EntryCommand) Unmarshal ¶
func (cmd *EntryCommand) Unmarshal(buf []byte) (err error)
func (*EntryCommand) VerboseString ¶
func (cmd *EntryCommand) VerboseString() string
type EntryMVCCNode ¶ added in v0.6.0
func (*EntryMVCCNode) ApplyCommit ¶ added in v0.6.0
func (un *EntryMVCCNode) ApplyCommit(ts types.TS) (err error)
func (*EntryMVCCNode) Clone ¶ added in v0.6.0
func (un *EntryMVCCNode) Clone() *EntryMVCCNode
func (*EntryMVCCNode) CloneData ¶ added in v0.6.0
func (un *EntryMVCCNode) CloneData() *EntryMVCCNode
func (*EntryMVCCNode) Delete ¶ added in v0.6.0
func (un *EntryMVCCNode) Delete()
func (*EntryMVCCNode) GetCreatedAt ¶ added in v0.6.0
func (un *EntryMVCCNode) GetCreatedAt() types.TS
func (*EntryMVCCNode) GetDeletedAt ¶ added in v0.6.0
func (un *EntryMVCCNode) GetDeletedAt() types.TS
func (*EntryMVCCNode) HasDropCommitted ¶ added in v0.6.0
func (un *EntryMVCCNode) HasDropCommitted() bool
Dropped committed
func (*EntryMVCCNode) HasDropIntent ¶ added in v0.6.0
func (un *EntryMVCCNode) HasDropIntent() bool
Dropped committed or uncommitted
func (*EntryMVCCNode) IsCreating ¶ added in v0.6.0
func (un *EntryMVCCNode) IsCreating() bool
func (*EntryMVCCNode) PrepareCommit ¶ added in v0.6.0
func (un *EntryMVCCNode) PrepareCommit() (err error)
func (*EntryMVCCNode) ReadFrom ¶ added in v0.6.0
func (un *EntryMVCCNode) ReadFrom(r io.Reader) (n int64, err error)
func (*EntryMVCCNode) String ¶ added in v0.6.0
func (un *EntryMVCCNode) String() string
type EntryState ¶
type EntryState int8
const ( ES_Appendable EntryState = iota ES_NotAppendable ES_Frozen )
func (EntryState) Repr ¶
func (es EntryState) Repr() string
type IDAlloctor ¶
type IDAlloctor struct {
// contains filtered or unexported fields
}
func NewIDAllocator ¶
func NewIDAllocator() *IDAlloctor
func (*IDAlloctor) CurrBlock ¶
func (alloc *IDAlloctor) CurrBlock() uint64
func (*IDAlloctor) CurrDB ¶
func (alloc *IDAlloctor) CurrDB() uint64
func (*IDAlloctor) CurrSegment ¶
func (alloc *IDAlloctor) CurrSegment() uint64
func (*IDAlloctor) CurrTable ¶
func (alloc *IDAlloctor) CurrTable() uint64
func (*IDAlloctor) IDStates ¶
func (alloc *IDAlloctor) IDStates() string
func (*IDAlloctor) Init ¶
func (alloc *IDAlloctor) Init(prevDb, prevTbl, prevSeg, prevBlk uint64)
func (*IDAlloctor) NextBlock ¶
func (alloc *IDAlloctor) NextBlock() uint64
func (*IDAlloctor) NextDB ¶
func (alloc *IDAlloctor) NextDB() uint64
func (*IDAlloctor) NextSegment ¶
func (alloc *IDAlloctor) NextSegment() uint64
func (*IDAlloctor) NextTable ¶
func (alloc *IDAlloctor) NextTable() uint64
func (*IDAlloctor) OnReplayBlockID ¶
func (alloc *IDAlloctor) OnReplayBlockID(id uint64)
func (*IDAlloctor) OnReplayDBID ¶
func (alloc *IDAlloctor) OnReplayDBID(id uint64)
func (*IDAlloctor) OnReplaySegmentID ¶
func (alloc *IDAlloctor) OnReplaySegmentID(id uint64)
func (*IDAlloctor) OnReplayTableID ¶
func (alloc *IDAlloctor) OnReplayTableID(id uint64)
type LoopProcessor ¶
type LoopProcessor struct { DatabaseFn func(*DBEntry) error TableFn func(*TableEntry) error SegmentFn func(*SegmentEntry) error BlockFn func(*BlockEntry) error PostSegmentFn func(*SegmentEntry) error }
func (*LoopProcessor) OnBlock ¶
func (p *LoopProcessor) OnBlock(block *BlockEntry) error
func (*LoopProcessor) OnDatabase ¶
func (p *LoopProcessor) OnDatabase(database *DBEntry) error
func (*LoopProcessor) OnPostSegment ¶
func (p *LoopProcessor) OnPostSegment(segment *SegmentEntry) error
func (*LoopProcessor) OnSegment ¶
func (p *LoopProcessor) OnSegment(segment *SegmentEntry) error
func (*LoopProcessor) OnTable ¶
func (p *LoopProcessor) OnTable(table *TableEntry) error
type MetaBaseEntry ¶ added in v0.6.0
func NewMetaBaseEntry ¶ added in v0.6.0
func NewMetaBaseEntry(id uint64) *MetaBaseEntry
func NewReplayMetaBaseEntry ¶ added in v0.6.0
func NewReplayMetaBaseEntry() *MetaBaseEntry
func (*MetaBaseEntry) CloneCommittedInRange ¶ added in v0.6.0
func (be *MetaBaseEntry) CloneCommittedInRange(start, end types.TS) BaseEntry
func (*MetaBaseEntry) CreateWithTS ¶ added in v0.6.0
func (be *MetaBaseEntry) CreateWithTS(ts types.TS)
func (*MetaBaseEntry) CreateWithTxn ¶ added in v0.6.0
func (be *MetaBaseEntry) CreateWithTxn(txn txnif.AsyncTxn)
func (*MetaBaseEntry) DeleteAfter ¶ added in v0.6.0
func (be *MetaBaseEntry) DeleteAfter(ts types.TS) bool
func (*MetaBaseEntry) DeleteBefore ¶ added in v0.6.0
func (be *MetaBaseEntry) DeleteBefore(ts types.TS) bool
func (*MetaBaseEntry) DeleteLocked ¶ added in v0.6.0
func (be *MetaBaseEntry) DeleteLocked(txn txnif.TxnReader) (isNewNode bool, err error)
func (*MetaBaseEntry) DoCompre ¶ added in v0.6.0
func (be *MetaBaseEntry) DoCompre(voe BaseEntry) int
func (*MetaBaseEntry) DropEntryLocked ¶ added in v0.6.0
func (be *MetaBaseEntry) DropEntryLocked(txn txnif.TxnReader) (isNewNode bool, err error)
func (*MetaBaseEntry) GetCreatedAt ¶ added in v0.6.0
func (be *MetaBaseEntry) GetCreatedAt() types.TS
func (*MetaBaseEntry) GetDeleteAt ¶ added in v0.6.0
func (be *MetaBaseEntry) GetDeleteAt() types.TS
func (*MetaBaseEntry) GetDeltaLoc ¶ added in v0.6.0
func (be *MetaBaseEntry) GetDeltaLoc() string
func (*MetaBaseEntry) GetID ¶ added in v0.6.0
func (be *MetaBaseEntry) GetID() uint64
func (*MetaBaseEntry) GetMetaLoc ¶ added in v0.6.0
func (be *MetaBaseEntry) GetMetaLoc() string
func (*MetaBaseEntry) GetVisibility ¶ added in v0.6.0
func (be *MetaBaseEntry) GetVisibility(ts types.TS) (visible, dropped bool)
func (*MetaBaseEntry) GetVisibilityLocked ¶ added in v0.6.0
func (be *MetaBaseEntry) GetVisibilityLocked(ts types.TS) (visible, dropped bool)
func (*MetaBaseEntry) GetVisibleDeltaLoc ¶ added in v0.6.0
func (be *MetaBaseEntry) GetVisibleDeltaLoc(ts types.TS) string
func (*MetaBaseEntry) GetVisibleMetaLoc ¶ added in v0.6.0
func (be *MetaBaseEntry) GetVisibleMetaLoc(ts types.TS) string
func (*MetaBaseEntry) HasDropCommitted ¶ added in v0.6.0
func (be *MetaBaseEntry) HasDropCommitted() bool
func (*MetaBaseEntry) HasDropCommittedLocked ¶ added in v0.6.0
func (be *MetaBaseEntry) HasDropCommittedLocked() bool
func (*MetaBaseEntry) HasPersistedData ¶ added in v0.6.0
func (be *MetaBaseEntry) HasPersistedData() bool
func (*MetaBaseEntry) HasPersistedDeltaData ¶ added in v0.6.0
func (be *MetaBaseEntry) HasPersistedDeltaData() bool
func (*MetaBaseEntry) NeedWaitCommitting ¶ added in v0.6.0
func (*MetaBaseEntry) ReadAllFrom ¶ added in v0.6.0
func (be *MetaBaseEntry) ReadAllFrom(r io.Reader) (n int64, err error)
func (*MetaBaseEntry) ReadOneNodeFrom ¶ added in v0.6.0
func (be *MetaBaseEntry) ReadOneNodeFrom(r io.Reader) (n int64, err error)
func (*MetaBaseEntry) String ¶ added in v0.6.0
func (be *MetaBaseEntry) String() string
func (*MetaBaseEntry) StringLocked ¶ added in v0.6.0
func (be *MetaBaseEntry) StringLocked() string
func (*MetaBaseEntry) TryGetTerminatedTS ¶ added in v0.6.0
func (be *MetaBaseEntry) TryGetTerminatedTS(waitIfcommitting bool) (terminated bool, TS types.TS)
func (*MetaBaseEntry) UpdateDeltaLoc ¶ added in v0.6.0
func (*MetaBaseEntry) UpdateMetaLoc ¶ added in v0.6.0
func (*MetaBaseEntry) WriteAllTo ¶ added in v0.6.0
func (be *MetaBaseEntry) WriteAllTo(w io.Writer) (n int64, err error)
func (*MetaBaseEntry) WriteOneNodeTo ¶ added in v0.6.0
func (be *MetaBaseEntry) WriteOneNodeTo(w io.Writer) (n int64, err error)
type MetadataMVCCNode ¶ added in v0.6.0
type MetadataMVCCNode struct { *EntryMVCCNode *txnbase.TxnMVCCNode MetaLoc string DeltaLoc string }
func (*MetadataMVCCNode) ApplyCommit ¶ added in v0.6.0
func (e *MetadataMVCCNode) ApplyCommit(index *wal.Index) (err error)
func (*MetadataMVCCNode) ApplyRollback ¶ added in v0.6.0
func (e *MetadataMVCCNode) ApplyRollback(index *wal.Index) (err error)
func (*MetadataMVCCNode) CloneAll ¶ added in v0.6.0
func (e *MetadataMVCCNode) CloneAll() txnif.MVCCNode
func (*MetadataMVCCNode) CloneData ¶ added in v0.6.0
func (e *MetadataMVCCNode) CloneData() txnif.MVCCNode
func (*MetadataMVCCNode) PrepareCommit ¶ added in v0.6.0
func (e *MetadataMVCCNode) PrepareCommit() (err error)
func (*MetadataMVCCNode) PrepareRollback ¶ added in v0.6.0
func (e *MetadataMVCCNode) PrepareRollback() (err error)
func (*MetadataMVCCNode) ReadFrom ¶ added in v0.6.0
func (e *MetadataMVCCNode) ReadFrom(r io.Reader) (n int64, err error)
func (*MetadataMVCCNode) String ¶ added in v0.6.0
func (e *MetadataMVCCNode) String() string
func (*MetadataMVCCNode) Update ¶ added in v0.6.0
func (e *MetadataMVCCNode) Update(vun txnif.MVCCNode)
for create drop in one txn
func (*MetadataMVCCNode) UpdateDeltaLoc ¶ added in v0.6.0
func (e *MetadataMVCCNode) UpdateDeltaLoc(deltaLoc string)
func (*MetadataMVCCNode) UpdateMetaLoc ¶ added in v0.6.0
func (e *MetadataMVCCNode) UpdateMetaLoc(metaLoc string)
type Processor ¶
type Processor interface { OnDatabase(database *DBEntry) error OnTable(table *TableEntry) error OnPostSegment(segment *SegmentEntry) error OnSegment(segment *SegmentEntry) error OnBlock(block *BlockEntry) error }
XXX this API is broken. In case of inplementing a cursor like interface we cannot use error. moerr is a very heavy mechanism.
Return a int code.
type Schema ¶
type Schema struct { AcInfo accessInfo Name string ColDefs []*ColDef NameIndex map[string]int BlockMaxRows uint32 SegmentMaxBlocks uint16 Comment string Partition string Relkind string Createsql string View string IndexInfos []*ComputeIndexInfo SortKey *SortKey PhyAddrKey *ColDef }
var SystemColumnSchema *Schema
var SystemDBSchema *Schema
var SystemTableSchema *Schema
func MockSchema ¶
func MockSchemaAll ¶
MockSchemaAll if char/varchar is needed, colCnt = 14, otherwise colCnt = 12 pkIdx == -1 means no pk defined
func NewEmptySchema ¶
func (*Schema) AllNullables ¶
func (*Schema) AppendColDef ¶
func (*Schema) AppendColWithAttribute ¶ added in v0.6.0
func (*Schema) AppendColWithDefault ¶
func (*Schema) AppendPKCol ¶
func (*Schema) AppendPKColWithAttribute ¶ added in v0.6.0
func (*Schema) AppendSortKey ¶
func (*Schema) GetColIdx ¶
GetColIdx returns column index for the given column name if found, otherwise returns -1.
func (*Schema) GetSingleSortKey ¶
GetSingleSortKey should be call only if IsSinglePK is checked
func (*Schema) GetSingleSortKeyIdx ¶
func (*Schema) GetSortKeyType ¶
func (*Schema) HasSortKey ¶
func (*Schema) IsPartOfPK ¶
func (*Schema) ReadFromBatch ¶ added in v0.6.0
func (s *Schema) ReadFromBatch(bat *containers.Batch, offset int) (next int)
type SegmentDataFactory ¶
type SegmentDataFactory = func(meta *SegmentEntry) data.Segment
type SegmentEntry ¶
type SegmentEntry struct { *MetaBaseEntry // contains filtered or unexported fields }
func NewReplaySegmentEntry ¶
func NewReplaySegmentEntry() *SegmentEntry
func NewSegmentEntry ¶
func NewSegmentEntry(table *TableEntry, txn txnif.AsyncTxn, state EntryState, dataFactory SegmentDataFactory) *SegmentEntry
func NewStandaloneSegment ¶
func NewStandaloneSegment(table *TableEntry, id uint64, ts types.TS) *SegmentEntry
func NewSysSegmentEntry ¶
func NewSysSegmentEntry(table *TableEntry, id uint64) *SegmentEntry
func (*SegmentEntry) AddEntryLocked ¶
func (entry *SegmentEntry) AddEntryLocked(block *BlockEntry)
func (*SegmentEntry) AsCommonID ¶
func (entry *SegmentEntry) AsCommonID() *common.ID
func (*SegmentEntry) BlockCnt ¶
func (entry *SegmentEntry) BlockCnt() int
func (*SegmentEntry) CollectBlockEntries ¶
func (entry *SegmentEntry) CollectBlockEntries(commitFilter func(be *MetaBaseEntry) bool, blockFilter func(be *BlockEntry) bool) []*BlockEntry
func (*SegmentEntry) CreateBlock ¶
func (entry *SegmentEntry) CreateBlock(txn txnif.AsyncTxn, state EntryState, dataFactory BlockDataFactory) (created *BlockEntry, err error)
func (*SegmentEntry) DestroyData ¶
func (entry *SegmentEntry) DestroyData() (err error)
func (*SegmentEntry) DropBlockEntry ¶
func (entry *SegmentEntry) DropBlockEntry(id uint64, txn txnif.AsyncTxn) (deleted *BlockEntry, err error)
func (*SegmentEntry) GetAppendableBlock ¶ added in v0.6.0
func (entry *SegmentEntry) GetAppendableBlock() (blk *BlockEntry)
func (*SegmentEntry) GetAppendableBlockCnt ¶
func (entry *SegmentEntry) GetAppendableBlockCnt() int
func (*SegmentEntry) GetBlockEntryByID ¶
func (entry *SegmentEntry) GetBlockEntryByID(id uint64) (blk *BlockEntry, err error)
func (*SegmentEntry) GetBlockEntryByIDLocked ¶
func (entry *SegmentEntry) GetBlockEntryByIDLocked(id uint64) (blk *BlockEntry, err error)
XXX API like this, why do we need the error? Isn't blk is nil enough?
func (*SegmentEntry) GetCatalog ¶
func (entry *SegmentEntry) GetCatalog() *Catalog
func (*SegmentEntry) GetScheduler ¶
func (entry *SegmentEntry) GetScheduler() tasks.TaskScheduler
func (*SegmentEntry) GetSegmentData ¶
func (entry *SegmentEntry) GetSegmentData() data.Segment
func (*SegmentEntry) GetTable ¶
func (entry *SegmentEntry) GetTable() *TableEntry
func (*SegmentEntry) GetTerminationTS ¶ added in v0.6.0
func (entry *SegmentEntry) GetTerminationTS() (ts types.TS, terminated bool)
GetTerminationTS is coarse API: no consistency check
func (*SegmentEntry) InitData ¶
func (entry *SegmentEntry) InitData(factory DataFactory)
func (*SegmentEntry) Is1PC ¶ added in v0.6.0
func (entry *SegmentEntry) Is1PC() bool
func (*SegmentEntry) IsActive ¶
func (entry *SegmentEntry) IsActive() bool
IsActive is coarse API: no consistency check
func (*SegmentEntry) IsAppendable ¶
func (entry *SegmentEntry) IsAppendable() bool
func (*SegmentEntry) LastAppendableBlock ¶
func (entry *SegmentEntry) LastAppendableBlock() (blk *BlockEntry)
func (*SegmentEntry) MakeBlockIt ¶
func (entry *SegmentEntry) MakeBlockIt(reverse bool) *common.GenericSortedDListIt[*BlockEntry]
func (*SegmentEntry) MakeCommand ¶
func (entry *SegmentEntry) MakeCommand(id uint32) (cmd txnif.TxnCmd, err error)
func (*SegmentEntry) PrepareRollback ¶
func (entry *SegmentEntry) PrepareRollback() (err error)
func (*SegmentEntry) ReadFrom ¶
func (entry *SegmentEntry) ReadFrom(r io.Reader) (n int64, err error)
func (*SegmentEntry) RemoveEntry ¶
func (entry *SegmentEntry) RemoveEntry(block *BlockEntry) (err error)
func (*SegmentEntry) Repr ¶
func (entry *SegmentEntry) Repr() string
func (*SegmentEntry) Set1PC ¶ added in v0.6.0
func (entry *SegmentEntry) Set1PC()
func (*SegmentEntry) String ¶
func (entry *SegmentEntry) String() string
func (*SegmentEntry) StringLocked ¶
func (entry *SegmentEntry) StringLocked() string
func (*SegmentEntry) StringWithLevel ¶ added in v0.6.0
func (entry *SegmentEntry) StringWithLevel(level common.PPLevel) string
func (*SegmentEntry) StringWithLevelLocked ¶ added in v0.6.0
func (entry *SegmentEntry) StringWithLevelLocked(level common.PPLevel) string
func (*SegmentEntry) TreeMaxDropCommitEntry ¶
func (entry *SegmentEntry) TreeMaxDropCommitEntry() BaseEntry
type SortKey ¶
type SortKey struct { Defs []*ColDef // contains filtered or unexported fields }
func NewSortKey ¶
func NewSortKey() *SortKey
func (*SortKey) GetSingleIdx ¶
type TableBaseEntry ¶ added in v0.6.0
func NewReplayTableBaseEntry ¶ added in v0.6.0
func NewReplayTableBaseEntry() *TableBaseEntry
func NewTableBaseEntry ¶ added in v0.6.0
func NewTableBaseEntry(id uint64) *TableBaseEntry
func (*TableBaseEntry) CloneCommittedInRange ¶ added in v0.6.0
func (be *TableBaseEntry) CloneCommittedInRange(start, end types.TS) BaseEntry
func (*TableBaseEntry) CreateWithTS ¶ added in v0.6.0
func (be *TableBaseEntry) CreateWithTS(ts types.TS)
func (*TableBaseEntry) CreateWithTxn ¶ added in v0.6.0
func (be *TableBaseEntry) CreateWithTxn(txn txnif.AsyncTxn)
func (*TableBaseEntry) DeleteAfter ¶ added in v0.6.0
func (be *TableBaseEntry) DeleteAfter(ts types.TS) bool
func (*TableBaseEntry) DeleteBefore ¶ added in v0.6.0
func (be *TableBaseEntry) DeleteBefore(ts types.TS) bool
func (*TableBaseEntry) DeleteLocked ¶ added in v0.6.0
func (be *TableBaseEntry) DeleteLocked(txn txnif.TxnReader) (isNewNode bool, err error)
func (*TableBaseEntry) DoCompre ¶ added in v0.6.0
func (be *TableBaseEntry) DoCompre(voe BaseEntry) int
func (*TableBaseEntry) DropEntryLocked ¶ added in v0.6.0
func (be *TableBaseEntry) DropEntryLocked(txnCtx txnif.TxnReader) (isNewNode bool, err error)
func (*TableBaseEntry) GetCreatedAt ¶ added in v0.6.0
func (be *TableBaseEntry) GetCreatedAt() types.TS
func (*TableBaseEntry) GetDeleteAt ¶ added in v0.6.0
func (be *TableBaseEntry) GetDeleteAt() types.TS
func (*TableBaseEntry) GetID ¶ added in v0.6.0
func (be *TableBaseEntry) GetID() uint64
func (*TableBaseEntry) GetVisibility ¶ added in v0.6.0
func (be *TableBaseEntry) GetVisibility(ts types.TS) (visible, dropped bool)
func (*TableBaseEntry) GetVisibilityLocked ¶ added in v0.6.0
func (be *TableBaseEntry) GetVisibilityLocked(ts types.TS) (visible, dropped bool)
func (*TableBaseEntry) HasDropCommitted ¶ added in v0.6.0
func (be *TableBaseEntry) HasDropCommitted() bool
func (*TableBaseEntry) HasDropCommittedLocked ¶ added in v0.6.0
func (be *TableBaseEntry) HasDropCommittedLocked() bool
func (*TableBaseEntry) NeedWaitCommitting ¶ added in v0.6.0
func (*TableBaseEntry) PrepareAdd ¶ added in v0.6.0
func (be *TableBaseEntry) PrepareAdd(txn txnif.TxnReader) (err error)
func (*TableBaseEntry) ReadAllFrom ¶ added in v0.6.0
func (be *TableBaseEntry) ReadAllFrom(r io.Reader) (n int64, err error)
func (*TableBaseEntry) ReadOneNodeFrom ¶ added in v0.6.0
func (be *TableBaseEntry) ReadOneNodeFrom(r io.Reader) (n int64, err error)
func (*TableBaseEntry) String ¶ added in v0.6.0
func (be *TableBaseEntry) String() string
func (*TableBaseEntry) StringLocked ¶ added in v0.6.0
func (be *TableBaseEntry) StringLocked() string
func (*TableBaseEntry) TryGetTerminatedTS ¶ added in v0.6.0
func (be *TableBaseEntry) TryGetTerminatedTS(waitIfcommitting bool) (terminated bool, TS types.TS)
func (*TableBaseEntry) WriteAllTo ¶ added in v0.6.0
func (be *TableBaseEntry) WriteAllTo(w io.Writer) (n int64, err error)
func (*TableBaseEntry) WriteOneNodeTo ¶ added in v0.6.0
func (be *TableBaseEntry) WriteOneNodeTo(w io.Writer) (n int64, err error)
type TableDataFactory ¶
type TableDataFactory = func(meta *TableEntry) data.Table
type TableEntry ¶
type TableEntry struct { *TableBaseEntry // contains filtered or unexported fields }
func MockStaloneTableEntry ¶
func MockStaloneTableEntry(id uint64, schema *Schema) *TableEntry
func NewReplayTableEntry ¶
func NewReplayTableEntry() *TableEntry
func NewSystemTableEntry ¶
func NewSystemTableEntry(db *DBEntry, id uint64, schema *Schema) *TableEntry
func NewTableEntry ¶
func NewTableEntry(db *DBEntry, schema *Schema, txnCtx txnif.AsyncTxn, dataFactory TableDataFactory) *TableEntry
func NewTableEntryWithTableId ¶ added in v0.6.0
func NewTableEntryWithTableId(db *DBEntry, schema *Schema, txnCtx txnif.AsyncTxn, dataFactory TableDataFactory, tableId uint64) *TableEntry
func (*TableEntry) AddEntryLocked ¶
func (entry *TableEntry) AddEntryLocked(segment *SegmentEntry)
func (*TableEntry) AddRows ¶
func (entry *TableEntry) AddRows(delta uint64) uint64
func (*TableEntry) AsCommonID ¶
func (entry *TableEntry) AsCommonID() *common.ID
func (*TableEntry) CreateSegment ¶
func (entry *TableEntry) CreateSegment(txn txnif.AsyncTxn, state EntryState, dataFactory SegmentDataFactory) (created *SegmentEntry, err error)
func (*TableEntry) DropSegmentEntry ¶
func (entry *TableEntry) DropSegmentEntry(id uint64, txn txnif.AsyncTxn) (deleted *SegmentEntry, err error)
func (*TableEntry) GetCatalog ¶
func (entry *TableEntry) GetCatalog() *Catalog
func (*TableEntry) GetColDefs ¶ added in v0.6.0
func (entry *TableEntry) GetColDefs() []*ColDef
func (*TableEntry) GetDB ¶
func (entry *TableEntry) GetDB() *DBEntry
func (*TableEntry) GetFullName ¶ added in v0.6.0
func (entry *TableEntry) GetFullName() string
func (*TableEntry) GetRows ¶
func (entry *TableEntry) GetRows() uint64
func (*TableEntry) GetSchema ¶
func (entry *TableEntry) GetSchema() *Schema
func (*TableEntry) GetSegmentByID ¶
func (entry *TableEntry) GetSegmentByID(id uint64) (seg *SegmentEntry, err error)
func (*TableEntry) GetTableData ¶
func (entry *TableEntry) GetTableData() data.Table
func (*TableEntry) GetTerminationTS ¶ added in v0.6.0
func (entry *TableEntry) GetTerminationTS() (ts types.TS, terminated bool)
GetTerminationTS is coarse API: no consistency check
func (*TableEntry) Is1PC ¶ added in v0.6.0
func (entry *TableEntry) Is1PC() bool
func (*TableEntry) IsActive ¶
func (entry *TableEntry) IsActive() bool
IsActive is coarse API: no consistency check
func (*TableEntry) IsVirtual ¶
func (entry *TableEntry) IsVirtual() bool
func (*TableEntry) LastAppendableSegmemt ¶
func (entry *TableEntry) LastAppendableSegmemt() (seg *SegmentEntry)
func (*TableEntry) MakeCommand ¶
func (entry *TableEntry) MakeCommand(id uint32) (cmd txnif.TxnCmd, err error)
func (*TableEntry) MakeSegmentIt ¶
func (entry *TableEntry) MakeSegmentIt(reverse bool) *common.GenericSortedDListIt[*SegmentEntry]
func (*TableEntry) PrepareRollback ¶
func (entry *TableEntry) PrepareRollback() (err error)
func (*TableEntry) RecurLoop ¶
func (entry *TableEntry) RecurLoop(processor Processor) (err error)
func (*TableEntry) RemoveEntry ¶
func (entry *TableEntry) RemoveEntry(segment *SegmentEntry) (err error)
func (*TableEntry) RemoveRows ¶
func (entry *TableEntry) RemoveRows(delta uint64) uint64
func (*TableEntry) Set1PC ¶ added in v0.6.0
func (entry *TableEntry) Set1PC()
func (*TableEntry) String ¶
func (entry *TableEntry) String() string
func (*TableEntry) StringLocked ¶
func (entry *TableEntry) StringLocked() string
func (*TableEntry) StringLockedWithLevel ¶ added in v0.6.0
func (entry *TableEntry) StringLockedWithLevel(level common.PPLevel) string
func (*TableEntry) StringWithLevel ¶ added in v0.6.0
func (entry *TableEntry) StringWithLevel(level common.PPLevel) string
type TableMVCCNode ¶ added in v0.6.0
type TableMVCCNode struct { *EntryMVCCNode *txnbase.TxnMVCCNode }
func (*TableMVCCNode) ApplyCommit ¶ added in v0.6.0
func (e *TableMVCCNode) ApplyCommit(index *wal.Index) (err error)
func (*TableMVCCNode) ApplyRollback ¶ added in v0.6.0
func (e *TableMVCCNode) ApplyRollback(index *wal.Index) (err error)
func (*TableMVCCNode) CloneAll ¶ added in v0.6.0
func (e *TableMVCCNode) CloneAll() txnif.MVCCNode
func (*TableMVCCNode) CloneData ¶ added in v0.6.0
func (e *TableMVCCNode) CloneData() txnif.MVCCNode
func (*TableMVCCNode) PrepareCommit ¶ added in v0.6.0
func (e *TableMVCCNode) PrepareCommit() (err error)
func (*TableMVCCNode) ReadFrom ¶ added in v0.6.0
func (e *TableMVCCNode) ReadFrom(r io.Reader) (n int64, err error)
func (*TableMVCCNode) String ¶ added in v0.6.0
func (e *TableMVCCNode) String() string
func (*TableMVCCNode) Update ¶ added in v0.6.0
func (e *TableMVCCNode) Update(vun txnif.MVCCNode)
for create drop in one txn