diff --git a/jOOQ-codegen/src/main/java/org/jooq/util/GenerationTool.java b/jOOQ-codegen/src/main/java/org/jooq/util/GenerationTool.java index 1d9d91003a..65cc5cef9b 100644 --- a/jOOQ-codegen/src/main/java/org/jooq/util/GenerationTool.java +++ b/jOOQ-codegen/src/main/java/org/jooq/util/GenerationTool.java @@ -85,7 +85,7 @@ public class GenerationTool { * @throws Exception */ public static void main(String[] args) throws Exception { - if (args.length != 1) { + if (args.length < 1) { error(); } @@ -108,7 +108,7 @@ public class GenerationTool { else { Properties properties = new Properties(); properties.load(in); - main(properties); + main(properties, args); } } catch (Exception e) { log.error("Cannot read " + args[0] + ". Error : " + e.getMessage()); @@ -120,11 +120,7 @@ public class GenerationTool { } } - public static void main(Properties properties) throws Exception { - log.warn("WARNING: jooq-codegen source code generation using .properties files is deprecated"); - log.warn("WARNING: consider using XML configuration instead"); - log.warn("WARNING: See http://www.jooq.org/manual/META/Configuration/ for more details"); - + public static void main(Properties properties, String... args) throws Exception { Jdbc jdbc = new Jdbc(); jdbc.setDriver(properties.getProperty("jdbc.Driver")); jdbc.setUrl(properties.getProperty("jdbc.URL")); @@ -137,6 +133,8 @@ public class GenerationTool { MasterDataTables masterDataTables = new MasterDataTables(); for (String name : defaultString(properties.getProperty("generator.generate.master-data-tables")).split(",")) { + if (isBlank(name)) continue; + MasterDataTable table = new MasterDataTable(); table.setName(name); @@ -177,9 +175,16 @@ public class GenerationTool { database.setIncludes(properties.containsKey("generator.database.includes") ? properties.getProperty("generator.database.includes") : null); database.setExcludes(properties.containsKey("generator.database.excludes") ? properties.getProperty("generator.database.excludes") : null); database.setDateAsTimestamp("true".equalsIgnoreCase(properties.getProperty("generator.database.date-as-timestamp"))); - database.setMasterDataTables(masterDataTables); - database.setEnumTypes(enumTypes); - database.setForcedTypes(forcedTypes); + + // Avoid creating these empty elements when migrating + if (!masterDataTables.getMasterDataTable().isEmpty()) + database.setMasterDataTables(masterDataTables); + + if (!enumTypes.getEnumType().isEmpty()) + database.setEnumTypes(enumTypes); + + if (!forcedTypes.getForcedType().isEmpty()) + database.setForcedTypes(forcedTypes); Target target = new Target(); target.setPackageName(properties.getProperty("generator.target.package")); @@ -193,7 +198,10 @@ public class GenerationTool { generate.setGeneratedAnnotation(!"false".equalsIgnoreCase(properties.getProperty("generator.generate.generated-annotation"))); org.jooq.util.jaxb.Generator generator = new org.jooq.util.jaxb.Generator(); - generator.setStrategy(strategy); + + if (!isBlank(strategy.getName())) + generator.setStrategy(strategy); + generator.setDatabase(database); generator.setTarget(target); generator.setGenerate(generate); @@ -203,7 +211,21 @@ public class GenerationTool { configuration.setJdbc(jdbc); configuration.setGenerator(generator); - main(configuration); + if (args.length < 2) { + log.warn("WARNING: jooq-codegen source code generation using .properties files is deprecated as of jOOQ 2.0.4"); + log.info(" Consider using XML configuration instead"); + log.info(" See http://www.jooq.org/manual/META/Configuration/ for more details"); + log.info(""); + log.info("Use GenerationTool to migrate your .properties file to XML (printed on System.out) :"); + log.info("Usage : GenerationTool migrate"); + log.info(""); + + main(configuration); + } + else if ("migrate".equals(args[1])) { + log.info("Migrating properties to XML"); + JAXB.marshal(configuration, System.out); + } } @SuppressWarnings("unchecked") diff --git a/jOOQ-meta/build.xml b/jOOQ-meta/build.xml index 079a5f2825..99f81aab47 100644 --- a/jOOQ-meta/build.xml +++ b/jOOQ-meta/build.xml @@ -14,6 +14,6 @@ - + \ No newline at end of file diff --git a/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Configuration.java b/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Configuration.java index 9e1c362645..c5c9415303 100644 --- a/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Configuration.java +++ b/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Configuration.java @@ -2,7 +2,7 @@ // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 // See http://java.sun.com/xml/jaxb // Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.01.29 at 09:33:16 PM MEZ +// Generated on: 2012.01.29 at 10:08:11 PM MEZ // @@ -25,8 +25,8 @@ import javax.xml.bind.annotation.XmlType; * <complexContent> * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * <all> - * <element name="jdbc" type="{http://www.jooq.org/xsd/jooq-codegen}Jdbc"/> - * <element name="generator" type="{http://www.jooq.org/xsd/jooq-codegen}Generator"/> + * <element name="jdbc" type="{http://www.jooq.org/xsd/jooq-codegen-2.0.4.xsd}Jdbc"/> + * <element name="generator" type="{http://www.jooq.org/xsd/jooq-codegen-2.0.4.xsd}Generator"/> * </all> * </restriction> * </complexContent> diff --git a/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Database.java b/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Database.java index 800e3d8dbe..ee4f0bfcd8 100644 --- a/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Database.java +++ b/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Database.java @@ -2,7 +2,7 @@ // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 // See http://java.sun.com/xml/jaxb // Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.01.29 at 09:33:16 PM MEZ +// Generated on: 2012.01.29 at 10:08:11 PM MEZ // @@ -42,7 +42,7 @@ import javax.xml.bind.annotation.XmlType; * <complexContent> * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * <sequence> - * <element name="masterDataTable" type="{http://www.jooq.org/xsd/jooq-codegen}MasterDataTable" maxOccurs="unbounded" minOccurs="0"/> + * <element name="masterDataTable" type="{http://www.jooq.org/xsd/jooq-codegen-2.0.4.xsd}MasterDataTable" maxOccurs="unbounded" minOccurs="0"/> * </sequence> * </restriction> * </complexContent> @@ -53,7 +53,7 @@ import javax.xml.bind.annotation.XmlType; * <complexContent> * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * <sequence> - * <element name="enumType" type="{http://www.jooq.org/xsd/jooq-codegen}EnumType" maxOccurs="unbounded" minOccurs="0"/> + * <element name="enumType" type="{http://www.jooq.org/xsd/jooq-codegen-2.0.4.xsd}EnumType" maxOccurs="unbounded" minOccurs="0"/> * </sequence> * </restriction> * </complexContent> @@ -64,7 +64,7 @@ import javax.xml.bind.annotation.XmlType; * <complexContent> * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * <sequence> - * <element name="forcedType" type="{http://www.jooq.org/xsd/jooq-codegen}ForcedType" maxOccurs="unbounded" minOccurs="0"/> + * <element name="forcedType" type="{http://www.jooq.org/xsd/jooq-codegen-2.0.4.xsd}ForcedType" maxOccurs="unbounded" minOccurs="0"/> * </sequence> * </restriction> * </complexContent> @@ -327,7 +327,7 @@ public class Database { * <complexContent> * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * <sequence> - * <element name="enumType" type="{http://www.jooq.org/xsd/jooq-codegen}EnumType" maxOccurs="unbounded" minOccurs="0"/> + * <element name="enumType" type="{http://www.jooq.org/xsd/jooq-codegen-2.0.4.xsd}EnumType" maxOccurs="unbounded" minOccurs="0"/> * </sequence> * </restriction> * </complexContent> @@ -386,7 +386,7 @@ public class Database { * <complexContent> * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * <sequence> - * <element name="forcedType" type="{http://www.jooq.org/xsd/jooq-codegen}ForcedType" maxOccurs="unbounded" minOccurs="0"/> + * <element name="forcedType" type="{http://www.jooq.org/xsd/jooq-codegen-2.0.4.xsd}ForcedType" maxOccurs="unbounded" minOccurs="0"/> * </sequence> * </restriction> * </complexContent> @@ -445,7 +445,7 @@ public class Database { * <complexContent> * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * <sequence> - * <element name="masterDataTable" type="{http://www.jooq.org/xsd/jooq-codegen}MasterDataTable" maxOccurs="unbounded" minOccurs="0"/> + * <element name="masterDataTable" type="{http://www.jooq.org/xsd/jooq-codegen-2.0.4.xsd}MasterDataTable" maxOccurs="unbounded" minOccurs="0"/> * </sequence> * </restriction> * </complexContent> diff --git a/jOOQ-meta/src/main/java/org/jooq/util/jaxb/EnumType.java b/jOOQ-meta/src/main/java/org/jooq/util/jaxb/EnumType.java index a6f272d7e6..e4ec98f94c 100644 --- a/jOOQ-meta/src/main/java/org/jooq/util/jaxb/EnumType.java +++ b/jOOQ-meta/src/main/java/org/jooq/util/jaxb/EnumType.java @@ -2,7 +2,7 @@ // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 // See http://java.sun.com/xml/jaxb // Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.01.29 at 09:33:16 PM MEZ +// Generated on: 2012.01.29 at 10:08:11 PM MEZ // diff --git a/jOOQ-meta/src/main/java/org/jooq/util/jaxb/ForcedType.java b/jOOQ-meta/src/main/java/org/jooq/util/jaxb/ForcedType.java index 8f49e2fab1..952bd8872f 100644 --- a/jOOQ-meta/src/main/java/org/jooq/util/jaxb/ForcedType.java +++ b/jOOQ-meta/src/main/java/org/jooq/util/jaxb/ForcedType.java @@ -2,7 +2,7 @@ // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 // See http://java.sun.com/xml/jaxb // Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.01.29 at 09:33:16 PM MEZ +// Generated on: 2012.01.29 at 10:08:11 PM MEZ // diff --git a/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Generate.java b/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Generate.java index d50abab892..5cacd9e9df 100644 --- a/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Generate.java +++ b/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Generate.java @@ -2,7 +2,7 @@ // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 // See http://java.sun.com/xml/jaxb // Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.01.29 at 09:33:16 PM MEZ +// Generated on: 2012.01.29 at 10:08:11 PM MEZ // diff --git a/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Generator.java b/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Generator.java index 717c06cb8c..c06b73d2cd 100644 --- a/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Generator.java +++ b/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Generator.java @@ -2,7 +2,7 @@ // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 // See http://java.sun.com/xml/jaxb // Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.01.29 at 09:33:16 PM MEZ +// Generated on: 2012.01.29 at 10:08:11 PM MEZ // @@ -29,10 +29,10 @@ import javax.xml.bind.annotation.XmlType; * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * <all> * <element name="name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> - * <element name="strategy" type="{http://www.jooq.org/xsd/jooq-codegen}Strategy" minOccurs="0"/> - * <element name="database" type="{http://www.jooq.org/xsd/jooq-codegen}Database"/> - * <element name="generate" type="{http://www.jooq.org/xsd/jooq-codegen}Generate" minOccurs="0"/> - * <element name="target" type="{http://www.jooq.org/xsd/jooq-codegen}Target" minOccurs="0"/> + * <element name="strategy" type="{http://www.jooq.org/xsd/jooq-codegen-2.0.4.xsd}Strategy" minOccurs="0"/> + * <element name="database" type="{http://www.jooq.org/xsd/jooq-codegen-2.0.4.xsd}Database"/> + * <element name="generate" type="{http://www.jooq.org/xsd/jooq-codegen-2.0.4.xsd}Generate" minOccurs="0"/> + * <element name="target" type="{http://www.jooq.org/xsd/jooq-codegen-2.0.4.xsd}Target" minOccurs="0"/> * </all> * </restriction> * </complexContent> diff --git a/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Jdbc.java b/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Jdbc.java index e1e6921d78..82c9360171 100644 --- a/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Jdbc.java +++ b/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Jdbc.java @@ -2,7 +2,7 @@ // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 // See http://java.sun.com/xml/jaxb // Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.01.29 at 09:33:16 PM MEZ +// Generated on: 2012.01.29 at 10:08:11 PM MEZ // diff --git a/jOOQ-meta/src/main/java/org/jooq/util/jaxb/MasterDataTable.java b/jOOQ-meta/src/main/java/org/jooq/util/jaxb/MasterDataTable.java index 24611f31c3..4568820735 100644 --- a/jOOQ-meta/src/main/java/org/jooq/util/jaxb/MasterDataTable.java +++ b/jOOQ-meta/src/main/java/org/jooq/util/jaxb/MasterDataTable.java @@ -2,7 +2,7 @@ // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 // See http://java.sun.com/xml/jaxb // Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.01.29 at 09:33:16 PM MEZ +// Generated on: 2012.01.29 at 10:08:11 PM MEZ // @@ -29,7 +29,7 @@ import javax.xml.bind.annotation.XmlType; * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * <all> * <element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/> - * <element name="literal" type="{http://www.w3.org/2001/XMLSchema}string"/> + * <element name="literal" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * <element name="description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * </all> * </restriction> @@ -47,7 +47,6 @@ public class MasterDataTable { @XmlElement(required = true) protected String name; - @XmlElement(required = true) protected String literal; protected String description; diff --git a/jOOQ-meta/src/main/java/org/jooq/util/jaxb/ObjectFactory.java b/jOOQ-meta/src/main/java/org/jooq/util/jaxb/ObjectFactory.java index a877d8d120..cfba554da1 100644 --- a/jOOQ-meta/src/main/java/org/jooq/util/jaxb/ObjectFactory.java +++ b/jOOQ-meta/src/main/java/org/jooq/util/jaxb/ObjectFactory.java @@ -2,7 +2,7 @@ // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 // See http://java.sun.com/xml/jaxb // Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.01.29 at 09:33:16 PM MEZ +// Generated on: 2012.01.29 at 10:08:11 PM MEZ // @@ -36,6 +36,46 @@ public class ObjectFactory { public ObjectFactory() { } + /** + * Create an instance of {@link Strategy } + * + */ + public Strategy createStrategy() { + return new Strategy(); + } + + /** + * Create an instance of {@link Jdbc } + * + */ + public Jdbc createJdbc() { + return new Jdbc(); + } + + /** + * Create an instance of {@link Database } + * + */ + public Database createDatabase() { + return new Database(); + } + + /** + * Create an instance of {@link Generate } + * + */ + public Generate createGenerate() { + return new Generate(); + } + + /** + * Create an instance of {@link Target } + * + */ + public Target createTarget() { + return new Target(); + } + /** * Create an instance of {@link Database.MasterDataTables } * @@ -44,14 +84,6 @@ public class ObjectFactory { return new Database.MasterDataTables(); } - /** - * Create an instance of {@link ForcedType } - * - */ - public ForcedType createForcedType() { - return new ForcedType(); - } - /** * Create an instance of {@link Generator } * @@ -68,22 +100,6 @@ public class ObjectFactory { return new MasterDataTable(); } - /** - * Create an instance of {@link EnumType } - * - */ - public EnumType createEnumType() { - return new EnumType(); - } - - /** - * Create an instance of {@link Strategy } - * - */ - public Strategy createStrategy() { - return new Strategy(); - } - /** * Create an instance of {@link Database.ForcedTypes } * @@ -93,43 +109,19 @@ public class ObjectFactory { } /** - * Create an instance of {@link Target } + * Create an instance of {@link EnumType } * */ - public Target createTarget() { - return new Target(); + public EnumType createEnumType() { + return new EnumType(); } /** - * Create an instance of {@link Configuration } + * Create an instance of {@link ForcedType } * */ - public Configuration createConfiguration() { - return new Configuration(); - } - - /** - * Create an instance of {@link Jdbc } - * - */ - public Jdbc createJdbc() { - return new Jdbc(); - } - - /** - * Create an instance of {@link Generate } - * - */ - public Generate createGenerate() { - return new Generate(); - } - - /** - * Create an instance of {@link Database } - * - */ - public Database createDatabase() { - return new Database(); + public ForcedType createForcedType() { + return new ForcedType(); } /** @@ -140,4 +132,12 @@ public class ObjectFactory { return new Database.EnumTypes(); } + /** + * Create an instance of {@link Configuration } + * + */ + public Configuration createConfiguration() { + return new Configuration(); + } + } diff --git a/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Strategy.java b/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Strategy.java index a93d4d7888..457e619de0 100644 --- a/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Strategy.java +++ b/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Strategy.java @@ -2,7 +2,7 @@ // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 // See http://java.sun.com/xml/jaxb // Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.01.29 at 09:33:16 PM MEZ +// Generated on: 2012.01.29 at 10:08:11 PM MEZ // diff --git a/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Target.java b/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Target.java index 1f83db17f4..ce912d6b89 100644 --- a/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Target.java +++ b/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Target.java @@ -2,7 +2,7 @@ // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 // See http://java.sun.com/xml/jaxb // Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.01.29 at 09:33:16 PM MEZ +// Generated on: 2012.01.29 at 10:08:11 PM MEZ // diff --git a/jOOQ-meta/src/main/java/org/jooq/util/jaxb/package-info.java b/jOOQ-meta/src/main/java/org/jooq/util/jaxb/package-info.java index c724e72515..b529ba89af 100644 --- a/jOOQ-meta/src/main/java/org/jooq/util/jaxb/package-info.java +++ b/jOOQ-meta/src/main/java/org/jooq/util/jaxb/package-info.java @@ -2,8 +2,8 @@ // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 // See http://java.sun.com/xml/jaxb // Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.01.29 at 09:33:16 PM MEZ +// Generated on: 2012.01.29 at 10:08:11 PM MEZ // -@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.jooq.org/xsd/jooq-codegen", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) +@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.jooq.org/xsd/jooq-codegen-2.0.4.xsd", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) package org.jooq.util.jaxb; diff --git a/jOOQ-meta/src/main/resources/jooq-codegen.xsd b/jOOQ-meta/src/main/resources/jooq-codegen-2.0.4.xsd similarity index 96% rename from jOOQ-meta/src/main/resources/jooq-codegen.xsd rename to jOOQ-meta/src/main/resources/jooq-codegen-2.0.4.xsd index 21791f42d0..6b5ee0998c 100644 --- a/jOOQ-meta/src/main/resources/jooq-codegen.xsd +++ b/jOOQ-meta/src/main/resources/jooq-codegen-2.0.4.xsd @@ -1,6 +1,7 @@ - @@ -121,7 +122,7 @@ - diff --git a/jOOQ-test/configuration/org/jooq/configuration/lukas/sqlserver/adventureworks.xml b/jOOQ-test/configuration/org/jooq/configuration/lukas/sqlserver/adventureworks.xml new file mode 100644 index 0000000000..a08264b1c9 --- /dev/null +++ b/jOOQ-test/configuration/org/jooq/configuration/lukas/sqlserver/adventureworks.xml @@ -0,0 +1,30 @@ + + + + com.microsoft.sqlserver.jdbc.SQLServerDriver + jdbc:sqlserver://localhost:1433;databaseName=AdventureWorks;integratedSecurity=true + dbo + + + + + org.jooq.util.DefaultGenerator + + org.jooq.util.sqlserver.SQLServerDatabase + .* + + false + + + true + true + true + true + false + + + org.jooq.examples.sqlserver.adventureworks.dbo + ./examples + + + diff --git a/jOOQ-test/configuration/org/jooq/configuration/lukas/sqlserver/library.xml b/jOOQ-test/configuration/org/jooq/configuration/lukas/sqlserver/library.xml new file mode 100644 index 0000000000..5068838102 --- /dev/null +++ b/jOOQ-test/configuration/org/jooq/configuration/lukas/sqlserver/library.xml @@ -0,0 +1,123 @@ + + + + com.microsoft.sqlserver.jdbc.SQLServerDriver + jdbc:sqlserver://localhost:1433;databaseName=test;integratedSecurity=true + dbo + + + + + org.jooq.util.DefaultGenerator + + + org.jooq.util.sqlserver.SQLServerDatabase + t_.*,x_.*,v_.*,p_.*,f_.*,(f|p)[0-9]+,s_.* + t_book_details + false + + + t_language + cd + description + + + t_658_11 + + + t_658_21 + + + t_658_31 + + + t_658_12 + cd + + + t_658_22 + cd + + + t_658_32 + cd + + + + + BOOLEAN_YN_LC + y,"n" + + + BOOLEAN_YN_UC + "Y",N + + + BOOLEAN_TRUE_FALSE_LC + true,false + + + BOOLEAN_TRUE_FALSE_UC + TRUE,FALSE + + + BOOLEAN_10 + 1,0 + + + BOOLEAN_YES_NO_LC + yes,no + + + BOOLEAN_YES_NO_UC + "YES","NO" + + + + + BOOLEAN_YES_NO_LC + (?i:(.*?.)?T_BOOLEANS.YES_NO_LC) + + + BOOLEAN_YES_NO_UC + (?i:(.*?.)?T_BOOLEANS.YES_NO_UC) + + + BOOLEAN_YN_LC + (?i:(.*?.)?T_BOOLEANS.Y_N_LC) + + + BOOLEAN_YN_UC + (?i:(.*?.)?T_BOOLEANS.Y_N_UC) + + + BOOLEAN_TRUE_FALSE_LC + (?i:(.*?.)?T_BOOLEANS.TRUE_FALSE_LC) + + + BOOLEAN_TRUE_FALSE_UC + (?i:(.*?.)?T_BOOLEANS.TRUE_FALSE_UC) + + + BIT + (?i:(.*?.)?T_BOOLEANS.(VC|C|N)_BOOLEAN) + + + BOOLEAN_10 + (?i:(.*?.)?T_BOOLEANS.ONE_ZERO) + + + + + true + true + true + true + false + + + org.jooq.test.sqlserver.generatedclasses + ./src + + + diff --git a/jOOQ-test/configuration/org/jooq/configuration/lukas/sybase/library.xml b/jOOQ-test/configuration/org/jooq/configuration/lukas/sybase/library.xml new file mode 100644 index 0000000000..f374791bea --- /dev/null +++ b/jOOQ-test/configuration/org/jooq/configuration/lukas/sybase/library.xml @@ -0,0 +1,123 @@ + + + + com.sybase.jdbc3.jdbc.SybDriver + jdbc:sybase:Tds:localhost:2638 + dba + dba + sql + + + org.jooq.util.DefaultGenerator + + + org.jooq.util.sybase.SybaseDatabase + t_.*,x_.*,v_.*,V_.*,p_.*,f_.*,(f|p)[0-9]+,s_.* + t_book_details + false + + + t_language + cd + description + + + t_658_11 + + + t_658_21 + + + t_658_31 + + + t_658_12 + cd + + + t_658_22 + cd + + + t_658_32 + cd + + + + + BOOLEAN_TRUE_FALSE_LC + true,false + + + BOOLEAN_TRUE_FALSE_UC + TRUE,FALSE + + + BOOLEAN_YN_LC + y,"n" + + + BOOLEAN_YN_UC + "Y",N + + + BOOLEAN_10 + 1,0 + + + BOOLEAN_YES_NO_LC + yes,no + + + BOOLEAN_YES_NO_UC + "YES","NO" + + + + + BOOLEAN_YN_LC + (?i:(.*?.)?T_BOOLEANS.Y_N_LC) + + + BOOLEAN_YN_UC + (?i:(.*?.)?T_BOOLEANS.Y_N_UC) + + + BOOLEAN_10 + (?i:(.*?.)?T_BOOLEANS.ONE_ZERO) + + + BOOLEAN_TRUE_FALSE_LC + (?i:(.*?.)?T_BOOLEANS.TRUE_FALSE_LC) + + + BOOLEAN_TRUE_FALSE_UC + (?i:(.*?.)?T_BOOLEANS.TRUE_FALSE_UC) + + + BOOLEAN_YES_NO_LC + (?i:(.*?.)?T_BOOLEANS.YES_NO_LC) + + + BOOLEAN_YES_NO_UC + (?i:(.*?.)?T_BOOLEANS.YES_NO_UC) + + + BIT + (?i:(.*?.)?T_BOOLEANS.(VC|C|N)_BOOLEAN) + + + + + true + true + true + true + false + + + org.jooq.test.sybase.generatedclasses + ./src + + + diff --git a/jOOQ-test/launch/GenerationTool - migrate.launch b/jOOQ-test/launch/GenerationTool - migrate.launch new file mode 100644 index 0000000000..ff3960f96a --- /dev/null +++ b/jOOQ-test/launch/GenerationTool - migrate.launch @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jOOQ-test/launch/GenerationTool SQLServer AdventureWorks.launch b/jOOQ-test/launch/GenerationTool SQLServer AdventureWorks.launch index 4f9ecacf72..a72c455443 100644 --- a/jOOQ-test/launch/GenerationTool SQLServer AdventureWorks.launch +++ b/jOOQ-test/launch/GenerationTool SQLServer AdventureWorks.launch @@ -36,7 +36,7 @@ - + diff --git a/jOOQ-test/launch/GenerationTool SQLServer test.launch b/jOOQ-test/launch/GenerationTool SQLServer test.launch index 59a38f1f0c..bde4cdb7d3 100644 --- a/jOOQ-test/launch/GenerationTool SQLServer test.launch +++ b/jOOQ-test/launch/GenerationTool SQLServer test.launch @@ -36,7 +36,7 @@ - + diff --git a/jOOQ-test/launch/GenerationTool Sybase test.launch b/jOOQ-test/launch/GenerationTool Sybase test.launch index 80d3081f11..6648d0446f 100644 --- a/jOOQ-test/launch/GenerationTool Sybase test.launch +++ b/jOOQ-test/launch/GenerationTool Sybase test.launch @@ -25,7 +25,7 @@ - +