diff --git a/jOOQ-codegen/src/main/java/org/jooq/codegen/GenerationTool.java b/jOOQ-codegen/src/main/java/org/jooq/codegen/GenerationTool.java index 19a5947cd9..86975ea6e6 100644 --- a/jOOQ-codegen/src/main/java/org/jooq/codegen/GenerationTool.java +++ b/jOOQ-codegen/src/main/java/org/jooq/codegen/GenerationTool.java @@ -544,6 +544,7 @@ public class GenerationTool { database.setIncludeCheckConstraints(!FALSE.equals(d.isIncludeCheckConstraints())); database.setIncludeSystemIndexes(TRUE.equals(d.isIncludeSystemIndexes())); database.setIncludeSystemCheckConstraints(TRUE.equals(d.isIncludeSystemCheckConstraints())); + database.setIncludeSystemSequences(TRUE.equals(d.isIncludeSystemSequences())); database.setIncludeInvisibleColumns(!FALSE.equals(d.isIncludeInvisibleColumns())); database.setIncludePrimaryKeys(!FALSE.equals(d.isIncludePrimaryKeys())); database.setIncludeRoutines(!FALSE.equals(d.isIncludeRoutines())); diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/AbstractDatabase.java b/jOOQ-meta/src/main/java/org/jooq/meta/AbstractDatabase.java index 3dae08f284..196b093d30 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/AbstractDatabase.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/AbstractDatabase.java @@ -157,6 +157,7 @@ public abstract class AbstractDatabase implements Database { private boolean includeCheckConstraints = true; private boolean includeSystemIndexes = false; private boolean includeSystemCheckConstraints = false; + private boolean includeSystemSequences = false; private boolean includePrimaryKeys = true; private boolean includeUniqueKeys = true; private boolean includeForeignKeys = true; @@ -1098,6 +1099,16 @@ public abstract class AbstractDatabase implements Database { return includeSystemCheckConstraints; } + @Override + public final void setIncludeSystemSequences(boolean includeSystemSequences) { + this.includeSystemSequences = includeSystemSequences; + } + + @Override + public final boolean getIncludeSystemSequences() { + return includeSystemSequences; + } + @Override public final void setIncludeIndexes(boolean includeIndexes) { this.includeIndexes = includeIndexes; diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/Database.java b/jOOQ-meta/src/main/java/org/jooq/meta/Database.java index f898a380cd..e02686af3e 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/Database.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/Database.java @@ -509,6 +509,16 @@ public interface Database extends AutoCloseable { */ boolean getIncludeSystemCheckConstraints(); + /** + * whether system generated sequences should be included. + */ + void setIncludeSystemSequences(boolean systemSequences); + + /** + * whether system generated sequences should be included. + */ + boolean getIncludeSystemSequences(); + /** * whether indexes should be included. */ diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/h2/H2Database.java b/jOOQ-meta/src/main/java/org/jooq/meta/h2/H2Database.java index d038576756..c18718686f 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/h2/H2Database.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/h2/H2Database.java @@ -429,7 +429,7 @@ public class H2Database extends AbstractDatabase implements ResultQueryDatabase ) .from(SEQUENCES) .where(SEQUENCES.SEQUENCE_SCHEMA.in(schemas)) - .and(upper(SEQUENCES.SEQUENCE_NAME).notLike(inline("SYSTEM!_SEQUENCE!_%"), '!')) + .and(!getIncludeSystemSequences() ? upper(SEQUENCES.SEQUENCE_NAME).notLike(inline("SYSTEM!_SEQUENCE!_%"), '!') : noCondition()) .orderBy( SEQUENCES.SEQUENCE_SCHEMA, SEQUENCES.SEQUENCE_NAME); diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/CatalogMappingType.java b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/CatalogMappingType.java index 277175f2b8..6d9e79aed2 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/CatalogMappingType.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/CatalogMappingType.java @@ -32,7 +32,7 @@ import org.jooq.util.jaxb.tools.XMLBuilder; public class CatalogMappingType implements Serializable, XMLAppendable { - private final static long serialVersionUID = 31400L; + private final static long serialVersionUID = 31500L; @XmlElement(required = true, defaultValue = "") @XmlJavaTypeAdapter(StringAdapter.class) protected String inputCatalog = ""; diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Configuration.java b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Configuration.java index 77baea0982..b5ad427acd 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Configuration.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Configuration.java @@ -24,10 +24,10 @@ import org.jooq.util.jaxb.tools.XMLBuilder; * <complexContent> * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * <all> - * <element name="logging" type="{http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd}Logging" minOccurs="0"/> - * <element name="onError" type="{http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd}OnError" minOccurs="0"/> - * <element name="jdbc" type="{http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd}Jdbc" minOccurs="0"/> - * <element name="generator" type="{http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd}Generator"/> + * <element name="logging" type="{http://www.jooq.org/xsd/jooq-codegen-3.15.0.xsd}Logging" minOccurs="0"/> + * <element name="onError" type="{http://www.jooq.org/xsd/jooq-codegen-3.15.0.xsd}OnError" minOccurs="0"/> + * <element name="jdbc" type="{http://www.jooq.org/xsd/jooq-codegen-3.15.0.xsd}Jdbc" minOccurs="0"/> + * <element name="generator" type="{http://www.jooq.org/xsd/jooq-codegen-3.15.0.xsd}Generator"/> * <element name="basedir" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * </all> * </restriction> @@ -48,7 +48,7 @@ import org.jooq.util.jaxb.tools.XMLBuilder; public class Configuration implements Serializable, XMLAppendable { - private final static long serialVersionUID = 31400L; + private final static long serialVersionUID = 31500L; @XmlSchemaType(name = "string") protected Logging logging; @XmlElement(defaultValue = "FAIL") diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/CustomType.java b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/CustomType.java index 621d8290e0..7de43f49e8 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/CustomType.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/CustomType.java @@ -29,7 +29,7 @@ import org.jooq.util.jaxb.tools.XMLBuilder; public class CustomType implements Serializable, XMLAppendable { - private final static long serialVersionUID = 31400L; + private final static long serialVersionUID = 31500L; @XmlElement(required = true) @XmlJavaTypeAdapter(StringAdapter.class) protected String name; diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Database.java b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Database.java index 7a5eb49bb3..9a74b443ea 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Database.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Database.java @@ -33,7 +33,7 @@ import org.jooq.util.jaxb.tools.XMLBuilder; public class Database implements Serializable, XMLAppendable { - private final static long serialVersionUID = 31400L; + private final static long serialVersionUID = 31500L; @XmlJavaTypeAdapter(StringAdapter.class) protected String name; @XmlList @@ -87,6 +87,8 @@ public class Database implements Serializable, XMLAppendable protected Boolean includeSystemIndexes = false; @XmlElement(defaultValue = "false") protected Boolean includeSystemCheckConstraints = false; + @XmlElement(defaultValue = "false") + protected Boolean includeSystemSequences = false; @XmlElement(defaultValue = "true") protected Boolean includeInvisibleColumns = true; @XmlElement(defaultValue = "") @@ -862,6 +864,30 @@ public class Database implements Serializable, XMLAppendable this.includeSystemCheckConstraints = value; } + /** + * This flag indicates whether system generated sequences should be included in output produced by this database + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isIncludeSystemSequences() { + return includeSystemSequences; + } + + /** + * Sets the value of the includeSystemSequences property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setIncludeSystemSequences(Boolean value) { + this.includeSystemSequences = value; + } + /** * This flag indicates whether invisible columns should be included in output produced by this database * @@ -1871,6 +1897,11 @@ public class Database implements Serializable, XMLAppendable return this; } + public Database withIncludeSystemSequences(Boolean value) { + setIncludeSystemSequences(value); + return this; + } + public Database withIncludeInvisibleColumns(Boolean value) { setIncludeInvisibleColumns(value); return this; @@ -2335,6 +2366,7 @@ public class Database implements Serializable, XMLAppendable builder.append("includeCheckConstraints", includeCheckConstraints); builder.append("includeSystemIndexes", includeSystemIndexes); builder.append("includeSystemCheckConstraints", includeSystemCheckConstraints); + builder.append("includeSystemSequences", includeSystemSequences); builder.append("includeInvisibleColumns", includeInvisibleColumns); builder.append("recordVersionFields", recordVersionFields); builder.append("recordTimestampFields", recordTimestampFields); @@ -2615,6 +2647,15 @@ public class Database implements Serializable, XMLAppendable return false; } } + if (includeSystemSequences == null) { + if (other.includeSystemSequences!= null) { + return false; + } + } else { + if (!includeSystemSequences.equals(other.includeSystemSequences)) { + return false; + } + } if (includeInvisibleColumns == null) { if (other.includeInvisibleColumns!= null) { return false; @@ -2953,6 +2994,7 @@ public class Database implements Serializable, XMLAppendable result = ((prime*result)+((includeCheckConstraints == null)? 0 :includeCheckConstraints.hashCode())); result = ((prime*result)+((includeSystemIndexes == null)? 0 :includeSystemIndexes.hashCode())); result = ((prime*result)+((includeSystemCheckConstraints == null)? 0 :includeSystemCheckConstraints.hashCode())); + result = ((prime*result)+((includeSystemSequences == null)? 0 :includeSystemSequences.hashCode())); result = ((prime*result)+((includeInvisibleColumns == null)? 0 :includeInvisibleColumns.hashCode())); result = ((prime*result)+((recordVersionFields == null)? 0 :recordVersionFields.hashCode())); result = ((prime*result)+((recordTimestampFields == null)? 0 :recordTimestampFields.hashCode())); diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/EmbeddableDefinitionType.java b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/EmbeddableDefinitionType.java index a0ecb4ad5e..54efa9a27c 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/EmbeddableDefinitionType.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/EmbeddableDefinitionType.java @@ -32,7 +32,7 @@ import org.jooq.util.jaxb.tools.XMLBuilder; public class EmbeddableDefinitionType implements Serializable, XMLAppendable { - private final static long serialVersionUID = 31400L; + private final static long serialVersionUID = 31500L; @XmlJavaTypeAdapter(StringAdapter.class) protected String catalog; @XmlJavaTypeAdapter(StringAdapter.class) diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/EmbeddableField.java b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/EmbeddableField.java index a1d62453d1..fc5bdb7adb 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/EmbeddableField.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/EmbeddableField.java @@ -42,7 +42,7 @@ import org.jooq.util.jaxb.tools.XMLBuilder; public class EmbeddableField implements Serializable, XMLAppendable { - private final static long serialVersionUID = 31400L; + private final static long serialVersionUID = 31500L; @XmlJavaTypeAdapter(StringAdapter.class) protected String name; @XmlElement(required = true) diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/EnumType.java b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/EnumType.java index db2581f2ae..79b5d564bd 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/EnumType.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/EnumType.java @@ -42,7 +42,7 @@ import org.jooq.util.jaxb.tools.XMLBuilder; public class EnumType implements Serializable, XMLAppendable { - private final static long serialVersionUID = 31400L; + private final static long serialVersionUID = 31500L; @XmlElement(required = true) @XmlJavaTypeAdapter(StringAdapter.class) protected String name; diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/ForcedType.java b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/ForcedType.java index a7079524e9..000d9af216 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/ForcedType.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/ForcedType.java @@ -29,7 +29,7 @@ import org.jooq.util.jaxb.tools.XMLBuilder; public class ForcedType implements Serializable, XMLAppendable { - private final static long serialVersionUID = 31400L; + private final static long serialVersionUID = 31500L; @XmlJavaTypeAdapter(StringAdapter.class) protected String name; @XmlJavaTypeAdapter(StringAdapter.class) diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Generate.java b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Generate.java index 26cda190e5..caa9d9d017 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Generate.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Generate.java @@ -29,7 +29,7 @@ import org.jooq.util.jaxb.tools.XMLBuilder; public class Generate implements Serializable, XMLAppendable { - private final static long serialVersionUID = 31400L; + private final static long serialVersionUID = 31500L; @XmlElement(defaultValue = "true") protected Boolean indexes = true; @XmlElement(defaultValue = "true") diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Generator.java b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Generator.java index 79f096378b..7e25347335 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Generator.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Generator.java @@ -28,7 +28,7 @@ import org.jooq.util.jaxb.tools.XMLBuilder; public class Generator implements Serializable, XMLAppendable { - private final static long serialVersionUID = 31400L; + private final static long serialVersionUID = 31500L; @XmlElement(defaultValue = "org.jooq.codegen.DefaultGenerator") @XmlJavaTypeAdapter(StringAdapter.class) protected String name = "org.jooq.codegen.DefaultGenerator"; diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Jdbc.java b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Jdbc.java index 77a55449eb..5b904b1303 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Jdbc.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Jdbc.java @@ -32,7 +32,7 @@ import org.jooq.util.jaxb.tools.XMLBuilder; public class Jdbc implements Serializable, XMLAppendable { - private final static long serialVersionUID = 31400L; + private final static long serialVersionUID = 31500L; @XmlJavaTypeAdapter(StringAdapter.class) protected String driver; @XmlElement(required = true) diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/LambdaConverter.java b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/LambdaConverter.java index 1e6593e5ff..0da4ea18bc 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/LambdaConverter.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/LambdaConverter.java @@ -28,7 +28,7 @@ import org.jooq.util.jaxb.tools.XMLBuilder; public class LambdaConverter implements Serializable, XMLAppendable { - private final static long serialVersionUID = 31400L; + private final static long serialVersionUID = 31500L; @XmlElement(required = true) @XmlJavaTypeAdapter(StringAdapter.class) protected String from; diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/MatcherRule.java b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/MatcherRule.java index 34aa94f66a..b02709778a 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/MatcherRule.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/MatcherRule.java @@ -23,7 +23,7 @@ import org.jooq.util.jaxb.tools.XMLBuilder; * <complexContent> * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * <all> - * <element name="transform" type="{http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd}MatcherTransformType" minOccurs="0"/> + * <element name="transform" type="{http://www.jooq.org/xsd/jooq-codegen-3.15.0.xsd}MatcherTransformType" minOccurs="0"/> * <element name="expression" type="{http://www.w3.org/2001/XMLSchema}string"/> * </all> * </restriction> @@ -43,7 +43,7 @@ import org.jooq.util.jaxb.tools.XMLBuilder; public class MatcherRule implements Serializable, XMLAppendable { - private final static long serialVersionUID = 31400L; + private final static long serialVersionUID = 31500L; @XmlSchemaType(name = "string") protected MatcherTransformType transform; @XmlElement(required = true) diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Matchers.java b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Matchers.java index 4b71ea51d6..9faa65d145 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Matchers.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Matchers.java @@ -37,7 +37,7 @@ import org.jooq.util.jaxb.tools.XMLBuilder; public class Matchers implements Serializable, XMLAppendable { - private final static long serialVersionUID = 31400L; + private final static long serialVersionUID = 31500L; @XmlElementWrapper(name = "catalogs") @XmlElement(name = "catalog") protected List catalogs; diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/MatchersCatalogType.java b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/MatchersCatalogType.java index 5dbfbcbc43..e93d8294a1 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/MatchersCatalogType.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/MatchersCatalogType.java @@ -27,7 +27,7 @@ import org.jooq.util.jaxb.tools.XMLBuilder; public class MatchersCatalogType implements Serializable, XMLAppendable { - private final static long serialVersionUID = 31400L; + private final static long serialVersionUID = 31500L; @XmlJavaTypeAdapter(StringAdapter.class) protected String expression; protected MatcherRule catalogClass; diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/MatchersEmbeddableType.java b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/MatchersEmbeddableType.java index 059c5b331b..6e5a7967ab 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/MatchersEmbeddableType.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/MatchersEmbeddableType.java @@ -27,7 +27,7 @@ import org.jooq.util.jaxb.tools.XMLBuilder; public class MatchersEmbeddableType implements Serializable, XMLAppendable { - private final static long serialVersionUID = 31400L; + private final static long serialVersionUID = 31500L; @XmlJavaTypeAdapter(StringAdapter.class) protected String expression; protected MatcherRule recordClass; diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/MatchersEnumType.java b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/MatchersEnumType.java index 48bc818d8e..ba38c3adb0 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/MatchersEnumType.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/MatchersEnumType.java @@ -27,7 +27,7 @@ import org.jooq.util.jaxb.tools.XMLBuilder; public class MatchersEnumType implements Serializable, XMLAppendable { - private final static long serialVersionUID = 31400L; + private final static long serialVersionUID = 31500L; @XmlJavaTypeAdapter(StringAdapter.class) protected String expression; protected MatcherRule enumClass; diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/MatchersFieldType.java b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/MatchersFieldType.java index 4ae531b25c..712978f9a7 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/MatchersFieldType.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/MatchersFieldType.java @@ -27,7 +27,7 @@ import org.jooq.util.jaxb.tools.XMLBuilder; public class MatchersFieldType implements Serializable, XMLAppendable { - private final static long serialVersionUID = 31400L; + private final static long serialVersionUID = 31500L; @XmlJavaTypeAdapter(StringAdapter.class) protected String expression; protected MatcherRule fieldIdentifier; diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/MatchersRoutineType.java b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/MatchersRoutineType.java index ead055130a..378a11ec16 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/MatchersRoutineType.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/MatchersRoutineType.java @@ -27,7 +27,7 @@ import org.jooq.util.jaxb.tools.XMLBuilder; public class MatchersRoutineType implements Serializable, XMLAppendable { - private final static long serialVersionUID = 31400L; + private final static long serialVersionUID = 31500L; @XmlJavaTypeAdapter(StringAdapter.class) protected String expression; protected MatcherRule routineClass; diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/MatchersSchemaType.java b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/MatchersSchemaType.java index 02f1cbd7ce..de4a0a283d 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/MatchersSchemaType.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/MatchersSchemaType.java @@ -27,7 +27,7 @@ import org.jooq.util.jaxb.tools.XMLBuilder; public class MatchersSchemaType implements Serializable, XMLAppendable { - private final static long serialVersionUID = 31400L; + private final static long serialVersionUID = 31500L; @XmlJavaTypeAdapter(StringAdapter.class) protected String expression; protected MatcherRule schemaClass; diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/MatchersSequenceType.java b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/MatchersSequenceType.java index 9af9c16277..ce0a42ce5e 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/MatchersSequenceType.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/MatchersSequenceType.java @@ -27,7 +27,7 @@ import org.jooq.util.jaxb.tools.XMLBuilder; public class MatchersSequenceType implements Serializable, XMLAppendable { - private final static long serialVersionUID = 31400L; + private final static long serialVersionUID = 31500L; @XmlJavaTypeAdapter(StringAdapter.class) protected String expression; protected MatcherRule sequenceIdentifier; diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/MatchersTableType.java b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/MatchersTableType.java index 3a8781fb25..818f48aa51 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/MatchersTableType.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/MatchersTableType.java @@ -27,7 +27,7 @@ import org.jooq.util.jaxb.tools.XMLBuilder; public class MatchersTableType implements Serializable, XMLAppendable { - private final static long serialVersionUID = 31400L; + private final static long serialVersionUID = 31500L; @XmlJavaTypeAdapter(StringAdapter.class) protected String expression; protected MatcherRule tableClass; diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Property.java b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Property.java index 83faa2ea4b..8888e3c36b 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Property.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Property.java @@ -29,7 +29,7 @@ import org.jooq.util.jaxb.tools.XMLBuilder; public class Property implements Serializable, XMLAppendable { - private final static long serialVersionUID = 31400L; + private final static long serialVersionUID = 31500L; @XmlElement(required = true) @XmlJavaTypeAdapter(StringAdapter.class) protected String key; diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/SchemaMappingType.java b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/SchemaMappingType.java index f017551d92..a7d7c8e215 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/SchemaMappingType.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/SchemaMappingType.java @@ -28,7 +28,7 @@ import org.jooq.util.jaxb.tools.XMLBuilder; public class SchemaMappingType implements Serializable, XMLAppendable { - private final static long serialVersionUID = 31400L; + private final static long serialVersionUID = 31500L; @XmlElement(required = true, defaultValue = "") @XmlJavaTypeAdapter(StringAdapter.class) protected String inputSchema = ""; diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Strategy.java b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Strategy.java index f3beb15129..3861f10fd8 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Strategy.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Strategy.java @@ -29,7 +29,7 @@ import org.jooq.util.jaxb.tools.XMLBuilder; public class Strategy implements Serializable, XMLAppendable { - private final static long serialVersionUID = 31400L; + private final static long serialVersionUID = 31500L; @XmlElement(defaultValue = "org.jooq.codegen.DefaultGeneratorStrategy") @XmlJavaTypeAdapter(StringAdapter.class) protected String name = "org.jooq.codegen.DefaultGeneratorStrategy"; diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/SyntheticForeignKeyType.java b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/SyntheticForeignKeyType.java index 056627c23b..ec82f0d656 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/SyntheticForeignKeyType.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/SyntheticForeignKeyType.java @@ -28,9 +28,9 @@ import org.jooq.util.jaxb.tools.XMLBuilder; * <all> * <element name="name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * <element name="tables" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> - * <element name="fields" type="{http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd}SyntheticKeyFieldsType"/> + * <element name="fields" type="{http://www.jooq.org/xsd/jooq-codegen-3.15.0.xsd}SyntheticKeyFieldsType"/> * <element name="referencedTable" type="{http://www.w3.org/2001/XMLSchema}string"/> - * <element name="referencedFields" type="{http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd}SyntheticKeyFieldsType" minOccurs="0"/> + * <element name="referencedFields" type="{http://www.jooq.org/xsd/jooq-codegen-3.15.0.xsd}SyntheticKeyFieldsType" minOccurs="0"/> * <element name="referencedKey" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * </all> * </restriction> @@ -50,7 +50,7 @@ import org.jooq.util.jaxb.tools.XMLBuilder; public class SyntheticForeignKeyType implements Serializable, XMLAppendable { - private final static long serialVersionUID = 31400L; + private final static long serialVersionUID = 31500L; @XmlJavaTypeAdapter(StringAdapter.class) protected String name; @XmlJavaTypeAdapter(StringAdapter.class) diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/SyntheticIdentityType.java b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/SyntheticIdentityType.java index f1e2ec3e81..a58e7501c1 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/SyntheticIdentityType.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/SyntheticIdentityType.java @@ -42,7 +42,7 @@ import org.jooq.util.jaxb.tools.XMLBuilder; public class SyntheticIdentityType implements Serializable, XMLAppendable { - private final static long serialVersionUID = 31400L; + private final static long serialVersionUID = 31500L; @XmlJavaTypeAdapter(StringAdapter.class) protected String tables; @XmlElement(required = true) diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/SyntheticObjectsType.java b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/SyntheticObjectsType.java index ae34758ed9..523f0605ab 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/SyntheticObjectsType.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/SyntheticObjectsType.java @@ -30,7 +30,7 @@ import org.jooq.util.jaxb.tools.XMLBuilder; public class SyntheticObjectsType implements Serializable, XMLAppendable { - private final static long serialVersionUID = 31400L; + private final static long serialVersionUID = 31500L; @XmlElementWrapper(name = "identities") @XmlElement(name = "identity") protected List identities; diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/SyntheticPrimaryKeyType.java b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/SyntheticPrimaryKeyType.java index 62e83ff212..26432d4f8d 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/SyntheticPrimaryKeyType.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/SyntheticPrimaryKeyType.java @@ -28,7 +28,7 @@ import org.jooq.util.jaxb.tools.XMLBuilder; * <all> * <element name="name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * <element name="tables" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> - * <element name="fields" type="{http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd}SyntheticKeyFieldsType"/> + * <element name="fields" type="{http://www.jooq.org/xsd/jooq-codegen-3.15.0.xsd}SyntheticKeyFieldsType"/> * <element name="key" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * </all> * </restriction> @@ -48,7 +48,7 @@ import org.jooq.util.jaxb.tools.XMLBuilder; public class SyntheticPrimaryKeyType implements Serializable, XMLAppendable { - private final static long serialVersionUID = 31400L; + private final static long serialVersionUID = 31500L; @XmlJavaTypeAdapter(StringAdapter.class) protected String name; @XmlJavaTypeAdapter(StringAdapter.class) diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/SyntheticUniqueKeyType.java b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/SyntheticUniqueKeyType.java index 06414d34fd..f957122413 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/SyntheticUniqueKeyType.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/SyntheticUniqueKeyType.java @@ -28,7 +28,7 @@ import org.jooq.util.jaxb.tools.XMLBuilder; * <all> * <element name="name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * <element name="tables" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> - * <element name="fields" type="{http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd}SyntheticKeyFieldsType"/> + * <element name="fields" type="{http://www.jooq.org/xsd/jooq-codegen-3.15.0.xsd}SyntheticKeyFieldsType"/> * </all> * </restriction> * </complexContent> @@ -47,7 +47,7 @@ import org.jooq.util.jaxb.tools.XMLBuilder; public class SyntheticUniqueKeyType implements Serializable, XMLAppendable { - private final static long serialVersionUID = 31400L; + private final static long serialVersionUID = 31500L; @XmlJavaTypeAdapter(StringAdapter.class) protected String name; @XmlJavaTypeAdapter(StringAdapter.class) diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Target.java b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Target.java index 0f7e2d1f11..cdc293d667 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Target.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Target.java @@ -28,7 +28,7 @@ import org.jooq.util.jaxb.tools.XMLBuilder; public class Target implements Serializable, XMLAppendable { - private final static long serialVersionUID = 31400L; + private final static long serialVersionUID = 31500L; @XmlElement(defaultValue = "org.jooq.generated") @XmlJavaTypeAdapter(StringAdapter.class) protected String packageName = "org.jooq.generated"; diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/package-info.java b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/package-info.java index fae4a6d391..b73e3709e5 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/package-info.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/package-info.java @@ -1,2 +1,2 @@ -@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) +@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.jooq.org/xsd/jooq-codegen-3.15.0.xsd", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) package org.jooq.meta.jaxb; diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/postgres/PostgresDatabase.java b/jOOQ-meta/src/main/java/org/jooq/meta/postgres/PostgresDatabase.java index d8a4cd0eeb..3c8adc6a25 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/postgres/PostgresDatabase.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/postgres/PostgresDatabase.java @@ -632,6 +632,15 @@ public class PostgresDatabase extends AbstractDatabase implements ResultQueryDat inline(null, BIGINT).as("cache")) .from(SEQUENCES) .where(SEQUENCES.SEQUENCE_SCHEMA.in(schemas)) + .and(!getIncludeSystemSequences() + ? row(SEQUENCES.SEQUENCE_SCHEMA, SEQUENCES.SEQUENCE_NAME).notIn( + select(COLUMNS.TABLE_SCHEMA, COLUMNS.TABLE_NAME.concat(inline("_")).concat(COLUMNS.COLUMN_NAME).concat(inline("_seq"))) + .from(COLUMNS) + .where(COLUMNS.COLUMN_DEFAULT.eq( + inline("nextval('").concat(COLUMNS.TABLE_NAME.concat(inline("_")).concat(COLUMNS.COLUMN_NAME).concat(inline("_seq"))).concat(inline("_seq'::regclass)")) + )) + ) + : noCondition()) .orderBy( SEQUENCES.SEQUENCE_SCHEMA, SEQUENCES.SEQUENCE_NAME); diff --git a/jOOQ-meta/src/main/resources/xsd/jooq-codegen-3.14.0.xsd b/jOOQ-meta/src/main/resources/xsd/jooq-codegen-3.14.0.xsd deleted file mode 100644 index 14fa31f6cb..0000000000 --- a/jOOQ-meta/src/main/resources/xsd/jooq-codegen-3.14.0.xsd +++ /dev/null @@ -1,1862 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @java.lang.Deprecated - @java.lang.Deprecated - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JPADatabase, XMLDatabase, or DDLDatabase, or to pass to JDBC drivers.]]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - org.util.[database].[database]Database. -

-Natively supported values are: -

    -
  • {@link org.jooq.meta.ase.ASEDatabase}
  • -
  • {@link org.jooq.meta.cockroachdb.CockroachDBDatabase}
  • -
  • {@link org.jooq.meta.db2.DB2Database}
  • -
  • {@link org.jooq.meta.derby.DerbyDatabase}
  • -
  • {@link org.jooq.meta.firebird.FirebirdDatabase}
  • -
  • {@link org.jooq.meta.h2.H2Database}
  • -
  • {@link org.jooq.meta.hana.HanaDatabase}
  • -
  • {@link org.jooq.meta.hsqldb.HSQLDBDatabase}
  • -
  • {@link org.jooq.meta.informix.InformixDatabase}
  • -
  • {@link org.jooq.meta.ingres.IngresDatabase}
  • -
  • {@link org.jooq.meta.mariadb.MariaDBDatabase}
  • -
  • {@link org.jooq.meta.mysql.MySQLDatabase}
  • -
  • {@link org.jooq.meta.oracle.OracleDatabase}
  • -
  • {@link org.jooq.meta.postgres.PostgresDatabase}
  • -
  • {@link org.jooq.meta.redshift.RedshiftDatabase}
  • -
  • {@link org.jooq.meta.sqlite.SQLiteDatabase}
  • -
  • {@link org.jooq.meta.sqlserver.SQLServerDatabase}
  • -
  • {@link org.jooq.meta.sybase.SybaseDatabase}
  • -
  • {@link org.jooq.meta.vertica.VerticaDatabase}
  • -
-

-This value can be used to reverse-engineer generic JDBC DatabaseMetaData (e.g. for MS Access). -

    -
  • {@link org.jooq.meta.jdbc.JDBCDatabase}
  • -
-

-This value can be used to reverse-engineer standard jOOQ-meta XML formats. -

    -
  • {@link org.jooq.meta.xml.XMLDatabase}
  • -
-

-This value can be used to reverse-engineer JPA annotated entities -

    -
  • {@link org.jooq.meta.extensions.jpa.JPADatabase}
  • -
-

-You can also provide your own org.jooq.meta.Database implementation -here, if your database is currently not supported]]> - - - - -Known supported properties include: -

-

    -
  • {@link org.jooq.meta.xml.XMLDatabase}

    -

    dialect=ORACLE
    -xml-file=C:\path\to\database.xml
    -xsl-files=C:\path\to\1.xsl,C:\path\to\2.xsl
  • -
  • {@link org.jooq.meta.extensions.jpa.JPADatabase}

    -

    packages=com.example.entities
  • -
  • {@link org.jooq.meta.extensions.ddl.DDLDatabase}

    -

    scripts=C:\path\to\database.sql
    -encoding=UTF-8
  • -
]]>
-
- - - -The default value is "COMMENTS CASE_INSENSITIVE"]]> - - - - - - - - - - - - -This is a Java regular expression. Use the pipe to separate several expressions. -Watch out for case-sensitivity. Depending on your database, this might be -important! -

-You can create case-insensitive regular expressions -using this syntax: (?i:expr) -

-Whitespace is ignored and comments are possible unless overridden in {@link #getRegexFlags()}.]]> - - - - -This is a Java regular expression. Use the pipe to separate several expressions. -Excludes match before includes, i.e. excludes have a higher priority.]]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -This is a Java regular expression. Use the pipe to separate several expressions. -See {@link org.jooq.UpdatableRecord#store()} and {@link org.jooq.UpdatableRecord#delete()} for details about optimistic locking.]]> - - - - -This is a Java regular expression. Use the pipe to separate several expressions. -See {@link org.jooq.UpdatableRecord#store()} and {@link org.jooq.UpdatableRecord#delete()} for details about optimistic locking.]]> - - - - - - - - -To be used if columns are not detected as automatically as identities.]]> - - - - -To be used with: -

    -
  • {@link org.jooq.UpdatableRecord#store()}
  • -
  • {@link org.jooq.UpdatableRecord#update()}
  • -
  • {@link org.jooq.UpdatableRecord#delete()}
  • -
  • {@link org.jooq.UpdatableRecord#refresh()}
  • -
-

-Synthetic primary keys will override existing primary keys.]]> - - - - -To be used with: -

    -
  • {@link org.jooq.UpdatableRecord#store()}
  • -
  • {@link org.jooq.UpdatableRecord#update()}
  • -
  • {@link org.jooq.UpdatableRecord#delete()}
  • -
  • {@link org.jooq.UpdatableRecord#refresh()}
  • -
-

-If several keys match, a warning is emitted and the first one encountered will be used. -

-This flag will also replace synthetic primary keys, if it matches.]]> - - - - - - - - - - - -In jOOQ 3.6.0, #4106 was implemented to support Transact-SQL's -optional return values from stored procedures. This turns all procedures -into Routine (instead of Routine). For backwards- -compatibility reasons, users can suppress this change in jOOQ 3.x -

-@deprecated This feature is deprecated as of jOOQ 3.6.0 and will be removed again in -jOOQ 4.0.]]> - - @java.lang.Deprecated - @java.lang.Deprecated - - - - - - - - - - - - - - -This cannot be combined with the {@link #getCatalogs()} configuration element. -If left empty (and without any {@link #getCatalogs()} configuration element), jOOQ will generate all available catalogs.]]> - - - - -Use this to override your local development -catalog name for source code generation. If not specified, this -will be the same as {@link #getInputCatalog()} -

-This will be ignored if {@link #isOutputCatalogToDefault()} is set to true]]> - - - - - - - - -This cannot be combined with the {@link #getSchemata()} configuration element. -If left empty (and without any {@link #getSchemata()} configuration element), jOOQ will generate all available schemata.]]> - - - - -Use this to override your local development -schema name for source code generation. If not specified, this -will be the same as {@link #getInputSchema()}. - -This will be ignored if {@link #isOutputSchemaToDefault()} is set to true]]> - - - - - - - - -This configuration element cannot be used at the same time as the {@link #getSchemata()} configuration element.]]> - - - - -Using this configuration element in an enviroment that supports multiple -catalogs means that all catalogs are generated. -

-This configuration element cannot be used at the same time as the {@link #getCatalogs()} configuration element.]]> - - - - -There are three operation modes for this element: -

    -
  • The value is a class that can be found on the classpath and that implements - {@link org.jooq.meta.SchemaVersionProvider}. Such classes must provide a default constructor
  • -
  • The value is a SELECT statement that returns one record with one column. The - SELECT statement may contain a named variable called :schema_name
  • -
  • The value is a constant, such as a Maven property
  • -
-

-Schema versions will be generated into the {@link javax.annotation.Generated} annotation on -generated artefacts.]]> - - - - -There are three operation modes for this element: -

    -
  • The value is a class that can be found on the classpath and that implements - {@link org.jooq.meta.CatalogVersionProvider}. Such classes must provide a default constructor
  • -
  • The value is a SELECT statement that returns one record with one column. The - SELECT statement may contain a named variable called :catalog_name
  • -
  • The value is a constant, such as a Maven property
  • -

    -Catalog versions will be generated into the {@link javax.annotation.Generated} annotation on -generated artefacts.]]> - - - - -This comparator can be used to influence the order of any object that is produced by jOOQ meta, and thus, indirectly, the order of declared objects in generated code.]]> - - - - - - - - - - - - - - - - - - - - - - - - - @java.lang.Deprecated - @java.lang.Deprecated - - - - - - - - - - - @java.lang.Deprecated - @java.lang.Deprecated - - - - - - - - - - - - - - -If this is deactivated, such functions are not generated as tables, but -as ordinary routines. This is particularly useful for backwards- -compatibility between jOOQ 3.8 and previous versions, when using TABLE -and VARRAY types in Oracle. -

    -While this flag defaults to true for most databases, it defaults to false -for Oracle.]]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @java.lang.Deprecated - - - - - - - - - - @java.lang.Deprecated - @java.lang.Deprecated - - - - - - - - - - - @java.lang.Deprecated - @java.lang.Deprecated - - - - - - - - - - - @java.lang.Deprecated - @java.lang.Deprecated - - - - - - - - - - - @java.lang.Deprecated - @java.lang.Deprecated - - - - - - - - - - - @java.lang.Deprecated - @java.lang.Deprecated - - - - - - - - - - - @java.lang.Deprecated - @java.lang.Deprecated - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -If provided, {@link #getName()} will be ignored, and either {@link #getConverter()} -or {@link #getBinding()} is required]]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @java.lang.Deprecated - @java.lang.Deprecated - - - - - - - - - - - - - - date attribute.]]> - - - - - - - - - - - - - - - - - - - - - - - - true if {@link #constructorPropertiesAnnotation} is active).]]> - - - - true if {@link #constructorPropertiesAnnotation} is active).]]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -If this flag is set to false, then: -

    -

      -
    • Column name : X_INDEX
    • -
    • Attribute name: xIndex
    • -
    • Getter name : getXIndex()
    • -
    • Setter name : setXIndex()
    • -
    -

    -If this flag is set to true, then: -

      -
    • Getter name : getxIndex()
    • -
    • Setter name : setxIndex()
    • -
    -

    -Custom GeneratorStrategy implementations are unaffected]]> - - - - -This may lead to compilation warnings in current Java versions.]]> - - - - - - - - - - - - -This can be useful if you have a database object that generates a String -class, and you want to avoid naming clashes with the java.lang package -by specifying java\.lang\..*]]> - - - - configurations) should still be generated.]]> - - - - configurations) should still be generated.]]> - - - - -This flag is ignored in the commercial Java 6 distribution of jOOQ 3.9+ ]]> - - - - - - - - - - - - - - - - - -jOOQ may append the schema name to this package if generating multiple schemas, -e.g. org.jooq.generated.schema1, org.jooq.generated.schema2]]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jOOQ/src/main/java/org/jooq/Constants.java b/jOOQ/src/main/java/org/jooq/Constants.java index 6fe5d6a339..2e1f118062 100644 --- a/jOOQ/src/main/java/org/jooq/Constants.java +++ b/jOOQ/src/main/java/org/jooq/Constants.java @@ -129,7 +129,7 @@ public final class Constants { /** * The current jooq-codegen XSD file name. */ - public static final String XSD_CODEGEN = "jooq-codegen-3.14.0.xsd"; + public static final String XSD_CODEGEN = "jooq-codegen-3.15.0.xsd"; /** * The current jooq-codegen XML namespace. diff --git a/jOOQ/src/main/java/org/jooq/impl/MetaSQL.java b/jOOQ/src/main/java/org/jooq/impl/MetaSQL.java index 7af1b20d45..0753508a0d 100644 --- a/jOOQ/src/main/java/org/jooq/impl/MetaSQL.java +++ b/jOOQ/src/main/java/org/jooq/impl/MetaSQL.java @@ -33,7 +33,7 @@ final class MetaSQL { M_SEQUENCES.put(FIREBIRD, "select null catalog, null schema, trim(RDB$GENERATORS.RDB$GENERATOR_NAME) RDB$GENERATOR_NAME, 'BIGINT' type_name, null numeric_precision, null numeric_scale, 0 RDB$INITIAL_VALUE, 1 RDB$GENERATOR_INCREMENT, null min_value, null max_value, null cycle, null cache from RDB$GENERATORS order by RDB$GENERATORS.RDB$GENERATOR_NAME"); M_SEQUENCES.put(H2, "select null catalog, INFORMATION_SCHEMA.SEQUENCES.SEQUENCE_SCHEMA, INFORMATION_SCHEMA.SEQUENCES.SEQUENCE_NAME, 'BIGINT' type_name, null precision, null scale, null start_value, nullif(INFORMATION_SCHEMA.SEQUENCES.INCREMENT, 1) INCREMENT, nullif(INFORMATION_SCHEMA.SEQUENCES.MIN_VALUE, 1) MIN_VALUE, nullif(INFORMATION_SCHEMA.SEQUENCES.MAX_VALUE, 9223372036854775807) MAX_VALUE, INFORMATION_SCHEMA.SEQUENCES.IS_CYCLE, nullif(INFORMATION_SCHEMA.SEQUENCES.CACHE, 32) CACHE from INFORMATION_SCHEMA.SEQUENCES where (INFORMATION_SCHEMA.SEQUENCES.SEQUENCE_SCHEMA in (cast(? as varchar(2147483647))) and upper(INFORMATION_SCHEMA.SEQUENCES.SEQUENCE_NAME) not like 'SYSTEM!_SEQUENCE!_%' escape '!') order by INFORMATION_SCHEMA.SEQUENCES.SEQUENCE_SCHEMA, INFORMATION_SCHEMA.SEQUENCES.SEQUENCE_NAME"); M_SEQUENCES.put(HSQLDB, "select null as catalog, INFORMATION_SCHEMA.SEQUENCES.SEQUENCE_SCHEMA, INFORMATION_SCHEMA.SEQUENCES.SEQUENCE_NAME, INFORMATION_SCHEMA.SEQUENCES.DATA_TYPE, INFORMATION_SCHEMA.SEQUENCES.NUMERIC_PRECISION, INFORMATION_SCHEMA.SEQUENCES.NUMERIC_SCALE, INFORMATION_SCHEMA.SEQUENCES.START_WITH, INFORMATION_SCHEMA.SEQUENCES.INCREMENT, INFORMATION_SCHEMA.SEQUENCES.MINIMUM_VALUE, INFORMATION_SCHEMA.SEQUENCES.MAXIMUM_VALUE, case when INFORMATION_SCHEMA.SEQUENCES.CYCLE_OPTION is not distinct from 'YES' then true else false end as CYCLE_OPTION, null as cache from INFORMATION_SCHEMA.SEQUENCES where INFORMATION_SCHEMA.SEQUENCES.SEQUENCE_SCHEMA in (cast(? as varchar(128))) order by INFORMATION_SCHEMA.SEQUENCES.SEQUENCE_SCHEMA, INFORMATION_SCHEMA.SEQUENCES.SEQUENCE_NAME"); - M_SEQUENCES.put(POSTGRES, "select null as catalog, information_schema.sequences.sequence_schema, information_schema.sequences.sequence_name, information_schema.sequences.data_type, information_schema.sequences.numeric_precision, information_schema.sequences.numeric_scale, nullif(cast(information_schema.sequences.start_value as bigint), 1) as start_value, nullif(cast(information_schema.sequences.increment as bigint), 1) as increment, nullif(cast(information_schema.sequences.minimum_value as bigint), 1) as minimum_value, nullif(cast(information_schema.sequences.maximum_value as decimal), (power(cast(2 as decimal), cast((information_schema.sequences.numeric_precision - 1) as decimal)) - 1)) as maximum_value, cast(information_schema.sequences.cycle_option as boolean) as cycle_option, null as cache from information_schema.sequences where information_schema.sequences.sequence_schema in (?) order by information_schema.sequences.sequence_schema, information_schema.sequences.sequence_name"); + M_SEQUENCES.put(POSTGRES, "select null as catalog, information_schema.sequences.sequence_schema, information_schema.sequences.sequence_name, information_schema.sequences.data_type, information_schema.sequences.numeric_precision, information_schema.sequences.numeric_scale, nullif(cast(information_schema.sequences.start_value as bigint), 1) as start_value, nullif(cast(information_schema.sequences.increment as bigint), 1) as increment, nullif(cast(information_schema.sequences.minimum_value as bigint), 1) as minimum_value, nullif(cast(information_schema.sequences.maximum_value as decimal), (power(cast(2 as decimal), cast((information_schema.sequences.numeric_precision - 1) as decimal)) - 1)) as maximum_value, cast(information_schema.sequences.cycle_option as boolean) as cycle_option, null as cache from information_schema.sequences where (information_schema.sequences.sequence_schema in (?) and (information_schema.sequences.sequence_schema, information_schema.sequences.sequence_name) not in (select information_schema.columns.table_schema, (((information_schema.columns.table_name || '_') || information_schema.columns.column_name) || '_seq') from information_schema.columns where information_schema.columns.column_default = (('nextval(''' || (((information_schema.columns.table_name || '_') || information_schema.columns.column_name) || '_seq')) || '_seq''::regclass)'))) order by information_schema.sequences.sequence_schema, information_schema.sequences.sequence_name");