package cache

import (
	"database/sql"
)

import (
	"github.com/transaction-wg/seata-golang/pkg/client/at/sql/schema"
)

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

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

var tableMetaCache ITableMetaCache

func SetTableMetaCache(tbMetaCache ITableMetaCache) {
	tableMetaCache = tbMetaCache
}

func GetTableMetaCache() ITableMetaCache {
	return tableMetaCache
}
