cache

package
v0.0.0-...-e946c5d Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EXPIRE_TIME = 900 * 1000 * time.Microsecond

Functions

func GetColumns

func GetColumns(tx *Tx, tableName string) ([]_struct.ColumnMeta, error)

func GetIndexes

func GetIndexes(tx *Tx, tableName string) ([]_struct.IndexMeta, error)

func SetTableMetaCache

func SetTableMetaCache(tbMetaCache ITableMetaCache)

Types

type ITableMetaCache

type ITableMetaCache interface {
	GetTableMeta(tx *sql.Tx, tableName, resourceId string) (_struct.TableMeta, error)

	Refresh(tx *sql.Tx, resourceId string)
}

func GetTableMetaCache

func GetTableMetaCache() ITableMetaCache

func NewMysqlTableMetaCache

func NewMysqlTableMetaCache(dsn string) ITableMetaCache

type MysqlTableMetaCache

type MysqlTableMetaCache struct {
	// contains filtered or unexported fields
}

func (*MysqlTableMetaCache) FetchSchema

func (cache *MysqlTableMetaCache) FetchSchema(tx *Tx, tableName string) (_struct.TableMeta, error)

func (*MysqlTableMetaCache) GetCacheKey

func (cache *MysqlTableMetaCache) GetCacheKey(tableName string, resourceId string) string

func (*MysqlTableMetaCache) GetTableMeta

func (cache *MysqlTableMetaCache) GetTableMeta(tx *sql.Tx, tableName, resourceId string) (_struct.TableMeta, error)

func (*MysqlTableMetaCache) Refresh

func (cache *MysqlTableMetaCache) Refresh(tx *sql.Tx, resourceId string)

type Tx

type Tx struct {
	*sql.Tx
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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