[jOOQ/jOOQ#10899] Add <includeSystemSequences/> to code generator configuration

This commit is contained in:
Lukas Eder 2020-11-09 16:39:14 +01:00
parent 395266870a
commit 6d0c56e422
40 changed files with 117 additions and 1906 deletions

View File

@ -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()));

View File

@ -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;

View File

@ -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.
*/

View File

@ -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);

View File

@ -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 = "";

View File

@ -24,10 +24,10 @@ import org.jooq.util.jaxb.tools.XMLBuilder;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;all&gt;
* &lt;element name="logging" type="{http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd}Logging" minOccurs="0"/&gt;
* &lt;element name="onError" type="{http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd}OnError" minOccurs="0"/&gt;
* &lt;element name="jdbc" type="{http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd}Jdbc" minOccurs="0"/&gt;
* &lt;element name="generator" type="{http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd}Generator"/&gt;
* &lt;element name="logging" type="{http://www.jooq.org/xsd/jooq-codegen-3.15.0.xsd}Logging" minOccurs="0"/&gt;
* &lt;element name="onError" type="{http://www.jooq.org/xsd/jooq-codegen-3.15.0.xsd}OnError" minOccurs="0"/&gt;
* &lt;element name="jdbc" type="{http://www.jooq.org/xsd/jooq-codegen-3.15.0.xsd}Jdbc" minOccurs="0"/&gt;
* &lt;element name="generator" type="{http://www.jooq.org/xsd/jooq-codegen-3.15.0.xsd}Generator"/&gt;
* &lt;element name="basedir" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
* &lt;/all&gt;
* &lt;/restriction&gt;
@ -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")

View File

@ -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;

View File

@ -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()));

View File

@ -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)

View File

@ -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)

View File

@ -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;

View File

@ -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)

View File

@ -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")

View File

@ -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";

View File

@ -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)

View File

@ -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;

View File

@ -23,7 +23,7 @@ import org.jooq.util.jaxb.tools.XMLBuilder;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;all&gt;
* &lt;element name="transform" type="{http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd}MatcherTransformType" minOccurs="0"/&gt;
* &lt;element name="transform" type="{http://www.jooq.org/xsd/jooq-codegen-3.15.0.xsd}MatcherTransformType" minOccurs="0"/&gt;
* &lt;element name="expression" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
* &lt;/all&gt;
* &lt;/restriction&gt;
@ -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)

View File

@ -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<MatchersCatalogType> catalogs;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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 = "";

View File

@ -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";

View File

@ -28,9 +28,9 @@ import org.jooq.util.jaxb.tools.XMLBuilder;
* &lt;all&gt;
* &lt;element name="name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
* &lt;element name="tables" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
* &lt;element name="fields" type="{http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd}SyntheticKeyFieldsType"/&gt;
* &lt;element name="fields" type="{http://www.jooq.org/xsd/jooq-codegen-3.15.0.xsd}SyntheticKeyFieldsType"/&gt;
* &lt;element name="referencedTable" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
* &lt;element name="referencedFields" type="{http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd}SyntheticKeyFieldsType" minOccurs="0"/&gt;
* &lt;element name="referencedFields" type="{http://www.jooq.org/xsd/jooq-codegen-3.15.0.xsd}SyntheticKeyFieldsType" minOccurs="0"/&gt;
* &lt;element name="referencedKey" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
* &lt;/all&gt;
* &lt;/restriction&gt;
@ -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)

View File

@ -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)

View File

@ -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<SyntheticIdentityType> identities;

View File

@ -28,7 +28,7 @@ import org.jooq.util.jaxb.tools.XMLBuilder;
* &lt;all&gt;
* &lt;element name="name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
* &lt;element name="tables" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
* &lt;element name="fields" type="{http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd}SyntheticKeyFieldsType"/&gt;
* &lt;element name="fields" type="{http://www.jooq.org/xsd/jooq-codegen-3.15.0.xsd}SyntheticKeyFieldsType"/&gt;
* &lt;element name="key" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
* &lt;/all&gt;
* &lt;/restriction&gt;
@ -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)

View File

@ -28,7 +28,7 @@ import org.jooq.util.jaxb.tools.XMLBuilder;
* &lt;all&gt;
* &lt;element name="name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
* &lt;element name="tables" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
* &lt;element name="fields" type="{http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd}SyntheticKeyFieldsType"/&gt;
* &lt;element name="fields" type="{http://www.jooq.org/xsd/jooq-codegen-3.15.0.xsd}SyntheticKeyFieldsType"/&gt;
* &lt;/all&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
@ -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)

View File

@ -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";

View File

@ -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;

View File

@ -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);

File diff suppressed because it is too large Load Diff

View File

@ -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.

View File

@ -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");