Documentation ¶
Index ¶
- Variables
- func GetColumns(tx *Tx, tableName string) ([]schema.ColumnMeta, error)
- func GetIndexes(tx *Tx, tableName string) ([]schema.IndexMeta, error)
- func SetTableMetaCache(tbMetaCache ITableMetaCache)
- type ITableMetaCache
- type MysqlTableMetaCache
- func (cache *MysqlTableMetaCache) FetchSchema(tx *Tx, tableName string) (schema.TableMeta, error)
- func (cache *MysqlTableMetaCache) GetCacheKey(tableName string, resourceId string) string
- func (cache *MysqlTableMetaCache) GetTableMeta(tx *sql.Tx, tableName, resourceId string) (schema.TableMeta, error)
- func (cache *MysqlTableMetaCache) Refresh(tx *sql.Tx, resourceId string)
- type Tx
Constants ¶
This section is empty.
Variables ¶
View Source
var EXPIRE_TIME = 15 * time.Minute
Functions ¶
func GetColumns ¶
func GetColumns(tx *Tx, tableName string) ([]schema.ColumnMeta, error)
func SetTableMetaCache ¶
func SetTableMetaCache(tbMetaCache ITableMetaCache)
Types ¶
type ITableMetaCache ¶
type ITableMetaCache interface { GetTableMeta(tx *sql.Tx, tableName, resourceId string) (schema.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 (*MysqlTableMetaCache) GetCacheKey ¶
func (cache *MysqlTableMetaCache) GetCacheKey(tableName string, resourceId string) string
func (*MysqlTableMetaCache) GetTableMeta ¶
Click to show internal directories.
Click to hide internal directories.