(ctx context.Context, db QueryAble, dbName string)
| 322 | } |
| 323 | |
| 324 | func ShowCreateSchema(ctx context.Context, db QueryAble, dbName string) (r string, err error) { |
| 325 | query := fmt.Sprintf("SHOW CREATE SCHEMA IF NOT EXISTS %s", mysqlconfig.EscapeName(dbName)) |
| 326 | g.Logger.Debug("ShowCreateSchema", "query", query) |
| 327 | row := db.QueryRowContext(ctx, query) |
| 328 | var dummy interface{} |
| 329 | // | Database | Create Database | |
| 330 | err = row.Scan(&dummy, &r) |
| 331 | if err != nil { |
| 332 | return "", errors.Wrap(err, "ShowCreateSchema") |
| 333 | } |
| 334 | return r, nil |
| 335 | } |
| 336 | |
| 337 | func ShowTables(db QueryAble, dbName string, showType bool) (tables []*common.Table, err error) { |
| 338 | // Get table list |
no test coverage detected