| 64 | } |
| 65 | |
| 66 | func TransformDMLToSelect(ctx context.Context, tCtx base.TransformContext, statement string, _ string, targetSchema string, tablePrefix string) ([]base.BackupStatement, error) { |
| 67 | statementInfoList, err := prepareTransformation(ctx, tCtx, statement) |
| 68 | if err != nil { |
| 69 | return nil, errors.Wrapf(err, "failed to prepare transformation") |
| 70 | } |
| 71 | |
| 72 | return generateSQL(statementInfoList, targetSchema, tablePrefix) |
| 73 | } |
| 74 | |
| 75 | func generateSQL(statementInfoList []statementInfo, targetSchema string, tablePrefix string) ([]base.BackupStatement, error) { |
| 76 | groupByTable := make(map[string][]statementInfo) |