Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ScanTypeFloat32 = reflect.TypeOf(float32(0)) ScanTypeFloat64 = reflect.TypeOf(float64(0)) ScanTypeInt8 = reflect.TypeOf(int8(0)) ScanTypeInt16 = reflect.TypeOf(int16(0)) ScanTypeInt32 = reflect.TypeOf(int32(0)) ScanTypeInt64 = reflect.TypeOf(int64(0)) ScanTypeNullFloat = reflect.TypeOf(sql.NullFloat64{}) ScanTypeNullInt = reflect.TypeOf(sql.NullInt64{}) ScanTypeNullTime = reflect.TypeOf(nullTime{}) ScanTypeUint8 = reflect.TypeOf(uint8(0)) ScanTypeUint16 = reflect.TypeOf(uint16(0)) ScanTypeUint32 = reflect.TypeOf(uint32(0)) ScanTypeUint64 = reflect.TypeOf(uint64(0)) ScanTypeRawBytes = reflect.TypeOf(sql.RawBytes{}) ScanTypeUnknown = reflect.TypeOf(new(interface{})) )
Functions ¶
func GetScanSlice ¶
func GetScanSlice(types []*sql.ColumnType) []interface{}
func RegisterTableCache ¶
func RegisterTableCache(dbType types.DBType, tableMetaCache TableMetaCache)
RegisterTableCache register the table meta cache for at and xa
Types ¶
type BasicSourceManager ¶
type BasicSourceManager struct {
// contains filtered or unexported fields
}
BasicSourceManager the basic source manager for xa and at
func NewBasicSourceManager ¶
func NewBasicSourceManager() *BasicSourceManager
func (*BasicSourceManager) CreateTableMetaCache ¶
func (dm *BasicSourceManager) CreateTableMetaCache(ctx context.Context, resID string, dbType types.DBType, db *sql.DB) (TableMetaCache, error)
CreateTableMetaCache create a table meta cache
func (*BasicSourceManager) RegisterResource ¶
func (dm *BasicSourceManager) RegisterResource(resource rm.Resource) error
RegisterResource register a model.Resource to be managed by model.Resource Manager
func (*BasicSourceManager) UnregisterResource ¶
func (dm *BasicSourceManager) UnregisterResource(resource rm.Resource) error
type DataSourceManager ¶
type DataSourceManager interface { rm.ResourceManager CreateTableMetaCache(ctx context.Context, resID string, dbType types.DBType, db *sql.DB) (TableMetaCache, error) }
func GetDataSourceManager ¶
func GetDataSourceManager(branchType branch.BranchType) DataSourceManager
type TableMetaCache ¶
type TableMetaCache interface { Init(ctx context.Context, conn *sql.DB) error GetTableMeta(ctx context.Context, dbName, table string) (*types.TableMeta, error) Destroy() error }
TableMetaCache tables metadata cache, default is open
func GetTableCache ¶
func GetTableCache(dbType types.DBType) TableMetaCache
Click to show internal directories.
Click to hide internal directories.