[#875] Add XMLGenerator to export an INFORMATION_SCHEMA.xml

[#1434] Add UniqueKeyDefinition.isPrimaryKey() for completeness
[-] Removed
CONSTRAINT_COLUMN_USAGE from HSQLDB generated
INFORMATION_SCHEMA classes
This commit is contained in:
Lukas Eder 2012-05-20 21:31:01 +02:00
parent e0a66e56ad
commit d905d6b9e0
25 changed files with 1304 additions and 363 deletions

View File

@ -0,0 +1,194 @@
/**
* Copyright (c) 2009-2012, Lukas Eder, lukas.eder@gmail.com
* All rights reserved.
*
* This software is licensed to you under the Apache License, Version 2.0
* (the "License"); You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* . Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* . Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* . Neither the name "jOOQ" nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
package org.jooq.util;
/**
* A common base implementation for {@link Generator} objects
*
* @author Lukas Eder
*/
abstract class AbstractGenerator implements Generator {
boolean generateDeprecated = true;
boolean generateRelations = false;
boolean generateNavigationMethods = true;
boolean generateInstanceFields = true;
boolean generateGeneratedAnnotation = true;
boolean generateRecords = true;
boolean generatePojos = false;
boolean generateDaos = false;
boolean generateJPAAnnotations = false;
boolean generateValidationAnnotations = false;
GeneratorStrategyWrapper strategy;
@Override
public void setStrategy(GeneratorStrategy strategy) {
this.strategy = new GeneratorStrategyWrapper(this, strategy);
}
@Override
public GeneratorStrategy getStrategy() {
return strategy;
}
@Override
public boolean generateDeprecated() {
return generateDeprecated;
}
@Override
public void setGenerateDeprecated(boolean generateDeprecated) {
this.generateDeprecated = generateDeprecated;
}
@Override
public boolean generateRelations() {
return generateRelations;
}
@Override
public void setGenerateRelations(boolean generateRelations) {
this.generateRelations = generateRelations;
}
@Override
public boolean generateInstanceFields() {
return generateInstanceFields;
}
@Override
public boolean generateNavigationMethods() {
return generateNavigationMethods;
}
@Override
public void setGenerateNavigationMethods(boolean generateNavigationMethods) {
this.generateNavigationMethods = generateNavigationMethods;
}
@Override
public void setGenerateInstanceFields(boolean generateInstanceFields) {
this.generateInstanceFields = generateInstanceFields;
}
@Override
public boolean generateGeneratedAnnotation() {
return generateGeneratedAnnotation;
}
@Override
public void setGenerateGeneratedAnnotation(boolean generateGeneratedAnnotation) {
this.generateGeneratedAnnotation = generateGeneratedAnnotation;
}
@Override
public boolean generateRecords() {
// [#1280] When DAOs are generated, Records must be generated, too
return generateRecords || generateDaos;
}
@Override
public void setGenerateRecords(boolean generateRecords) {
this.generateRecords = generateRecords;
}
@Override
public boolean generatePojos() {
// [#1280] When DAOs are generated, POJOs must be generated, too
return generatePojos || generateDaos;
}
@Override
public void setGeneratePojos(boolean generatePojos) {
this.generatePojos = generatePojos;
}
@Override
public boolean generateDaos() {
return generateDaos;
}
@Override
public void setGenerateDaos(boolean generateDaos) {
this.generateDaos = generateDaos;
}
@Override
public boolean generateJPAAnnotations() {
return generateJPAAnnotations;
}
@Override
public void setGenerateJPAAnnotations(boolean generateJPAAnnotations) {
this.generateJPAAnnotations = generateJPAAnnotations;
}
@Override
public boolean generateValidationAnnotations() {
return generateValidationAnnotations;
}
@Override
public void setGenerateValidationAnnotations(boolean generateValidationAnnotations) {
this.generateValidationAnnotations = generateValidationAnnotations;
}
// ----
@Override
public void setTargetDirectory(String directory) {
strategy.setTargetDirectory(directory);
}
@Override
public String getTargetDirectory() {
return strategy.getTargetDirectory();
}
@Override
public void setTargetPackage(String packageName) {
strategy.setTargetPackage(packageName);
}
@Override
public String getTargetPackage() {
return strategy.getTargetPackage();
}
}

View File

@ -99,168 +99,19 @@ import org.jooq.util.GeneratorStrategy.Mode;
/**
* A default implementation for code generation. Replace this code with your own
* logic, if you need your database schema represented in a different way.
* A default implementation for code generation.
* <p>
* Replace this code with your own logic, if you need your database schema
* represented in a different way.
* <p>
* Note that you can also extend this class to generate POJO's or other stuff
* entirely independent of jOOQ.
*
* @author Lukas Eder
*/
public class DefaultGenerator implements Generator {
public class DefaultGenerator extends AbstractGenerator {
private static final JooqLogger log = JooqLogger.getLogger(DefaultGenerator.class);
private boolean generateDeprecated = true;
private boolean generateRelations = false;
private boolean generateNavigationMethods = true;
private boolean generateInstanceFields = true;
private boolean generateGeneratedAnnotation = true;
private boolean generateRecords = true;
private boolean generatePojos = false;
private boolean generateDaos = false;
private boolean generateJPAAnnotations = false;
private boolean generateValidationAnnotations = false;
private GeneratorStrategyWrapper strategy;
@Override
public void setStrategy(GeneratorStrategy strategy) {
this.strategy = new GeneratorStrategyWrapper(this, strategy);
}
@Override
public GeneratorStrategy getStrategy() {
return strategy;
}
@Override
public boolean generateDeprecated() {
return generateDeprecated;
}
@Override
public void setGenerateDeprecated(boolean generateDeprecated) {
this.generateDeprecated = generateDeprecated;
}
@Override
public boolean generateRelations() {
return generateRelations;
}
@Override
public void setGenerateRelations(boolean generateRelations) {
this.generateRelations = generateRelations;
}
@Override
public boolean generateInstanceFields() {
return generateInstanceFields;
}
@Override
public boolean generateNavigationMethods() {
return generateNavigationMethods;
}
@Override
public void setGenerateNavigationMethods(boolean generateNavigationMethods) {
this.generateNavigationMethods = generateNavigationMethods;
}
@Override
public void setGenerateInstanceFields(boolean generateInstanceFields) {
this.generateInstanceFields = generateInstanceFields;
}
@Override
public boolean generateGeneratedAnnotation() {
return generateGeneratedAnnotation;
}
@Override
public void setGenerateGeneratedAnnotation(boolean generateGeneratedAnnotation) {
this.generateGeneratedAnnotation = generateGeneratedAnnotation;
}
@Override
public boolean generateRecords() {
// [#1280] When DAOs are generated, Records must be generated, too
return generateRecords || generateDaos;
}
@Override
public void setGenerateRecords(boolean generateRecords) {
this.generateRecords = generateRecords;
}
@Override
public boolean generatePojos() {
// [#1280] When DAOs are generated, POJOs must be generated, too
return generatePojos || generateDaos;
}
@Override
public void setGeneratePojos(boolean generatePojos) {
this.generatePojos = generatePojos;
}
@Override
public boolean generateDaos() {
return generateDaos;
}
@Override
public void setGenerateDaos(boolean generateDaos) {
this.generateDaos = generateDaos;
}
@Override
public boolean generateJPAAnnotations() {
return generateJPAAnnotations;
}
@Override
public void setGenerateJPAAnnotations(boolean generateJPAAnnotations) {
this.generateJPAAnnotations = generateJPAAnnotations;
}
@Override
public boolean generateValidationAnnotations() {
return generateValidationAnnotations;
}
@Override
public void setGenerateValidationAnnotations(boolean generateValidationAnnotations) {
this.generateValidationAnnotations = generateValidationAnnotations;
}
// ----
@Override
public void setTargetDirectory(String directory) {
strategy.setTargetDirectory(directory);
}
@Override
public String getTargetDirectory() {
return strategy.getTargetDirectory();
}
@Override
public void setTargetPackage(String packageName) {
strategy.setTargetPackage(packageName);
}
@Override
public String getTargetPackage() {
return strategy.getTargetPackage();
}
// ----
private static final JooqLogger log = JooqLogger.getLogger(DefaultGenerator.class);
@Override
public void generate(Database database) throws IOException {
@ -273,7 +124,7 @@ public class DefaultGenerator implements Generator {
log.info(" target package", getTargetPackage());
log.info("----------------------------------------------------------");
log.info("");
log.info("Generation parameters");
log.info("DefaultGenerator parameters");
log.info("----------------------------------------------------------");
log.info(" strategy", strategy.delegate.getClass());
log.info(" deprecated", generateDeprecated());

View File

@ -0,0 +1,326 @@
/**
* Copyright (c) 2009-2012, Lukas Eder, lukas.eder@gmail.com
* All rights reserved.
*
* This software is licensed to you under the Apache License, Version 2.0
* (the "License"); You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* . Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* . Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* . Neither the name "jOOQ" nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
package org.jooq.util;
import java.io.File;
import java.io.IOException;
import java.io.StringWriter;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.JAXB;
import org.jooq.tools.JooqLogger;
import org.jooq.tools.StopWatch;
import org.jooq.util.information_schema.ColumnsRecordType;
import org.jooq.util.information_schema.ConstraintType;
import org.jooq.util.information_schema.InformationSchemaType;
import org.jooq.util.information_schema.KeyColumnUsageRecordType;
import org.jooq.util.information_schema.ParameterModeType;
import org.jooq.util.information_schema.ParametersRecordType;
import org.jooq.util.information_schema.ReferentialConstraintsRecordType;
import org.jooq.util.information_schema.RoutinesRecordType;
import org.jooq.util.information_schema.SchemataRecordType;
import org.jooq.util.information_schema.SequencesRecordType;
import org.jooq.util.information_schema.TableConstraintsRecordType;
import org.jooq.util.information_schema.TablesRecordType;
import org.jooq.util.information_schema.YesOrNoType;
/**
* A generator for the INFORMATION_SCHEMA.xml file
* <p>
* Use this generator to transform your schema meta information into an XML file
* that describes your schema according to the SQL standard INFORMATION SCHEMA.
*
* @author Lukas Eder
*/
public class XMLGenerator extends AbstractGenerator {
private static final JooqLogger log = JooqLogger.getLogger(XMLGenerator.class);
@Override
public void generate(Database database) throws IOException {
StopWatch watch = new StopWatch();
log.info("Database parameters");
log.info("----------------------------------------------------------");
log.info(" dialect", database.getDialect());
log.info(" target dir", getTargetDirectory());
log.info("----------------------------------------------------------");
log.info("");
log.info("XMLGenerator parameters");
log.info("----------------------------------------------------------");
log.info(" N/A");
log.info("----------------------------------------------------------");
InformationSchemaType is = new InformationSchemaType();
// ---------------------------------------------------------------------
// XXX: INFORMATION_SCHEMA.SCHEMATA
// ---------------------------------------------------------------------
for (SchemaDefinition schema : database.getSchemata()) {
SchemataRecordType record = new SchemataRecordType();
record.setSCHEMANAME(schema.getOutputName());
is.getSCHEMATA().add(record);
}
// ---------------------------------------------------------------------
// XXX: INFORMATION_SCHEMA.TABLES
// ---------------------------------------------------------------------
for (TableDefinition table : database.getTables(null)) {
TablesRecordType rec = new TablesRecordType();
SchemaDefinition schema = table.getSchema();
if (schema != null) {
rec.setTABLESCHEMA(schema.getOutputName());
}
rec.setTABLENAME(table.getOutputName());
is.getTABLES().add(rec);
// -----------------------------------------------------------------
// XXX: INFORMATION_SCHEMA.COLUMNS
// -----------------------------------------------------------------
for (ColumnDefinition column : table.getColumns()) {
ColumnsRecordType record = new ColumnsRecordType();
if (schema != null) {
record.setTABLESCHEMA(schema.getOutputName());
}
record.setTABLENAME(table.getOutputName());
record.setCOLUMNNAME(column.getOutputName());
record.setORDINALPOSITION(column.getPosition());
record.setISIDENTITY(yn(column.isIdentity()));
record.setISNULLABLE(yn(column.isNullable()));
// TODO: add data type information
is.getCOLUMNS().add(record);
}
// -----------------------------------------------------------------
// XXX: INFORMATION_SCHEMA.TABLE_CONSTRAINTS
// -----------------------------------------------------------------
for (UniqueKeyDefinition uniqueKey : table.getUniqueKeys()) {
TableConstraintsRecordType record = new TableConstraintsRecordType();
if (schema != null) {
record.setCONSTRAINTSCHEMA(schema.getOutputName());
record.setTABLESCHEMA(schema.getOutputName());
}
record.setCONSTRAINTNAME(uniqueKey.getName());
record.setCONSTRAINTTYPE(uniqueKey.isPrimaryKey() ? ConstraintType.PRIMARY_KEY : ConstraintType.UNIQUE);
record.setTABLENAME(table.getOutputName());
is.getTABLECONSTRAINTS().add(record);
}
for (ForeignKeyDefinition foreignKey : table.getForeignKeys()) {
TableConstraintsRecordType record = new TableConstraintsRecordType();
if (schema != null) {
record.setCONSTRAINTSCHEMA(schema.getOutputName());
record.setTABLESCHEMA(schema.getOutputName());
}
record.setCONSTRAINTNAME(foreignKey.getName());
record.setCONSTRAINTTYPE(ConstraintType.FOREIGN_KEY);
record.setTABLENAME(table.getOutputName());
is.getTABLECONSTRAINTS().add(record);
}
// -----------------------------------------------------------------
// XXX: INFORMATION_SCHEMA.KEY_COLUMN_USAGE
// -----------------------------------------------------------------
for (UniqueKeyDefinition uniqueKey : table.getUniqueKeys()) {
for (ColumnDefinition column : uniqueKey.getKeyColumns()) {
KeyColumnUsageRecordType record = new KeyColumnUsageRecordType();
if (schema != null) {
record.setCONSTRAINTSCHEMA(schema.getOutputName());
record.setTABLESCHEMA(schema.getOutputName());
}
record.setTABLENAME(table.getOutputName());
record.setCOLUMNNAME(column.getName());
record.setCONSTRAINTNAME(uniqueKey.getName());
record.setORDINALPOSITION(column.getPosition());
is.getKEYCOLUMNUSAGE().add(record);
}
}
for (ForeignKeyDefinition foreignKey : table.getForeignKeys()) {
for (ColumnDefinition column : foreignKey.getKeyColumns()) {
KeyColumnUsageRecordType record = new KeyColumnUsageRecordType();
if (schema != null) {
record.setCONSTRAINTSCHEMA(schema.getOutputName());
record.setTABLESCHEMA(schema.getOutputName());
}
record.setTABLENAME(table.getOutputName());
record.setCOLUMNNAME(column.getName());
record.setCONSTRAINTNAME(foreignKey.getName());
is.getKEYCOLUMNUSAGE().add(record);
}
}
// -----------------------------------------------------------------
// XXX: INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS
// -----------------------------------------------------------------
for (ForeignKeyDefinition foreignKey : table.getForeignKeys()) {
UniqueKeyDefinition uniqueKey = foreignKey.getReferencedKey();
ReferentialConstraintsRecordType record = new ReferentialConstraintsRecordType();
if (schema != null) {
record.setCONSTRAINTSCHEMA(schema.getOutputName());
record.setUNIQUECONSTRAINTSCHEMA(uniqueKey.getSchema().getOutputName());
}
record.setCONSTRAINTNAME(foreignKey.getName());
record.setUNIQUECONSTRAINTNAME(uniqueKey.getName());
is.getREFERENTIALCONSTRAINTS().add(record);
}
}
// -----------------------------------------------------------------
// XXX: INFORMATION_SCHEMA.SEQUENCES
// -----------------------------------------------------------------
for (SequenceDefinition sequence : database.getSequences(null)) {
SequencesRecordType record = new SequencesRecordType();
SchemaDefinition schema = sequence.getSchema();
if (schema != null) {
record.setSEQUENCESCHEMA(schema.getOutputName());
}
record.setSEQUENCENAME(sequence.getOutputName());
// TODO set data type
is.getSEQUENCES().add(record);
}
// ---------------------------------------------------------------------
// XXX: INFORMATION_SCHEMA.ROUTINES
// ---------------------------------------------------------------------
List<RoutineDefinition> routines = new ArrayList<RoutineDefinition>();
routines.addAll(database.getRoutines(null));
for (PackageDefinition pkg : database.getPackages(null)) {
routines.addAll(pkg.getRoutines());
}
for (RoutineDefinition routine : routines) {
RoutinesRecordType rec = new RoutinesRecordType();
SchemaDefinition schema = routine.getSchema();
if (schema != null) {
rec.setROUTINESCHEMA(schema.getOutputName());
rec.setSPECIFICSCHEMA(schema.getOutputName());
}
if (routine.getPackage() != null) {
if (schema != null) {
rec.setMODULESCHEMA(schema.getOutputName());
}
rec.setMODULENAME(routine.getPackage().getOutputName());
rec.setSCHEMALEVELROUTINE(YesOrNoType.NO);
}
else {
rec.setSCHEMALEVELROUTINE(YesOrNoType.YES);
}
rec.setROUTINENAME(routine.getOutputName());
rec.setSPECIFICNAME(routine.getOutputName());
// TODO deal with UDTs
// TODO set data type
int position = 1;
for (ParameterDefinition parameter : routine.getAllParameters()) {
ParametersRecordType record = new ParametersRecordType();
if (schema != null) {
record.setSPECIFICSCHEMA(schema.getOutputName());
}
record.setSPECIFICNAME(routine.getName());
record.setPARAMETERNAME(parameter.getName());
record.setORDINALPOSITION(position++);
if (routine.getInParameters().contains(parameter)) {
if (routine.getOutParameters().contains(parameter)) {
record.setPARAMETERMODE(ParameterModeType.INOUT);
}
else {
record.setPARAMETERMODE(ParameterModeType.IN);
}
}
else {
record.setPARAMETERMODE(ParameterModeType.OUT);
}
// TODO set data type
// TODO [#1435] use ParameterDefinition.getPosition()
// TODO [#1436] use ParameterDefinition.getMode()
is.getPARAMETERS().add(record);
}
is.getROUTINES().add(rec);
}
GenerationWriter out = new GenerationWriter(new File(getTargetDirectory(), "INFORMATION_SCHEMA.xml"));
StringWriter writer = new StringWriter();
JAXB.marshal(is, writer);
out.print(writer.toString());
out.close();
watch.splitInfo("GENERATION FINISHED!");
}
private YesOrNoType yn(boolean value) {
return value ? YesOrNoType.YES : YesOrNoType.NO;
}
}

View File

@ -45,44 +45,85 @@
<version>0.8.1</version>
<executions>
<execution>
<id>information_schema</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<extension>true</extension>
<strict>false</strict>
<schemaDirectory>src/main/resources/xsd</schemaDirectory>
<schemaIncludes>
<include>information-schema-2.4.0.xsd</include>
</schemaIncludes>
<generatePackage>org.jooq.util.information_schema</generatePackage>
<args>
<arg>-Xxew</arg>
<arg>-Xxew:instantiate lazy</arg>
<arg>-Xxew:delete</arg>
<arg>-Xfluent-api</arg>
<arg>-Xdefault-value</arg>
</args>
<plugins>
<plugin>
<groupId>com.github.jaxb-xew-plugin</groupId>
<artifactId>jaxb-xew-plugin</artifactId>
<version>1.0</version>
</plugin>
<plugin>
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-fluent-api</artifactId>
<version>3.0</version>
</plugin>
<plugin>
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-default-value</artifactId>
<version>1.1</version>
</plugin>
</plugins>
</configuration>
</execution>
<execution>
<id>configuration</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<extension>true</extension>
<strict>false</strict>
<schemaDirectory>src/main/resources/xsd</schemaDirectory>
<schemaIncludes>
<include>jooq-codegen-2.4.0.xsd</include>
</schemaIncludes>
<generatePackage>org.jooq.util.jaxb</generatePackage>
<args>
<arg>-Xxew</arg>
<arg>-Xxew:instantiate lazy</arg>
<arg>-Xxew:delete</arg>
<arg>-Xfluent-api</arg>
<arg>-Xdefault-value</arg>
</args>
<plugins>
<plugin>
<groupId>com.github.jaxb-xew-plugin</groupId>
<artifactId>jaxb-xew-plugin</artifactId>
<version>1.0</version>
</plugin>
<plugin>
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-fluent-api</artifactId>
<version>3.0</version>
</plugin>
<plugin>
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-default-value</artifactId>
<version>1.1</version>
</plugin>
</plugins>
</configuration>
</execution>
</executions>
<configuration>
<extension>true</extension>
<strict>false</strict>
<schemaDirectory>src/main/resources/xsd</schemaDirectory>
<schemaIncludes>
<include>jooq-codegen-2.4.0.xsd</include>
</schemaIncludes>
<generatePackage>org.jooq.util.jaxb</generatePackage>
<args>
<arg>-Xxew</arg>
<arg>-Xxew:instantiate lazy</arg>
<arg>-Xxew:delete</arg>
<arg>-Xfluent-api</arg>
<arg>-Xdefault-value</arg>
</args>
<plugins>
<plugin>
<groupId>com.github.jaxb-xew-plugin</groupId>
<artifactId>jaxb-xew-plugin</artifactId>
<version>1.0</version>
</plugin>
<plugin>
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-fluent-api</artifactId>
<version>3.0</version>
</plugin>
<plugin>
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-default-value</artifactId>
<version>1.1</version>
</plugin>
</plugins>
</configuration>
</plugin>
<plugin>

View File

@ -78,7 +78,7 @@ public class DefaultRelations implements Relations {
UniqueKeyDefinition key = uniqueKeys.get(key(column, keyName));
if (key == null) {
key = new DefaultUniqueKeyDefinition(column.getSchema(), keyName, column.getContainer());
key = new DefaultUniqueKeyDefinition(column.getSchema(), keyName, column.getContainer(), isPK);
uniqueKeys.put(key(column, keyName), key);
if (isPK) {

View File

@ -44,13 +44,20 @@ public class DefaultUniqueKeyDefinition extends AbstractDefinition implements Un
private final List<ForeignKeyDefinition> foreignKeys;
private final List<ColumnDefinition> keyColumns;
private final TableDefinition table;
private final boolean isPrimaryKey;
public DefaultUniqueKeyDefinition(SchemaDefinition schema, String name, TableDefinition table) {
public DefaultUniqueKeyDefinition(SchemaDefinition schema, String name, TableDefinition table, boolean isPrimaryKey) {
super(schema.getDatabase(), schema, name, null);
this.foreignKeys = new ArrayList<ForeignKeyDefinition>();
this.keyColumns = new ArrayList<ColumnDefinition>();
this.table = table;
this.isPrimaryKey = isPrimaryKey;
}
@Override
public boolean isPrimaryKey() {
return isPrimaryKey;
}
@Override

View File

@ -47,6 +47,11 @@ import java.util.List;
*/
public interface UniqueKeyDefinition extends Definition {
/**
* Whether this unique key is the primary key
*/
boolean isPrimaryKey();
/**
* The list of columns making up the primary key.
*/

View File

@ -6,11 +6,11 @@ package org.jooq.util.hsqldb.information_schema;
/**
* This class is generated by jOOQ.
*/
@javax.annotation.Generated(value = {"http://www.jooq.org", "2.3.0"},
@javax.annotation.Generated(value = {"http://www.jooq.org", "2.4.0"},
comments = "This class is generated by jOOQ")
public class InformationSchema extends org.jooq.impl.SchemaImpl {
private static final long serialVersionUID = 688591995;
private static final long serialVersionUID = -1496897811;
/**
* The singleton instance of INFORMATION_SCHEMA
@ -28,7 +28,6 @@ public class InformationSchema extends org.jooq.impl.SchemaImpl {
public final java.util.List<org.jooq.Table<?>> getTables() {
return java.util.Arrays.<org.jooq.Table<?>>asList(
org.jooq.util.hsqldb.information_schema.tables.Columns.COLUMNS,
org.jooq.util.hsqldb.information_schema.tables.ConstraintColumnUsage.CONSTRAINT_COLUMN_USAGE,
org.jooq.util.hsqldb.information_schema.tables.ElementTypes.ELEMENT_TYPES,
org.jooq.util.hsqldb.information_schema.tables.KeyColumnUsage.KEY_COLUMN_USAGE,
org.jooq.util.hsqldb.information_schema.tables.Parameters.PARAMETERS,

View File

@ -6,11 +6,11 @@ package org.jooq.util.hsqldb.information_schema;
/**
* This class is generated by jOOQ.
*/
@javax.annotation.Generated(value = {"http://www.jooq.org", "2.3.0"},
@javax.annotation.Generated(value = {"http://www.jooq.org", "2.4.0"},
comments = "This class is generated by jOOQ")
public class InformationSchemaFactory extends org.jooq.util.hsqldb.HSQLDBFactory {
private static final long serialVersionUID = 612688309;
private static final long serialVersionUID = 1709007759;
/**
* Create a factory with a connection
@ -19,6 +19,8 @@ public class InformationSchemaFactory extends org.jooq.util.hsqldb.HSQLDBFactory
*/
public InformationSchemaFactory(java.sql.Connection connection) {
super(connection);
initDefaultSchema();
}
/**
@ -29,5 +31,16 @@ public class InformationSchemaFactory extends org.jooq.util.hsqldb.HSQLDBFactory
*/
public InformationSchemaFactory(java.sql.Connection connection, org.jooq.conf.Settings settings) {
super(connection, settings);
initDefaultSchema();
}
/**
* Initialise the render mapping's default schema.
* <p>
* For convenience, this schema-specific factory should override any pre-existing setting
*/
private final void initDefaultSchema() {
org.jooq.conf.SettingsTools.getRenderMapping(getSettings()).setDefaultSchema(org.jooq.util.hsqldb.information_schema.InformationSchema.INFORMATION_SCHEMA.getName());
}
}

View File

@ -8,7 +8,7 @@ package org.jooq.util.hsqldb.information_schema;
*
* Convenience access to all tables in INFORMATION_SCHEMA
*/
@javax.annotation.Generated(value = {"http://www.jooq.org", "2.3.0"},
@javax.annotation.Generated(value = {"http://www.jooq.org", "2.4.0"},
comments = "This class is generated by jOOQ")
public final class Tables {
@ -17,11 +17,6 @@ public final class Tables {
*/
public static org.jooq.util.hsqldb.information_schema.tables.Columns COLUMNS = org.jooq.util.hsqldb.information_schema.tables.Columns.COLUMNS;
/**
* The table INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE
*/
public static org.jooq.util.hsqldb.information_schema.tables.ConstraintColumnUsage CONSTRAINT_COLUMN_USAGE = org.jooq.util.hsqldb.information_schema.tables.ConstraintColumnUsage.CONSTRAINT_COLUMN_USAGE;
/**
* The table INFORMATION_SCHEMA.ELEMENT_TYPES
*/

View File

@ -6,28 +6,23 @@ package org.jooq.util.hsqldb.information_schema.tables;
/**
* This class is generated by jOOQ.
*/
@javax.annotation.Generated(value = {"http://www.jooq.org", "2.3.0"},
@javax.annotation.Generated(value = {"http://www.jooq.org", "2.4.0"},
comments = "This class is generated by jOOQ")
public class Columns extends org.jooq.impl.TableImpl<org.jooq.Record> {
private static final long serialVersionUID = 730335754;
private static final long serialVersionUID = 716161733;
/**
* The singleton instance of INFORMATION_SCHEMA.COLUMNS
*/
public static final org.jooq.util.hsqldb.information_schema.tables.Columns COLUMNS = new org.jooq.util.hsqldb.information_schema.tables.Columns();
/**
* The class holding records for this type
*/
private static final java.lang.Class<org.jooq.Record> __RECORD_TYPE = org.jooq.Record.class;
/**
* The class holding records for this type
*/
@Override
public java.lang.Class<org.jooq.Record> getRecordType() {
return __RECORD_TYPE;
return org.jooq.Record.class;
}
/**

View File

@ -1,80 +0,0 @@
/**
* This class is generated by jOOQ
*/
package org.jooq.util.hsqldb.information_schema.tables;
/**
* This class is generated by jOOQ.
*/
@javax.annotation.Generated(value = {"http://www.jooq.org", "2.3.0"},
comments = "This class is generated by jOOQ")
public class ConstraintColumnUsage extends org.jooq.impl.TableImpl<org.jooq.Record> {
private static final long serialVersionUID = -1433884199;
/**
* The singleton instance of INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE
*/
public static final org.jooq.util.hsqldb.information_schema.tables.ConstraintColumnUsage CONSTRAINT_COLUMN_USAGE = new org.jooq.util.hsqldb.information_schema.tables.ConstraintColumnUsage();
/**
* The class holding records for this type
*/
private static final java.lang.Class<org.jooq.Record> __RECORD_TYPE = org.jooq.Record.class;
/**
* The class holding records for this type
*/
@Override
public java.lang.Class<org.jooq.Record> getRecordType() {
return __RECORD_TYPE;
}
/**
* An uncommented item
*/
public final org.jooq.TableField<org.jooq.Record, java.lang.String> TABLE_CATALOG = createField("TABLE_CATALOG", org.jooq.impl.SQLDataType.VARCHAR, this);
/**
* An uncommented item
*/
public final org.jooq.TableField<org.jooq.Record, java.lang.String> TABLE_SCHEMA = createField("TABLE_SCHEMA", org.jooq.impl.SQLDataType.VARCHAR, this);
/**
* An uncommented item
*/
public final org.jooq.TableField<org.jooq.Record, java.lang.String> TABLE_NAME = createField("TABLE_NAME", org.jooq.impl.SQLDataType.VARCHAR, this);
/**
* An uncommented item
*/
public final org.jooq.TableField<org.jooq.Record, java.lang.String> COLUMN_NAME = createField("COLUMN_NAME", org.jooq.impl.SQLDataType.VARCHAR, this);
/**
* An uncommented item
*/
public final org.jooq.TableField<org.jooq.Record, java.lang.String> CONSTRAINT_CATALOG = createField("CONSTRAINT_CATALOG", org.jooq.impl.SQLDataType.VARCHAR, this);
/**
* An uncommented item
*/
public final org.jooq.TableField<org.jooq.Record, java.lang.String> CONSTRAINT_SCHEMA = createField("CONSTRAINT_SCHEMA", org.jooq.impl.SQLDataType.VARCHAR, this);
/**
* An uncommented item
*/
public final org.jooq.TableField<org.jooq.Record, java.lang.String> CONSTRAINT_NAME = createField("CONSTRAINT_NAME", org.jooq.impl.SQLDataType.VARCHAR, this);
public ConstraintColumnUsage() {
super("CONSTRAINT_COLUMN_USAGE", org.jooq.util.hsqldb.information_schema.InformationSchema.INFORMATION_SCHEMA);
}
public ConstraintColumnUsage(java.lang.String alias) {
super(alias, org.jooq.util.hsqldb.information_schema.InformationSchema.INFORMATION_SCHEMA, org.jooq.util.hsqldb.information_schema.tables.ConstraintColumnUsage.CONSTRAINT_COLUMN_USAGE);
}
@Override
public org.jooq.util.hsqldb.information_schema.tables.ConstraintColumnUsage as(java.lang.String alias) {
return new org.jooq.util.hsqldb.information_schema.tables.ConstraintColumnUsage(alias);
}
}

View File

@ -6,28 +6,23 @@ package org.jooq.util.hsqldb.information_schema.tables;
/**
* This class is generated by jOOQ.
*/
@javax.annotation.Generated(value = {"http://www.jooq.org", "2.3.0"},
@javax.annotation.Generated(value = {"http://www.jooq.org", "2.4.0"},
comments = "This class is generated by jOOQ")
public class ElementTypes extends org.jooq.impl.TableImpl<org.jooq.Record> {
private static final long serialVersionUID = -1943758981;
private static final long serialVersionUID = 521837036;
/**
* The singleton instance of INFORMATION_SCHEMA.ELEMENT_TYPES
*/
public static final org.jooq.util.hsqldb.information_schema.tables.ElementTypes ELEMENT_TYPES = new org.jooq.util.hsqldb.information_schema.tables.ElementTypes();
/**
* The class holding records for this type
*/
private static final java.lang.Class<org.jooq.Record> __RECORD_TYPE = org.jooq.Record.class;
/**
* The class holding records for this type
*/
@Override
public java.lang.Class<org.jooq.Record> getRecordType() {
return __RECORD_TYPE;
return org.jooq.Record.class;
}
/**

View File

@ -6,28 +6,23 @@ package org.jooq.util.hsqldb.information_schema.tables;
/**
* This class is generated by jOOQ.
*/
@javax.annotation.Generated(value = {"http://www.jooq.org", "2.3.0"},
@javax.annotation.Generated(value = {"http://www.jooq.org", "2.4.0"},
comments = "This class is generated by jOOQ")
public class KeyColumnUsage extends org.jooq.impl.TableImpl<org.jooq.Record> {
private static final long serialVersionUID = -1468929901;
private static final long serialVersionUID = -172117938;
/**
* The singleton instance of INFORMATION_SCHEMA.KEY_COLUMN_USAGE
*/
public static final org.jooq.util.hsqldb.information_schema.tables.KeyColumnUsage KEY_COLUMN_USAGE = new org.jooq.util.hsqldb.information_schema.tables.KeyColumnUsage();
/**
* The class holding records for this type
*/
private static final java.lang.Class<org.jooq.Record> __RECORD_TYPE = org.jooq.Record.class;
/**
* The class holding records for this type
*/
@Override
public java.lang.Class<org.jooq.Record> getRecordType() {
return __RECORD_TYPE;
return org.jooq.Record.class;
}
/**

View File

@ -6,28 +6,23 @@ package org.jooq.util.hsqldb.information_schema.tables;
/**
* This class is generated by jOOQ.
*/
@javax.annotation.Generated(value = {"http://www.jooq.org", "2.3.0"},
@javax.annotation.Generated(value = {"http://www.jooq.org", "2.4.0"},
comments = "This class is generated by jOOQ")
public class Parameters extends org.jooq.impl.TableImpl<org.jooq.Record> {
private static final long serialVersionUID = 1543475117;
private static final long serialVersionUID = 1344780644;
/**
* The singleton instance of INFORMATION_SCHEMA.PARAMETERS
*/
public static final org.jooq.util.hsqldb.information_schema.tables.Parameters PARAMETERS = new org.jooq.util.hsqldb.information_schema.tables.Parameters();
/**
* The class holding records for this type
*/
private static final java.lang.Class<org.jooq.Record> __RECORD_TYPE = org.jooq.Record.class;
/**
* The class holding records for this type
*/
@Override
public java.lang.Class<org.jooq.Record> getRecordType() {
return __RECORD_TYPE;
return org.jooq.Record.class;
}
/**

View File

@ -6,28 +6,23 @@ package org.jooq.util.hsqldb.information_schema.tables;
/**
* This class is generated by jOOQ.
*/
@javax.annotation.Generated(value = {"http://www.jooq.org", "2.3.0"},
@javax.annotation.Generated(value = {"http://www.jooq.org", "2.4.0"},
comments = "This class is generated by jOOQ")
public class ReferentialConstraints extends org.jooq.impl.TableImpl<org.jooq.Record> {
private static final long serialVersionUID = -1952528247;
private static final long serialVersionUID = 398327730;
/**
* The singleton instance of INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS
*/
public static final org.jooq.util.hsqldb.information_schema.tables.ReferentialConstraints REFERENTIAL_CONSTRAINTS = new org.jooq.util.hsqldb.information_schema.tables.ReferentialConstraints();
/**
* The class holding records for this type
*/
private static final java.lang.Class<org.jooq.Record> __RECORD_TYPE = org.jooq.Record.class;
/**
* The class holding records for this type
*/
@Override
public java.lang.Class<org.jooq.Record> getRecordType() {
return __RECORD_TYPE;
return org.jooq.Record.class;
}
/**

View File

@ -6,28 +6,23 @@ package org.jooq.util.hsqldb.information_schema.tables;
/**
* This class is generated by jOOQ.
*/
@javax.annotation.Generated(value = {"http://www.jooq.org", "2.3.0"},
@javax.annotation.Generated(value = {"http://www.jooq.org", "2.4.0"},
comments = "This class is generated by jOOQ")
public class Routines extends org.jooq.impl.TableImpl<org.jooq.Record> {
private static final long serialVersionUID = -106550271;
private static final long serialVersionUID = -1031282270;
/**
* The singleton instance of INFORMATION_SCHEMA.ROUTINES
*/
public static final org.jooq.util.hsqldb.information_schema.tables.Routines ROUTINES = new org.jooq.util.hsqldb.information_schema.tables.Routines();
/**
* The class holding records for this type
*/
private static final java.lang.Class<org.jooq.Record> __RECORD_TYPE = org.jooq.Record.class;
/**
* The class holding records for this type
*/
@Override
public java.lang.Class<org.jooq.Record> getRecordType() {
return __RECORD_TYPE;
return org.jooq.Record.class;
}
/**

View File

@ -6,28 +6,23 @@ package org.jooq.util.hsqldb.information_schema.tables;
/**
* This class is generated by jOOQ.
*/
@javax.annotation.Generated(value = {"http://www.jooq.org", "2.3.0"},
@javax.annotation.Generated(value = {"http://www.jooq.org", "2.4.0"},
comments = "This class is generated by jOOQ")
public class Schemata extends org.jooq.impl.TableImpl<org.jooq.Record> {
private static final long serialVersionUID = 2070767037;
private static final long serialVersionUID = -420534788;
/**
* The singleton instance of INFORMATION_SCHEMA.SCHEMATA
*/
public static final org.jooq.util.hsqldb.information_schema.tables.Schemata SCHEMATA = new org.jooq.util.hsqldb.information_schema.tables.Schemata();
/**
* The class holding records for this type
*/
private static final java.lang.Class<org.jooq.Record> __RECORD_TYPE = org.jooq.Record.class;
/**
* The class holding records for this type
*/
@Override
public java.lang.Class<org.jooq.Record> getRecordType() {
return __RECORD_TYPE;
return org.jooq.Record.class;
}
/**

View File

@ -6,28 +6,23 @@ package org.jooq.util.hsqldb.information_schema.tables;
/**
* This class is generated by jOOQ.
*/
@javax.annotation.Generated(value = {"http://www.jooq.org", "2.3.0"},
@javax.annotation.Generated(value = {"http://www.jooq.org", "2.4.0"},
comments = "This class is generated by jOOQ")
public class Sequences extends org.jooq.impl.TableImpl<org.jooq.Record> {
private static final long serialVersionUID = -616213725;
private static final long serialVersionUID = -770452354;
/**
* The singleton instance of INFORMATION_SCHEMA.SEQUENCES
*/
public static final org.jooq.util.hsqldb.information_schema.tables.Sequences SEQUENCES = new org.jooq.util.hsqldb.information_schema.tables.Sequences();
/**
* The class holding records for this type
*/
private static final java.lang.Class<org.jooq.Record> __RECORD_TYPE = org.jooq.Record.class;
/**
* The class holding records for this type
*/
@Override
public java.lang.Class<org.jooq.Record> getRecordType() {
return __RECORD_TYPE;
return org.jooq.Record.class;
}
/**

View File

@ -6,28 +6,23 @@ package org.jooq.util.hsqldb.information_schema.tables;
/**
* This class is generated by jOOQ.
*/
@javax.annotation.Generated(value = {"http://www.jooq.org", "2.3.0"},
@javax.annotation.Generated(value = {"http://www.jooq.org", "2.4.0"},
comments = "This class is generated by jOOQ")
public class TableConstraints extends org.jooq.impl.TableImpl<org.jooq.Record> {
private static final long serialVersionUID = -522229083;
private static final long serialVersionUID = 2101828900;
/**
* The singleton instance of INFORMATION_SCHEMA.TABLE_CONSTRAINTS
*/
public static final org.jooq.util.hsqldb.information_schema.tables.TableConstraints TABLE_CONSTRAINTS = new org.jooq.util.hsqldb.information_schema.tables.TableConstraints();
/**
* The class holding records for this type
*/
private static final java.lang.Class<org.jooq.Record> __RECORD_TYPE = org.jooq.Record.class;
/**
* The class holding records for this type
*/
@Override
public java.lang.Class<org.jooq.Record> getRecordType() {
return __RECORD_TYPE;
return org.jooq.Record.class;
}
/**

View File

@ -6,28 +6,23 @@ package org.jooq.util.hsqldb.information_schema.tables;
/**
* This class is generated by jOOQ.
*/
@javax.annotation.Generated(value = {"http://www.jooq.org", "2.3.0"},
@javax.annotation.Generated(value = {"http://www.jooq.org", "2.4.0"},
comments = "This class is generated by jOOQ")
public class Tables extends org.jooq.impl.TableImpl<org.jooq.Record> {
private static final long serialVersionUID = -415539098;
private static final long serialVersionUID = 857056825;
/**
* The singleton instance of INFORMATION_SCHEMA.TABLES
*/
public static final org.jooq.util.hsqldb.information_schema.tables.Tables TABLES = new org.jooq.util.hsqldb.information_schema.tables.Tables();
/**
* The class holding records for this type
*/
private static final java.lang.Class<org.jooq.Record> __RECORD_TYPE = org.jooq.Record.class;
/**
* The class holding records for this type
*/
@Override
public java.lang.Class<org.jooq.Record> getRecordType() {
return __RECORD_TYPE;
return org.jooq.Record.class;
}
/**

View File

@ -0,0 +1,579 @@
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://www.jooq.org/xsd/information-schema-2.4.0.xsd"
targetNamespace="http://www.jooq.org/xsd/information-schema-2.4.0.xsd"
elementFormDefault="qualified">
<!--
Global domain objects and types
-->
<simpleType name="YesOrNoType">
<restriction base="string">
<enumeration value="YES"/>
<enumeration value="NO"/>
</restriction>
</simpleType>
<simpleType name="DataType">
<restriction base="string">
<enumeration value="CHARACTER"/>
<enumeration value="CHARACTER VARYING"/>
<enumeration value="CHARACTER LARGE OBJECT"/>
<enumeration value="BINARY"/>
<enumeration value="BINARY VARYING"/>
<enumeration value="BINARY LARGE OBJECT"/>
<enumeration value="TINYINT"/>
<enumeration value="SMALLINT"/>
<enumeration value="INTEGER"/>
<enumeration value="BIGINT"/>
<enumeration value="NUMERIC"/>
<enumeration value="DECIMAL"/>
<enumeration value="REAL"/>
<enumeration value="DOUBLE PRECISION"/>
<enumeration value="FLOAT"/>
<enumeration value="DATE"/>
<enumeration value="TIME"/>
<enumeration value="TIMESTAMP"/>
<enumeration value="TIME WITH TIME ZONE"/>
<enumeration value="TIMESTAMP WITH TIME ZONE"/>
<enumeration value="INTERVAL"/>
<enumeration value="BOOLEAN"/>
<enumeration value="USER-DEFINED"/>
<enumeration value="REF"/>
<enumeration value="ARRAY"/>
<enumeration value="MULTISET"/>
<enumeration value="ROW"/>
</restriction>
</simpleType>
<simpleType name="IntervalType">
<restriction base="string">
<enumeration value="YEAR"/>
<enumeration value="MONTH"/>
<enumeration value="DAY"/>
<enumeration value="HOUR"/>
<enumeration value="MINUTE"/>
<enumeration value="SECOND"/>
<enumeration value="YEAR TO MONTH"/>
<enumeration value="DAY TO HOUR"/>
<enumeration value="DAY TO MINUTE"/>
<enumeration value="DAY TO SECOND"/>
<enumeration value="HOUR TO MINUTE"/>
<enumeration value="HOUR TO SECOND"/>
<enumeration value="MINUTE TO SECOND"/>
</restriction>
</simpleType>
<!--
The root element
-->
<element name="INFORMATION_SCHEMA" type="tns:InformationSchemaType"/>
<complexType name="InformationSchemaType">
<sequence>
<element name="COLUMNS" type="tns:ColumnsType" minOccurs="0" maxOccurs="1"/>
<element name="KEY_COLUMN_USAGE" type="tns:KeyColumnUsageType" minOccurs="0" maxOccurs="1"/>
<element name="PARAMETERS" type="tns:ParametersType" minOccurs="0" maxOccurs="1"/>
<element name="REFERENTIAL_CONSTRAINTS" type="tns:ReferentialConstraintsType" minOccurs="0" maxOccurs="1"/>
<element name="ROUTINES" type="tns:RoutinesType" minOccurs="0" maxOccurs="1"/>
<element name="SCHEMATA" type="tns:SchemataType" minOccurs="0" maxOccurs="1"/>
<element name="SEQUENCES" type="tns:SequencesType" minOccurs="0" maxOccurs="1"/>
<element name="TABLE_CONSTRAINTS" type="tns:TableConstraintsType" minOccurs="0" maxOccurs="1"/>
<element name="TABLES" type="tns:TablesType" minOccurs="0" maxOccurs="1"/>
</sequence>
</complexType>
<!--
INFORMATION_SCHEMA.COLUMNS and related objects
-->
<complexType name="ColumnsType">
<sequence>
<element name="record" type="tns:ColumnsRecordType" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</complexType>
<complexType name="ColumnsRecordType">
<sequence>
<element name="TABLE_CATALOG" type="string" minOccurs="0" maxOccurs="1"/>
<element name="TABLE_SCHEMA" type="string" minOccurs="0" maxOccurs="1"/>
<element name="TABLE_NAME" type="string" minOccurs="0" maxOccurs="1"/>
<element name="COLUMN_NAME" type="string" minOccurs="0" maxOccurs="1"/>
<element name="ORDINAL_POSITION" type="int" minOccurs="0" maxOccurs="1"/>
<element name="COLUMN_DEFAULT" type="string" minOccurs="0" maxOccurs="1"/>
<element name="IS_NULLABLE" type="tns:YesOrNoType" minOccurs="0" maxOccurs="1"/>
<element name="DATA_TYPE" type="tns:DataType" minOccurs="0" maxOccurs="1"/>
<element name="CHARACTER_MAXIMUM_LENGTH" type="int" minOccurs="0" maxOccurs="1"/>
<element name="CHARACTER_OCTET_LENGTH" type="int" minOccurs="0" maxOccurs="1"/>
<element name="NUMERIC_PRECISION" type="int" minOccurs="0" maxOccurs="1"/>
<element name="NUMERIC_PRECISION_RADIX" type="int" minOccurs="0" maxOccurs="1"/>
<element name="NUMERIC_SCALE" type="int" minOccurs="0" maxOccurs="1"/>
<element name="DATETIME_PRECISION" type="int" minOccurs="0" maxOccurs="1"/>
<element name="INTERVAL_TYPE" type="tns:IntervalType" minOccurs="0" maxOccurs="1"/>
<element name="INTERVAL_PRECISION" type="int" minOccurs="0" maxOccurs="1"/>
<element name="CHARACTER_SET_CATALOG" type="string" minOccurs="0" maxOccurs="1"/>
<element name="CHARACTER_SET_SCHEMA" type="string" minOccurs="0" maxOccurs="1"/>
<element name="CHARACTER_SET_NAME" type="string" minOccurs="0" maxOccurs="1"/>
<element name="COLLATION_CATALOG" type="string" minOccurs="0" maxOccurs="1"/>
<element name="COLLATION_SCHEMA" type="string" minOccurs="0" maxOccurs="1"/>
<element name="COLLATION_NAME" type="string" minOccurs="0" maxOccurs="1"/>
<element name="DOMAIN_CATALOG" type="string" minOccurs="0" maxOccurs="1"/>
<element name="DOMAIN_SCHEMA" type="string" minOccurs="0" maxOccurs="1"/>
<element name="DOMAIN_NAME" type="string" minOccurs="0" maxOccurs="1"/>
<element name="USER_DEFINED_TYPE_CATALOG" type="string" minOccurs="0" maxOccurs="1"/>
<element name="USER_DEFINED_TYPE_SCHEMA" type="string" minOccurs="0" maxOccurs="1"/>
<element name="USER_DEFINED_TYPE_NAME" type="string" minOccurs="0" maxOccurs="1"/>
<element name="SCOPE_CATALOG" type="string" minOccurs="0" maxOccurs="1"/>
<element name="SCOPE_SCHEMA" type="string" minOccurs="0" maxOccurs="1"/>
<element name="SCOPE_NAME" type="string" minOccurs="0" maxOccurs="1"/>
<element name="MAXIMUM_CARDINALITY" type="int" minOccurs="0" maxOccurs="1"/>
<element name="DTD_IDENTIFIER" type="string" minOccurs="0" maxOccurs="1"/>
<element name="IS_SELF_REFERENCING" type="tns:YesOrNoType" minOccurs="0" maxOccurs="1"/>
<element name="IS_IDENTITY" type="tns:YesOrNoType" minOccurs="0" maxOccurs="1"/>
<element name="IDENTITY_GENERATION" type="tns:IdentityGenerationType" minOccurs="0" maxOccurs="1"/>
<element name="IDENTITY_START" type="string" minOccurs="0" maxOccurs="1"/>
<element name="IDENTITY_INCREMENT" type="string" minOccurs="0" maxOccurs="1"/>
<element name="IDENTITY_MAXIMUM" type="string" minOccurs="0" maxOccurs="1"/>
<element name="IDENTITY_MINIMUM" type="string" minOccurs="0" maxOccurs="1"/>
<element name="IDENTITY_CYCLE" type="tns:YesOrNoType" minOccurs="0" maxOccurs="1"/>
<element name="IS_GENERATED" type="tns:IsGeneratedType" minOccurs="0" maxOccurs="1"/>
<element name="GENERATION_EXPRESSION" type="string" minOccurs="0" maxOccurs="1"/>
<element name="IS_UPDATABLE" type="tns:YesOrNoType" minOccurs="0" maxOccurs="1"/>
</sequence>
</complexType>
<simpleType name="IdentityGenerationType">
<restriction base="string">
<enumeration value="ALWAYS"/>
<enumeration value="BY DEFAULT"/>
</restriction>
</simpleType>
<simpleType name="IsGeneratedType">
<restriction base="string">
<enumeration value="NEVER"/>
<enumeration value="ALWAYS"/>
</restriction>
</simpleType>
<!--
INFORMATION_SCHEMA.KEY_COLUMN_USAGE and related objects
-->
<complexType name="KeyColumnUsageType">
<sequence>
<element name="record" type="tns:KeyColumnUsageRecordType" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</complexType>
<complexType name="KeyColumnUsageRecordType">
<sequence>
<element name="CONSTRAINT_CATALOG" type="string" minOccurs="0" maxOccurs="1"/>
<element name="CONSTRAINT_SCHEMA" type="string" minOccurs="0" maxOccurs="1"/>
<element name="CONSTRAINT_NAME" type="string" minOccurs="0" maxOccurs="1"/>
<element name="TABLE_CATALOG" type="string" minOccurs="0" maxOccurs="1"/>
<element name="TABLE_SCHEMA" type="string" minOccurs="0" maxOccurs="1"/>
<element name="TABLE_NAME" type="string" minOccurs="0" maxOccurs="1"/>
<element name="COLUMN_NAME" type="string" minOccurs="0" maxOccurs="1"/>
<element name="ORDINAL_POSITION" type="int" minOccurs="0" maxOccurs="1"/>
<element name="POSITION_IN_UNIQUE_CONSTRAINT" type="int" minOccurs="0" maxOccurs="1"/>
</sequence>
</complexType>
<!--
INFORMATION_SCHEMA.PARAMETERS and related objects
-->
<complexType name="ParametersType">
<sequence>
<element name="record" type="tns:ParametersRecordType" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</complexType>
<complexType name="ParametersRecordType">
<sequence>
<element name="SPECIFIC_CATALOG" type="string" minOccurs="0" maxOccurs="1"/>
<element name="SPECIFIC_SCHEMA" type="string" minOccurs="0" maxOccurs="1"/>
<element name="SPECIFIC_NAME" type="string" minOccurs="0" maxOccurs="1"/>
<element name="ORDINAL_POSITION" type="int" minOccurs="0" maxOccurs="1"/>
<element name="PARAMETER_MODE" type="tns:ParameterModeType" minOccurs="0" maxOccurs="1"/>
<element name="IS_RESULT" type="tns:YesOrNoType" minOccurs="0" maxOccurs="1"/>
<element name="AS_LOCATOR" type="tns:YesOrNoType" minOccurs="0" maxOccurs="1"/>
<element name="PARAMETER_NAME" type="string" minOccurs="0" maxOccurs="1"/>
<element name="FROM_SQL_SPECIFIC_CATALOG" type="string" minOccurs="0" maxOccurs="1"/>
<element name="FROM_SQL_SPECIFIC_SCHEMA" type="string" minOccurs="0" maxOccurs="1"/>
<element name="FROM_SQL_SPECIFIC_NAME" type="string" minOccurs="0" maxOccurs="1"/>
<element name="TO_SQL_SPECIFIC_CATALOG" type="string" minOccurs="0" maxOccurs="1"/>
<element name="TO_SQL_SPECIFIC_SCHEMA" type="string" minOccurs="0" maxOccurs="1"/>
<element name="TO_SQL_SPECIFIC_NAME" type="string" minOccurs="0" maxOccurs="1"/>
<element name="DATA_TYPE" type="string" minOccurs="0" maxOccurs="1"/>
<element name="CHARACTER_MAXIMUM_LENGTH" type="int" minOccurs="0" maxOccurs="1"/>
<element name="CHARACTER_OCTET_LENGTH" type="int" minOccurs="0" maxOccurs="1"/>
<element name="CHARACTER_SET_CATALOG" type="string" minOccurs="0" maxOccurs="1"/>
<element name="CHARACTER_SET_SCHEMA" type="string" minOccurs="0" maxOccurs="1"/>
<element name="CHARACTER_SET_NAME" type="string" minOccurs="0" maxOccurs="1"/>
<element name="COLLATION_CATALOG" type="string" minOccurs="0" maxOccurs="1"/>
<element name="COLLATION_SCHEMA" type="string" minOccurs="0" maxOccurs="1"/>
<element name="COLLATION_NAME" type="string" minOccurs="0" maxOccurs="1"/>
<element name="NUMERIC_PRECISION" type="int" minOccurs="0" maxOccurs="1"/>
<element name="NUMERIC_PRECISION_RADIX" type="int" minOccurs="0" maxOccurs="1"/>
<element name="NUMERIC_SCALE" type="int" minOccurs="0" maxOccurs="1"/>
<element name="DATETIME_PRECISION" type="int" minOccurs="0" maxOccurs="1"/>
<element name="INTERVAL_TYPE" type="tns:IntervalType" minOccurs="0" maxOccurs="1"/>
<element name="INTERVAL_PRECISION" type="int" minOccurs="0" maxOccurs="1"/>
<element name="UDT_CATALOG" type="string" minOccurs="0" maxOccurs="1"/>
<element name="UDT_SCHEMA" type="string" minOccurs="0" maxOccurs="1"/>
<element name="UDT_NAME" type="string" minOccurs="0" maxOccurs="1"/>
<element name="SCOPE_CATALOG" type="string" minOccurs="0" maxOccurs="1"/>
<element name="SCOPE_SCHEMA" type="string" minOccurs="0" maxOccurs="1"/>
<element name="SCOPE_NAME" type="string" minOccurs="0" maxOccurs="1"/>
<element name="MAXIMUM_CARDINALITY" type="int" minOccurs="0" maxOccurs="1"/>
<element name="DTD_IDENTIFIER" type="string" minOccurs="0" maxOccurs="1"/>
</sequence>
</complexType>
<simpleType name="ParameterModeType">
<restriction base="string">
<enumeration value="IN"/>
<enumeration value="OUT"/>
<enumeration value="INOUT"/>
</restriction>
</simpleType>
<!--
INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS and related objects
-->
<complexType name="ReferentialConstraintsType">
<sequence>
<element name="record" type="tns:ReferentialConstraintsRecordType" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</complexType>
<complexType name="ReferentialConstraintsRecordType">
<sequence>
<element name="CONSTRAINT_CATALOG" type="string" minOccurs="0" maxOccurs="1"/>
<element name="CONSTRAINT_SCHEMA" type="string" minOccurs="0" maxOccurs="1"/>
<element name="CONSTRAINT_NAME" type="string" minOccurs="0" maxOccurs="1"/>
<element name="UNIQUE_CONSTRAINT_CATALOG" type="string" minOccurs="0" maxOccurs="1"/>
<element name="UNIQUE_CONSTRAINT_SCHEMA" type="string" minOccurs="0" maxOccurs="1"/>
<element name="UNIQUE_CONSTRAINT_NAME" type="string" minOccurs="0" maxOccurs="1"/>
<element name="MATCH_OPTION" type="tns:MatchOptionType" minOccurs="0" maxOccurs="1"/>
<element name="UPDATE_RULE" type="tns:UpdateRuleType" minOccurs="0" maxOccurs="1"/>
<element name="DELETE_RULE" type="tns:DeleteRuleType" minOccurs="0" maxOccurs="1"/>
</sequence>
</complexType>
<simpleType name="MatchOptionType">
<restriction base="string">
<enumeration value="NONE"/>
<enumeration value="PARTIAL"/>
<enumeration value="FULL"/>
</restriction>
</simpleType>
<simpleType name="UpdateRuleType">
<restriction base="string">
<enumeration value="CASCADE"/>
<enumeration value="SET NULL"/>
<enumeration value="SET DEFAULT"/>
<enumeration value="RESTRICT"/>
<enumeration value="NO ACTION"/>
</restriction>
</simpleType>
<simpleType name="DeleteRuleType">
<restriction base="string">
<enumeration value="CASCADE"/>
<enumeration value="SET NULL"/>
<enumeration value="SET DEFAULT"/>
<enumeration value="RESTRICT"/>
<enumeration value="NO ACTION"/>
</restriction>
</simpleType>
<!--
INFORMATION_SCHEMA.ROUTINES and related objects
-->
<complexType name="RoutinesType">
<sequence>
<element name="record" type="tns:RoutinesRecordType" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</complexType>
<complexType name="RoutinesRecordType">
<sequence>
<element name="SPECIFIC_CATALOG" type="string" minOccurs="0" maxOccurs="1"/>
<element name="SPECIFIC_SCHEMA" type="string" minOccurs="0" maxOccurs="1"/>
<element name="SPECIFIC_NAME" type="string" minOccurs="0" maxOccurs="1"/>
<element name="ROUTINE_CATALOG" type="string" minOccurs="0" maxOccurs="1"/>
<element name="ROUTINE_SCHEMA" type="string" minOccurs="0" maxOccurs="1"/>
<element name="ROUTINE_NAME" type="string" minOccurs="0" maxOccurs="1"/>
<element name="ROUTINE_TYPE" type="tns:RoutineType" minOccurs="0" maxOccurs="1"/>
<element name="MODULE_CATALOG" type="string" minOccurs="0" maxOccurs="1"/>
<element name="MODULE_SCHEMA" type="string" minOccurs="0" maxOccurs="1"/>
<element name="MODULE_NAME" type="string" minOccurs="0" maxOccurs="1"/>
<element name="UDT_CATALOG" type="string" minOccurs="0" maxOccurs="1"/>
<element name="UDT_SCHEMA" type="string" minOccurs="0" maxOccurs="1"/>
<element name="UDT_NAME" type="string" minOccurs="0" maxOccurs="1"/>
<element name="DATA_TYPE" type="string" minOccurs="0" maxOccurs="1"/>
<element name="CHARACTER_MAXIMUM_LENGTH" type="int" minOccurs="0" maxOccurs="1"/>
<element name="CHARACTER_OCTET_LENGTH" type="int" minOccurs="0" maxOccurs="1"/>
<element name="CHARACTER_SET_CATALOG" type="string" minOccurs="0" maxOccurs="1"/>
<element name="CHARACTER_SET_SCHEMA" type="string" minOccurs="0" maxOccurs="1"/>
<element name="CHARACTER_SET_NAME" type="string" minOccurs="0" maxOccurs="1"/>
<element name="COLLATION_CATALOG" type="string" minOccurs="0" maxOccurs="1"/>
<element name="COLLATION_SCHEMA" type="string" minOccurs="0" maxOccurs="1"/>
<element name="COLLATION_NAME" type="string" minOccurs="0" maxOccurs="1"/>
<element name="NUMERIC_PRECISION" type="int" minOccurs="0" maxOccurs="1"/>
<element name="NUMERIC_PRECISION_RADIX" type="int" minOccurs="0" maxOccurs="1"/>
<element name="NUMERIC_SCALE" type="int" minOccurs="0" maxOccurs="1"/>
<element name="DATETIME_PRECISION" type="int" minOccurs="0" maxOccurs="1"/>
<element name="INTERVAL_TYPE" type="tns:IntervalType" minOccurs="0" maxOccurs="1"/>
<element name="INTERVAL_PRECISION" type="int" minOccurs="0" maxOccurs="1"/>
<element name="TYPE_UDT_CATALOG" type="int" minOccurs="0" maxOccurs="1"/>
<element name="TYPE_UDT_SCHEMA" type="string" minOccurs="0" maxOccurs="1"/>
<element name="TYPE_UDT_NAME" type="string" minOccurs="0" maxOccurs="1"/>
<element name="SCOPE_CATALOG" type="string" minOccurs="0" maxOccurs="1"/>
<element name="SCOPE_SCHEMA" type="string" minOccurs="0" maxOccurs="1"/>
<element name="SCOPE_NAME" type="string" minOccurs="0" maxOccurs="1"/>
<element name="MAXIMUM_CARDINALITY" type="string" minOccurs="0" maxOccurs="1"/>
<element name="DTD_IDENTIFIER" type="string" minOccurs="0" maxOccurs="1"/>
<element name="ROUTINE_BODY" type="tns:RoutineBodyType" minOccurs="0" maxOccurs="1"/>
<element name="ROUTINE_DEFINITION" type="string" minOccurs="0" maxOccurs="1"/>
<element name="EXTERNAL_NAME" type="string" minOccurs="0" maxOccurs="1"/>
<element name="EXTERNAL_LANGUAGE" type="tns:ExternalLanguageType" minOccurs="0" maxOccurs="1"/>
<element name="PARAMETER_STYLE" type="tns:ParameterStyleType" minOccurs="0" maxOccurs="1"/>
<element name="IS_DETERMINISTIC" type="tns:YesOrNoType" minOccurs="0" maxOccurs="1"/>
<element name="SQL_DATA_ACCESS" type="tns:SQLDataAccessType" minOccurs="0" maxOccurs="1"/>
<element name="IS_NULL_CALL" type="tns:YesOrNoType" minOccurs="0" maxOccurs="1"/>
<element name="SQL_PATH" type="string" minOccurs="0" maxOccurs="1"/>
<element name="SCHEMA_LEVEL_ROUTINE" type="tns:YesOrNoType" minOccurs="0" maxOccurs="1"/>
<element name="MAX_DYNAMIC_RESULT_SETS" type="int" minOccurs="0" maxOccurs="1"/>
<element name="IS_USER_DEFINED_CAST" type="tns:YesOrNoType" minOccurs="0" maxOccurs="1"/>
<element name="IS_IMPLICITLY_INVOCABLE" type="tns:YesOrNoType" minOccurs="0" maxOccurs="1"/>
<element name="SECURITY_TYPE" type="tns:SecurityType" minOccurs="0" maxOccurs="1"/>
<element name="TO_SQL_SPECIFIC_CATALOG" type="string" minOccurs="0" maxOccurs="1"/>
<element name="TO_SQL_SPECIFIC_SCHEMA" type="string" minOccurs="0" maxOccurs="1"/>
<element name="TO_SQL_SPECIFIC_NAME" type="string" minOccurs="0" maxOccurs="1"/>
<element name="AS_LOCATOR" type="tns:YesOrNoType" minOccurs="0" maxOccurs="1"/>
<element name="CREATED" type="dateTime" minOccurs="0" maxOccurs="1"/>
<element name="LAST_ALTERED" type="dateTime" minOccurs="0" maxOccurs="1"/>
<element name="NEW_SAVEPOINT_LEVEL" type="tns:YesOrNoType" minOccurs="0" maxOccurs="1"/>
<element name="IS_UDT_DEPENDENT" type="tns:YesOrNoType" minOccurs="0" maxOccurs="1"/>
<element name="RESULT_CAST_FROM_DATA_TYPE" type="string" minOccurs="0" maxOccurs="1"/>
<element name="RESULT_CAST_AS_LOCATOR" type="tns:YesOrNoType" minOccurs="0" maxOccurs="1"/>
<element name="RESULT_CAST_CHAR_MAX_LENGTH" type="int" minOccurs="0" maxOccurs="1"/>
<element name="RESULT_CAST_CHAR_OCTET_LENGTH" type="int" minOccurs="0" maxOccurs="1"/>
<element name="RESULT_CAST_CHAR_SET_CATALOG" type="string" minOccurs="0" maxOccurs="1"/>
<element name="RESULT_CAST_CHAR_SET_SCHEMA" type="string" minOccurs="0" maxOccurs="1"/>
<element name="RESULT_CAST_CHARACTER_SET_NAME" type="string" minOccurs="0" maxOccurs="1"/>
<element name="RESULT_CAST_COLLATION_CATALOG" type="string" minOccurs="0" maxOccurs="1"/>
<element name="RESULT_CAST_COLLATION_SCHEMA" type="string" minOccurs="0" maxOccurs="1"/>
<element name="RESULT_CAST_COLLATION_NAME" type="string" minOccurs="0" maxOccurs="1"/>
<element name="RESULT_CAST_NUMERIC_PRECISION" type="int" minOccurs="0" maxOccurs="1"/>
<element name="RESULT_CAST_NUMERIC_RADIX" type="int" minOccurs="0" maxOccurs="1"/>
<element name="RESULT_CAST_NUMERIC_SCALE" type="int" minOccurs="0" maxOccurs="1"/>
<element name="RESULT_CAST_DATETIME_PRECISION" type="int" minOccurs="0" maxOccurs="1"/>
<element name="RESULT_CAST_INTERVAL_TYPE" type="tns:IntervalType" minOccurs="0" maxOccurs="1"/>
<element name="RESULT_CAST_INTERVAL_PRECISION" type="int" minOccurs="0" maxOccurs="1"/>
<element name="RESULT_CAST_TYPE_UDT_CATALOG" type="string" minOccurs="0" maxOccurs="1"/>
<element name="RESULT_CAST_TYPE_UDT_SCHEMA" type="string" minOccurs="0" maxOccurs="1"/>
<element name="RESULT_CAST_TYPE_UDT_NAME" type="string" minOccurs="0" maxOccurs="1"/>
<element name="RESULT_CAST_SCOPE_CATALOG" type="string" minOccurs="0" maxOccurs="1"/>
<element name="RESULT_CAST_SCOPE_SCHEMA" type="string" minOccurs="0" maxOccurs="1"/>
<element name="RESULT_CAST_SCOPE_NAME" type="string" minOccurs="0" maxOccurs="1"/>
<element name="RESULT_CAST_DTD_IDENTIFIER" type="int" minOccurs="0" maxOccurs="1"/>
</sequence>
</complexType>
<simpleType name="RoutineType">
<restriction base="string">
<enumeration value="PROCEDURE"/>
<enumeration value="FUNCTION"/>
<enumeration value="INSTANCE METHOD"/>
<enumeration value="STATIC METHOD"/>
<enumeration value="CONSTRUCTOR METHOD"/>
</restriction>
</simpleType>
<simpleType name="RoutineBodyType">
<restriction base="string">
<enumeration value="SQL"/>
<enumeration value="EXTERNAL"/>
</restriction>
</simpleType>
<simpleType name="ExternalLanguageType">
<restriction base="string">
<enumeration value="ADA"/>
<enumeration value="C"/>
<enumeration value="COBOL"/>
<enumeration value="FORTRAN"/>
<enumeration value="MUMPS"/>
<enumeration value="PASCAL"/>
<enumeration value="PLI"/>
</restriction>
</simpleType>
<simpleType name="ParameterStyleType">
<restriction base="string">
<enumeration value="SQL"/>
<enumeration value="GENERAL"/>
</restriction>
</simpleType>
<simpleType name="SQLDataAccessType">
<restriction base="string">
<enumeration value="NO SQL"/>
<enumeration value="CONTAINS SQL"/>
<enumeration value="READS SQL DATA"/>
<enumeration value="MODIFIES SQL DATA"/>
</restriction>
</simpleType>
<simpleType name="SecurityType">
<restriction base="string">
<enumeration value="DEFINER"/>
<enumeration value="INVOKER"/>
<enumeration value="IMPLEMENTATION DEFINED"/>
</restriction>
</simpleType>
<!--
INFORMATION_SCHEMA.SCHEMATA and related objects
-->
<complexType name="SchemataType">
<sequence>
<element name="record" type="tns:SchemataRecordType" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</complexType>
<complexType name="SchemataRecordType">
<sequence>
<element name="CATALOG_NAME" type="string" minOccurs="0" maxOccurs="1"/>
<element name="SCHEMA_NAME" type="string" minOccurs="0" maxOccurs="1"/>
<element name="SCHEMA_OWNER" type="string" minOccurs="0" maxOccurs="1"/>
<element name="DEFAULT_CHARACTER_SET_CATALOG" type="string" minOccurs="0" maxOccurs="1"/>
<element name="DEFAULT_CHARACTER_SET_SCHEMA" type="string" minOccurs="0" maxOccurs="1"/>
<element name="DEFAULT_CHARACTER_SET_NAME" type="string" minOccurs="0" maxOccurs="1"/>
<element name="SQL_PATH" type="string" minOccurs="0" maxOccurs="1"/>
</sequence>
</complexType>
<!--
INFORMATION_SCHEMA.SEQUENCES and related objects
-->
<complexType name="SequencesType">
<sequence>
<element name="record" type="tns:SequencesRecordType" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</complexType>
<complexType name="SequencesRecordType">
<sequence>
<element name="SEQUENCE_CATALOG" type="string" minOccurs="0" maxOccurs="1"/>
<element name="SEQUENCE_SCHEMA" type="string" minOccurs="0" maxOccurs="1"/>
<element name="SEQUENCE_NAME" type="string" minOccurs="0" maxOccurs="1"/>
<element name="DATA_TYPE" type="tns:DataType" minOccurs="0" maxOccurs="1"/>
<element name="NUMERIC_PRECISION" type="int" minOccurs="0" maxOccurs="1"/>
<element name="NUMERIC_PRECISION_RADIX" type="int" minOccurs="0" maxOccurs="1"/>
<element name="NUMERIC_SCALE" type="int" minOccurs="0" maxOccurs="1"/>
<element name="MAXIMUM_VALUE" type="string" minOccurs="0" maxOccurs="1"/>
<element name="MINIMUM_VALUE" type="string" minOccurs="0" maxOccurs="1"/>
<element name="INCREMENT" type="string" minOccurs="0" maxOccurs="1"/>
<element name="CYCLE_OPTION" type="tns:YesOrNoType" minOccurs="0" maxOccurs="1"/>
</sequence>
</complexType>
<!--
INFORMATION_SCHEMA.TABLE_CONSTRAINTS and related objects
-->
<complexType name="TableConstraintsType">
<sequence>
<element name="record" type="tns:TableConstraintsRecordType" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</complexType>
<complexType name="TableConstraintsRecordType">
<sequence>
<element name="CONSTRAINT_CATALOG" type="string" minOccurs="0" maxOccurs="1"/>
<element name="CONSTRAINT_SCHEMA" type="string" minOccurs="0" maxOccurs="1"/>
<element name="CONSTRAINT_NAME" type="string" minOccurs="0" maxOccurs="1"/>
<element name="TABLE_CATALOG" type="string" minOccurs="0" maxOccurs="1"/>
<element name="TABLE_SCHEMA" type="string" minOccurs="0" maxOccurs="1"/>
<element name="TABLE_NAME" type="string" minOccurs="0" maxOccurs="1"/>
<element name="CONSTRAINT_TYPE" type="tns:ConstraintType" minOccurs="0" maxOccurs="1"/>
<element name="IS_DEFERRABLE" type="tns:YesOrNoType" minOccurs="0" maxOccurs="1"/>
<element name="INITIALLY_DEFERRED" type="tns:YesOrNoType" minOccurs="0" maxOccurs="1"/>
</sequence>
</complexType>
<simpleType name="ConstraintType">
<restriction base="string">
<enumeration value="UNIQUE"/>
<enumeration value="PRIMARY KEY"/>
<enumeration value="FOREIGN KEY"/>
<enumeration value="CHECK"/>
</restriction>
</simpleType>
<!--
INFORMATION_SCHEMA.TABLES and related objects
-->
<complexType name="TablesType">
<sequence>
<element name="record" type="tns:TablesRecordType" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</complexType>
<complexType name="TablesRecordType">
<sequence>
<element name="TABLE_CATALOG" type="string" minOccurs="0" maxOccurs="1"/>
<element name="TABLE_SCHEMA" type="string" minOccurs="0" maxOccurs="1"/>
<element name="TABLE_NAME" type="string" minOccurs="0" maxOccurs="1"/>
<element name="TABLE_TYPE" type="tns:TableType" minOccurs="0" maxOccurs="1"/>
<element name="SELF_REFERENCING_COLUMN_NAME" type="string" minOccurs="0" maxOccurs="1"/>
<element name="REFERENCE_GENERATION" type="tns:ReferenceGenerationType" minOccurs="0" maxOccurs="1"/>
<element name="USER_DEFINED_TYPE_CATALOG" type="string" minOccurs="0" maxOccurs="1"/>
<element name="USER_DEFINED_TYPE_SCHEMA" type="string" minOccurs="0" maxOccurs="1"/>
<element name="USER_DEFINED_TYPE_NAME" type="string" minOccurs="0" maxOccurs="1"/>
<element name="IS_INSERTABLE_INTO" type="tns:YesOrNoType" minOccurs="0" maxOccurs="1"/>
<element name="IS_TYPED" type="tns:YesOrNoType" minOccurs="0" maxOccurs="1"/>
<element name="COMMIT_ACTION" type="tns:CommitActionType" minOccurs="0" maxOccurs="1"/>
</sequence>
</complexType>
<simpleType name="TableType">
<restriction base="string">
<enumeration value="BASE TABLE"/>
<enumeration value="VIEW"/>
<enumeration value="GLOBAL TEMPORARY"/>
<enumeration value="LOCAL TEMPORARY"/>
</restriction>
</simpleType>
<simpleType name="ReferenceGenerationType">
<restriction base="string">
<enumeration value="SYSTEM GENERATED"/>
<enumeration value="USER GENERATED"/>
<enumeration value="DERIVED"/>
</restriction>
</simpleType>
<simpleType name="CommitActionType">
<restriction base="string">
<enumeration value="DELETE"/>
<enumeration value="PRESERVE"/>
</restriction>
</simpleType>
</schema>

View File

@ -7,7 +7,7 @@ jdbc.Password=
generator=org.jooq.util.DefaultGenerator
generator.database=org.jooq.util.hsqldb.HSQLDBDatabase
generator.database.includes=SCHEMATA,TABLES,COLUMNS,REFERENTIAL_CONSTRAINTS,TABLE_CONSTRAINTS,CONSTRAINT_COLUMN_USAGE,KEY_COLUMN_USAGE,ROUTINES,PARAMETERS,SEQUENCES,ELEMENT_TYPES
generator.database.includes=SCHEMATA,TABLES,COLUMNS,REFERENTIAL_CONSTRAINTS,TABLE_CONSTRAINTS,KEY_COLUMN_USAGE,ROUTINES,PARAMETERS,SEQUENCES,ELEMENT_TYPES
generator.database.excludes=
generator.generate.deprecated=false
generator.generate.fields=both

View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<configuration xmlns="http://www.jooq.org/xsd/jooq-codegen-2.0.4.xsd">
<jdbc>
<driver>oracle.jdbc.OracleDriver</driver>
<url>jdbc:oracle:thin:@localhost:1521:xe</url>
<user>TEST</user>
<password>TEST</password>
</jdbc>
<generator>
<name>org.jooq.util.XMLGenerator</name>
<database>
<name>org.jooq.util.oracle.OracleDatabase</name>
<includes>.*</includes>
<excludes>T_BOOK_DETAILS,S_TRIGGERS_SEQUENCE,.*976.*</excludes>
<dateAsTimestamp>false</dateAsTimestamp>
<unsignedTypes>true</unsignedTypes>
<schemata>
<schema>
<inputSchema>TEST</inputSchema>
</schema>
<schema>
<inputSchema>MULTI_SCHEMA</inputSchema>
</schema>
</schemata>
</database>
<target>
<directory>./src/org/jooq/test/_/information_schema/oracle</directory>
</target>
</generator>
</configuration>

View File

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
<stringAttribute key="bad_container_name" value="/jOOQ-codegen/launch"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/jOOQ-codegen/src/main/java/org/jooq/util/GenerationTool.java"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="1"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
</listAttribute>
<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry containerPath=&quot;org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6&quot; javaProject=&quot;jOOQ-codegen&quot; path=&quot;1&quot; type=&quot;4&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/jOOQ-test/lib/ojdbc6.jar&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/jOOQ-test/lib/hsqldb.jar&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry containerPath=&quot;org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER&quot; javaProject=&quot;jOOQ-meta&quot; path=&quot;3&quot; type=&quot;4&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/jOOQ-test/lib/log4j-1.2.16.jar&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry path=&quot;3&quot; projectName=&quot;jOOQ-test&quot; type=&quot;1&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry path=&quot;3&quot; projectName=&quot;jOOQ&quot; type=&quot;1&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry path=&quot;3&quot; projectName=&quot;jOOQ-codegen&quot; type=&quot;1&quot;/&gt;&#13;&#10;"/>
</listAttribute>
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.maven.ide.eclipse.launchconfig.classpathProvider"/>
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.jooq.util.GenerationTool"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="/org/jooq/configuration/${env_var:USERNAME}/oracle/library-information-schema.xml"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="jOOQ-codegen"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.maven.ide.eclipse.launchconfig.sourcepathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${workspace_loc:jOOQ-test}"/>
</launchConfiguration>