Documentation ¶
Index ¶
- Constants
- type ExternalTiDBGlue
- func (e *ExternalTiDBGlue) Close()
- func (e *ExternalTiDBGlue) ExecuteWithLog(ctx context.Context, query string, purpose string, logger log.Logger) error
- func (e *ExternalTiDBGlue) GetDB() (*sql.DB, error)
- func (e *ExternalTiDBGlue) GetParser() *parser.Parser
- func (e *ExternalTiDBGlue) GetSQLExecutor() SQLExecutor
- func (e *ExternalTiDBGlue) GetSession(ctx context.Context) (checkpoints.Session, error)
- func (e ExternalTiDBGlue) GetTables(context.Context, string) ([]*model.TableInfo, error)
- func (e *ExternalTiDBGlue) ObtainStringWithLog(ctx context.Context, query string, purpose string, logger log.Logger) (string, error)
- func (e *ExternalTiDBGlue) OpenCheckpointsDB(ctx context.Context, cfg *config.Config) (checkpoints.CheckpointsDB, error)
- func (e *ExternalTiDBGlue) OwnsSQLExecutor() bool
- func (e *ExternalTiDBGlue) QueryStringsWithLog(ctx context.Context, query string, purpose string, logger log.Logger) (result [][]string, finalErr error)
- func (e *ExternalTiDBGlue) Record(string, uint64)
- type Glue
- type SQLExecutor
Constants ¶
View Source
const ( RecordEstimatedChunk = "EstimatedChunk" RecordFinishedChunk = "FinishedChunk" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExternalTiDBGlue ¶
type ExternalTiDBGlue struct {
// contains filtered or unexported fields
}
func NewExternalTiDBGlue ¶
func NewExternalTiDBGlue(db *sql.DB, sqlMode mysql.SQLMode) *ExternalTiDBGlue
func (*ExternalTiDBGlue) Close ¶
func (e *ExternalTiDBGlue) Close()
func (*ExternalTiDBGlue) ExecuteWithLog ¶
func (*ExternalTiDBGlue) GetParser ¶
func (e *ExternalTiDBGlue) GetParser() *parser.Parser
func (*ExternalTiDBGlue) GetSQLExecutor ¶
func (e *ExternalTiDBGlue) GetSQLExecutor() SQLExecutor
func (*ExternalTiDBGlue) GetSession ¶
func (e *ExternalTiDBGlue) GetSession(ctx context.Context) (checkpoints.Session, error)
func (*ExternalTiDBGlue) ObtainStringWithLog ¶
func (*ExternalTiDBGlue) OpenCheckpointsDB ¶
func (e *ExternalTiDBGlue) OpenCheckpointsDB(ctx context.Context, cfg *config.Config) (checkpoints.CheckpointsDB, error)
func (*ExternalTiDBGlue) OwnsSQLExecutor ¶
func (e *ExternalTiDBGlue) OwnsSQLExecutor() bool
func (*ExternalTiDBGlue) QueryStringsWithLog ¶
func (*ExternalTiDBGlue) Record ¶
func (e *ExternalTiDBGlue) Record(string, uint64)
type Glue ¶
type Glue interface { OwnsSQLExecutor() bool GetSQLExecutor() SQLExecutor GetDB() (*sql.DB, error) GetParser() *parser.Parser GetTables(context.Context, string) ([]*model.TableInfo, error) GetSession(context.Context) (checkpoints.Session, error) OpenCheckpointsDB(context.Context, *config.Config) (checkpoints.CheckpointsDB, error) // Record is used to report some information (key, value) to host TiDB, including progress, stage currently Record(string, uint64) }
type SQLExecutor ¶
type SQLExecutor interface { // ExecuteWithLog and ObtainStringWithLog should support concurrently call and can't assure different calls goes to // same underlying connection ExecuteWithLog(ctx context.Context, query string, purpose string, logger log.Logger) error ObtainStringWithLog(ctx context.Context, query string, purpose string, logger log.Logger) (string, error) QueryStringsWithLog(ctx context.Context, query string, purpose string, logger log.Logger) ([][]string, error) Close() }
Click to show internal directories.
Click to hide internal directories.