(tctx *tcontext.Context, conn *BaseConn, meta TableMeta, checkPkFields func([]string, []string) error)
| 1023 | } |
| 1024 | |
| 1025 | func selectTiDBRowKeyFields(tctx *tcontext.Context, conn *BaseConn, meta TableMeta, checkPkFields func([]string, []string) error) (pkFields, pkColTypes []string, err error) { |
| 1026 | if meta.HasImplicitRowID() { |
| 1027 | pkFields, pkColTypes = []string{"_tidb_rowid"}, []string{"BIGINT"} |
| 1028 | } else { |
| 1029 | pkFields, pkColTypes, err = GetPrimaryKeyAndColumnTypes(tctx, conn, meta) |
| 1030 | if err == nil { |
| 1031 | if checkPkFields != nil { |
| 1032 | err = checkPkFields(pkFields, pkColTypes) |
| 1033 | } |
| 1034 | } |
| 1035 | } |
| 1036 | return |
| 1037 | } |
| 1038 | |
| 1039 | func checkTiDBTableRegionPkFields(pkFields, pkColTypes []string) (err error) { |
| 1040 | if len(pkFields) != 1 || len(pkColTypes) != 1 { |
no test coverage detected