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) GetSchemaVersion(name TableKey) *TableVersion
- 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)
- func (cc *CatalogCache) TraverseDbAndTbl() (dbs []DebugDatabaseItem, tbls []DebugTableItem)
- type DatabaseItem
- type DebugDatabaseItem
- type DebugTableItem
- type TableItem
- type TableKey
- type TableVersion
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) GetSchemaVersion ¶ added in v1.0.0
func (cc *CatalogCache) GetSchemaVersion(name TableKey) *TableVersion
GetSchemaVersion returns the version of table
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)
func (*CatalogCache) TraverseDbAndTbl ¶ added in v1.1.1
func (cc *CatalogCache) TraverseDbAndTbl() (dbs []DebugDatabaseItem, tbls []DebugTableItem)
TODO(ghs) is debug for #13151, will remove later
type DatabaseItem ¶
type DebugDatabaseItem ¶ added in v1.1.1
type DebugDatabaseItem struct {
AccountId uint32
Name string
Ts timestamp.Timestamp
Id uint64
Deleted bool
}
func (*DebugDatabaseItem) String ¶ added in v1.1.1
func (dd *DebugDatabaseItem) String() string
type DebugTableItem ¶ added in v1.1.1
type DebugTableItem struct {
AccountId uint32
DatabaseId uint64
Name string
Ts timestamp.Timestamp
Id uint64
Deleted bool
}
func (*DebugTableItem) String ¶ added in v1.1.1
func (dt *DebugTableItem) String() string
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.