MCPcopy Index your code
hub / github.com/pingcap/tidb / NewEncoder

Method NewEncoder

pkg/lightning/backend/encode/encode.go:42–42  ·  view source on GitHub ↗

NewEncoder creates an encoder of a TiDB table.

(ctx context.Context, config *EncodingConfig)

Source from the content-addressed store, hash-verified

40type EncodingBuilder interface {
41 // NewEncoder creates an encoder of a TiDB table.
42 NewEncoder(ctx context.Context, config *EncodingConfig) (Encoder, error)
43 // MakeEmptyRows creates an empty collection of encoded rows.
44 MakeEmptyRows() Rows
45}

Callers 15

TestWriteRowsIgnoreOnDupFunction · 0.95
TestWriteRowsErrorOnDupFunction · 0.95
testStrictModeFunction · 0.95
TestLogicalImportBatchFunction · 0.95
RunListMigrationsFunction · 0.65
RunChecksumTableFunction · 0.65
JSONEffectsFunction · 0.65
JSONToStringFunction · 0.65

Implementers 4

MockEncodingBuilderbr/pkg/mock/encode.go
MockEncodingBuilderMockRecorderbr/pkg/mock/encode.go
encodingBuilderpkg/lightning/backend/local/local.go
encodingBuilderpkg/lightning/backend/tidb/tidb.go

Calls

no outgoing calls

Tested by 15

TestWriteRowsIgnoreOnDupFunction · 0.76
TestWriteRowsErrorOnDupFunction · 0.76
testStrictModeFunction · 0.76
TestLogicalImportBatchFunction · 0.76
TestGBKEncodingFunction · 0.52
TestEncodingFunction · 0.52
writeJSONErrorFunction · 0.52