(ctx context.Context, qualifiedTblName string)
| 129 | } |
| 130 | |
| 131 | func (d *Driver) showCreateTable(ctx context.Context, qualifiedTblName string) (string, error) { |
| 132 | rows, colInfo, err := d.execStatementSync(ctx, fmt.Sprintf("SHOW CREATE TABLE %s", qualifiedTblName), 0) |
| 133 | if err != nil { |
| 134 | return "", err |
| 135 | } |
| 136 | |
| 137 | if len(rows) != 1 || len(colInfo) != 1 { |
| 138 | return "", errors.New("invalid ddl format") |
| 139 | } |
| 140 | |
| 141 | return rows[0][0], nil |
| 142 | } |
| 143 | |
| 144 | func genMaterializedViewDDL(qualifiedName string, mtViewMeta *storepb.MaterializedViewMetadata, tblProperties string) (string, error) { |
| 145 | builder := strings.Builder{} |
no test coverage detected