Documentation
¶
Index ¶
- Constants
- type CatalogCache
- func (cc *CatalogCache) Databases(accountId uint32, ts timestamp.Timestamp) []string
- func (cc *CatalogCache) DeleteDatabase(bat *batch.Batch)
- func (cc *CatalogCache) DeleteTable(bat *batch.Batch)
- func (cc *CatalogCache) GC(ts timestamp.Timestamp)
- func (cc *CatalogCache) GetDatabase(db *DatabaseItem) bool
- func (cc *CatalogCache) GetDeletedTableIndex() int
- func (cc *CatalogCache) GetDeletedTables(cachedIndex int, ts timestamp.Timestamp) []*TableItem
- func (cc *CatalogCache) GetTable(tbl *TableItem) bool
- func (cc *CatalogCache) GetTableById(databaseId, tblId uint64) *TableItem
- func (cc *CatalogCache) InsertColumns(bat *batch.Batch)
- func (cc *CatalogCache) InsertDatabase(bat *batch.Batch)
- func (cc *CatalogCache) InsertTable(bat *batch.Batch)
- func (cc *CatalogCache) Tables(accountId uint32, databaseId uint64, ts timestamp.Timestamp) ([]string, []uint64)
- type DatabaseItem
- type TableItem
Constants ¶
View Source
const ( MO_OFF = 2 MO_ROWID_IDX = 0 MO_TIMESTAMP_IDX = 1 )
View Source
const (
GcBuffer = 128
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CatalogCache ¶
type CatalogCache struct {
// contains filtered or unexported fields
}
catalog cache
func NewCatalog ¶
func NewCatalog() *CatalogCache
func (*CatalogCache) Databases ¶
func (cc *CatalogCache) Databases(accountId uint32, ts timestamp.Timestamp) []string
func (*CatalogCache) DeleteDatabase ¶
func (cc *CatalogCache) DeleteDatabase(bat *batch.Batch)
func (*CatalogCache) DeleteTable ¶
func (cc *CatalogCache) DeleteTable(bat *batch.Batch)
func (*CatalogCache) GC ¶
func (cc *CatalogCache) GC(ts timestamp.Timestamp)
func (*CatalogCache) GetDatabase ¶
func (cc *CatalogCache) GetDatabase(db *DatabaseItem) bool
func (*CatalogCache) GetDeletedTableIndex ¶ added in v0.8.0
func (cc *CatalogCache) GetDeletedTableIndex() int
GetDeletedTableIndex returns the max index of deleted tables slice.
func (*CatalogCache) GetDeletedTables ¶ added in v0.8.0
func (cc *CatalogCache) GetDeletedTables(cachedIndex int, ts timestamp.Timestamp) []*TableItem
GetDeletedTables returns the deleted tables in [cachedIndex+1:] whose timestamp is less than ts.
func (*CatalogCache) GetTable ¶
func (cc *CatalogCache) GetTable(tbl *TableItem) bool
func (*CatalogCache) GetTableById ¶ added in v0.8.0
func (cc *CatalogCache) GetTableById(databaseId, tblId uint64) *TableItem
func (*CatalogCache) InsertColumns ¶
func (cc *CatalogCache) InsertColumns(bat *batch.Batch)
func (*CatalogCache) InsertDatabase ¶
func (cc *CatalogCache) InsertDatabase(bat *batch.Batch)
func (*CatalogCache) InsertTable ¶
func (cc *CatalogCache) InsertTable(bat *batch.Batch)
type DatabaseItem ¶
type TableItem ¶
type TableItem struct {
// table key
AccountId uint32
DatabaseId uint64
Name string
Ts timestamp.Timestamp
// table value
Id uint64
TableDef *plan.TableDef
Defs []engine.TableDef
Rowid types.Rowid
Version uint32
/*
Rowids in mo_columns from replayed logtail.
CORNER CASE:
create table t1(a int);
begin;
drop table t1;
show tables; //no table t1. no item for t1 in mo_columns also.
*/
Rowids []types.Rowid
// table def
Kind string
ViewDef string
Constraint []byte
Comment string
Partitioned int8
Partition string
CreateSql string
CatalogVersion uint32
// primary index
PrimaryIdx int
PrimarySeqnum int
// clusterBy key
ClusterByIdx int
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.