Documentation ¶
Index ¶
- Variables
- func EncodeRowForRecord(ctx context.Context, encTable table.Table, sqlMode mysql.SQLMode, ...) string
- func NewEncodingBuilder() encode.EncodingBuilder
- func NewTargetInfoGetter(db *sql.DB) backend.TargetInfoGetter
- func NewTiDBBackend(ctx context.Context, db *sql.DB, cfg *config.Config, ...) backend.Backend
- type TableAutoIDInfo
- type Writer
Constants ¶
This section is empty.
Variables ¶
View Source
var ( FetchRemoteTableModelsConcurrency = 8 FetchRemoteTableModelsBatchSize = 32 )
exported for test.
Functions ¶
func EncodeRowForRecord ¶
func EncodeRowForRecord(ctx context.Context, encTable table.Table, sqlMode mysql.SQLMode, row []types.Datum, columnPermutation []int) string
EncodeRowForRecord encodes a row to a string compatible with INSERT statements.
func NewEncodingBuilder ¶
func NewEncodingBuilder() encode.EncodingBuilder
NewEncodingBuilder creates an EncodingBuilder with TiDB backend implementation.
func NewTargetInfoGetter ¶
func NewTargetInfoGetter(db *sql.DB) backend.TargetInfoGetter
NewTargetInfoGetter creates an TargetInfoGetter with TiDB backend implementation.
func NewTiDBBackend ¶
func NewTiDBBackend( ctx context.Context, db *sql.DB, cfg *config.Config, errorMgr *errormanager.ErrorManager, ) backend.Backend
NewTiDBBackend creates a new TiDB backend using the given database.
The backend does not take ownership of `db`. Caller should close `db` manually after the backend expired.
Types ¶
type TableAutoIDInfo ¶
TableAutoIDInfo is the auto id information of a table.
func FetchTableAutoIDInfos ¶
func FetchTableAutoIDInfos(ctx context.Context, exec dbutil.QueryExecutor, tableName string) ([]*TableAutoIDInfo, error)
FetchTableAutoIDInfos fetches the auto id information of a table.
Click to show internal directories.
Click to hide internal directories.