Documentation ¶
Index ¶
- Constants
- type CatalogCache
- func (cc *CatalogCache) CanServe(ts types.TS) bool
- 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) GetTableByName(databaseID uint64, tableName string) *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) UpdateDuration(start types.TS, end types.TS)
- func (cc *CatalogCache) UpdateStart(ts types.TS)
- type DatabaseItem
- 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) GetTableByName ¶ added in v1.2.0
func (cc *CatalogCache) GetTableByName(databaseID uint64, tableName string) *TableItem
GetTableByName returns the table item whose name is tableName in the database.
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) UpdateDuration ¶ added in v1.2.0
func (cc *CatalogCache) UpdateDuration(start types.TS, end types.TS)
func (*CatalogCache) UpdateStart ¶ added in v1.2.0
func (cc *CatalogCache) UpdateStart(ts types.TS)
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.