(catalog *v1pb.DatabaseCatalog)
| 207 | } |
| 208 | |
| 209 | func convertDatabaseCatalog(catalog *v1pb.DatabaseCatalog) *storepb.DatabaseConfig { |
| 210 | c := &storepb.DatabaseConfig{} |
| 211 | for _, sc := range catalog.Schemas { |
| 212 | s := &storepb.SchemaCatalog{Name: sc.Name} |
| 213 | for _, tc := range sc.Tables { |
| 214 | s.Tables = append(s.Tables, convertV1TableCatalog(tc)) |
| 215 | } |
| 216 | c.Schemas = append(c.Schemas, s) |
| 217 | } |
| 218 | return c |
| 219 | } |
| 220 | |
| 221 | // validateCatalogSchemaNames rejects empty schema names for engines that use |
| 222 | // named schemas. Engines like Cassandra/MySQL where metadata has empty schema |
no test coverage detected