cache

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2023 License: Apache-2.0 Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

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) GetTable

func (cc *CatalogCache) GetTable(tbl *TableItem) bool

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) Tables

func (cc *CatalogCache) Tables(accountId uint32, databaseId uint64,
	ts timestamp.Timestamp) ([]string, []uint64)

type DatabaseItem

type DatabaseItem struct {
	// database key
	AccountId uint32
	Name      string
	Ts        timestamp.Timestamp

	// database value
	Id    uint64
	Rowid types.Rowid
	// contains filtered or unexported fields
}

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

	// table def
	Kind       string
	ViewDef    string
	Constraint []byte
	Comment    string
	Partition  string
	CreateSql  string

	// primary index
	PrimaryIdx int
	// clusterBy key
	ClusterByIdx int
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL