(ctx context.Context, databaseName string)
| 89 | } |
| 90 | |
| 91 | func (d *Driver) listTablesNames(ctx context.Context, databaseName string) ([]string, error) { |
| 92 | result, err := d.queryStatementWithLimit(ctx, fmt.Sprintf("SHOW TABLES FROM %s", databaseName), 0) |
| 93 | if err != nil { |
| 94 | return nil, errors.Wrap(err, "failed to get version from instance") |
| 95 | } |
| 96 | |
| 97 | var tableNames []string |
| 98 | for _, row := range result.Rows { |
| 99 | if row == nil || len(row.Values) == 0 { |
| 100 | return nil, errors.New("row values have zero length") |
| 101 | } |
| 102 | tableNames = append(tableNames, row.Values[0].GetStringValue()) |
| 103 | } |
| 104 | return tableNames, nil |
| 105 | } |
| 106 | |
| 107 | // getTables fetches table info and returns structed table data. |
| 108 | func (d *Driver) getTables(ctx context.Context, databaseName string) ( |
no test coverage detected