[#6661] Add support for catalogs in the XMLGenerator
This commit is contained in:
parent
8b74c087c4
commit
d488114b7e
@ -47,6 +47,8 @@ import javax.xml.bind.JAXB;
|
||||
|
||||
import org.jooq.SortOrder;
|
||||
import org.jooq.tools.JooqLogger;
|
||||
import org.jooq.tools.StringUtils;
|
||||
import org.jooq.util.xml.jaxb.Catalog;
|
||||
import org.jooq.util.xml.jaxb.Column;
|
||||
import org.jooq.util.xml.jaxb.Index;
|
||||
import org.jooq.util.xml.jaxb.IndexColumnUsage;
|
||||
@ -89,9 +91,20 @@ public class XMLGenerator extends AbstractGenerator {
|
||||
|
||||
InformationSchema is = new InformationSchema();
|
||||
|
||||
boolean hasNonDefaultCatalogs = false;
|
||||
for (CatalogDefinition c : db.getCatalogs()) {
|
||||
if (!StringUtils.isBlank(c.getName())) {
|
||||
hasNonDefaultCatalogs = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (CatalogDefinition c : db.getCatalogs()) {
|
||||
String catalogName = c.getOutputName();
|
||||
|
||||
if (hasNonDefaultCatalogs)
|
||||
is.getCatalogs().add(new Catalog().withCatalogName(catalogName));
|
||||
|
||||
for (SchemaDefinition s : c.getSchemata()) {
|
||||
String schemaName = s.getOutputName();
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user