[jOOQ/jOOQ#9574] Add org.jooq.Synonym
This includes: - Code generation support - MetaSQL support - HSQLDB code generation
This commit is contained in:
parent
cf7cdae07c
commit
b68ec5fbd2
@ -97,6 +97,7 @@ abstract class AbstractGenerator implements Generator {
|
||||
|
||||
|
||||
|
||||
|
||||
boolean generateSequences = true;
|
||||
boolean generateSequenceFlags = true;
|
||||
boolean generateUDTs = true;
|
||||
@ -145,6 +146,7 @@ abstract class AbstractGenerator implements Generator {
|
||||
|
||||
|
||||
|
||||
|
||||
boolean generateGlobalUDTReferences = true;
|
||||
boolean generateGlobalQueueReferences = true;
|
||||
boolean generateGlobalLinkReferences = true;
|
||||
@ -580,6 +582,16 @@ abstract class AbstractGenerator implements Generator {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -998,6 +1010,16 @@ abstract class AbstractGenerator implements Generator {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -175,6 +175,7 @@ public abstract class AbstractGeneratorStrategy implements GeneratorStrategy {
|
||||
|
||||
|
||||
|
||||
|
||||
|| definition instanceof IndexDefinition
|
||||
|| definition instanceof IdentityDefinition
|
||||
|| definition instanceof ConstraintDefinition
|
||||
|
||||
@ -88,6 +88,7 @@ import org.jooq.meta.ParameterDefinition;
|
||||
import org.jooq.meta.RoutineDefinition;
|
||||
import org.jooq.meta.SchemaDefinition;
|
||||
import org.jooq.meta.SequenceDefinition;
|
||||
// ...
|
||||
import org.jooq.meta.SyntheticDaoDefinition;
|
||||
import org.jooq.meta.TableDefinition;
|
||||
// ...
|
||||
@ -448,6 +449,8 @@ public class DefaultGeneratorStrategy extends AbstractGeneratorStrategy {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
else if (UniqueKeyDefinition.class.isAssignableFrom(objectType))
|
||||
return "UniqueKeyNames";
|
||||
else
|
||||
@ -499,6 +502,8 @@ public class DefaultGeneratorStrategy extends AbstractGeneratorStrategy {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
else if (UDTDefinition.class.isAssignableFrom(objectType))
|
||||
return "UDTs";
|
||||
else
|
||||
|
||||
@ -618,6 +618,7 @@ public class GenerationTool {
|
||||
|
||||
|
||||
|
||||
|
||||
database.setIncludeSequences(!FALSE.equals(d.isIncludeSequences()));
|
||||
database.setIncludeTables(!FALSE.equals(d.isIncludeTables()));
|
||||
database.setIncludeEmbeddables(!FALSE.equals(d.isIncludeEmbeddables()));
|
||||
@ -795,6 +796,8 @@ public class GenerationTool {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (g.getGenerate().isSequences() != null)
|
||||
generator.setGenerateSequences(g.getGenerate().isSequences());
|
||||
if (g.getGenerate().isSequenceFlags() != null)
|
||||
@ -877,6 +880,8 @@ public class GenerationTool {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (g.getGenerate().isGlobalSchemaReferences() != null)
|
||||
generator.setGenerateGlobalSchemaReferences(g.getGenerate().isGlobalSchemaReferences());
|
||||
if (g.getGenerate().isGlobalRoutineReferences() != null)
|
||||
|
||||
@ -410,6 +410,16 @@ public interface Generator {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -875,6 +885,18 @@ public interface Generator {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -146,6 +146,7 @@ import org.jooq.SelectField;
|
||||
import org.jooq.Sequence;
|
||||
import org.jooq.SortOrder;
|
||||
import org.jooq.Stringly;
|
||||
// ...
|
||||
import org.jooq.Table;
|
||||
import org.jooq.TableField;
|
||||
import org.jooq.TableOptions;
|
||||
@ -208,6 +209,7 @@ import org.jooq.meta.ParameterDefinition;
|
||||
import org.jooq.meta.RoutineDefinition;
|
||||
import org.jooq.meta.SchemaDefinition;
|
||||
import org.jooq.meta.SequenceDefinition;
|
||||
// ...
|
||||
import org.jooq.meta.SyntheticDaoDefinition;
|
||||
import org.jooq.meta.TableDefinition;
|
||||
// ...
|
||||
@ -531,6 +533,7 @@ public class JavaGenerator extends AbstractGenerator {
|
||||
|
||||
|
||||
|
||||
|
||||
log.info(" udts", generateUDTs());
|
||||
log.info(" relations", generateRelations()
|
||||
+ ((!generateRelations && generateTables) ? " (forced to true because of <tables/>)" :
|
||||
@ -608,6 +611,7 @@ public class JavaGenerator extends AbstractGenerator {
|
||||
|
||||
|
||||
|
||||
|
||||
|| !database.getEmbeddables(schema).isEmpty()
|
||||
|| !database.getEnums(schema).isEmpty()
|
||||
|| !database.getPackages(schema).isEmpty()
|
||||
@ -712,6 +716,7 @@ public class JavaGenerator extends AbstractGenerator {
|
||||
|
||||
|
||||
|
||||
|
||||
if (hasSequences) {
|
||||
if (generateGlobalSequenceReferences())
|
||||
generateSequences(schema);
|
||||
@ -837,6 +842,16 @@ public class JavaGenerator extends AbstractGenerator {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (hasRoutines) {
|
||||
if (generateRoutines() || generateGlobalObjectNames())
|
||||
@ -9166,6 +9181,86 @@ public class JavaGenerator extends AbstractGenerator {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -9280,6 +9375,8 @@ public class JavaGenerator extends AbstractGenerator {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
else if (objectType == UDTDefinition.class)
|
||||
return s.getDatabase().getUDTs(s).stream().filter(u -> u.getPackage() == null).collect(toList());
|
||||
else if (objectType == UniqueKeyDefinition.class)
|
||||
@ -9562,6 +9659,8 @@ public class JavaGenerator extends AbstractGenerator {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// [#9685] Avoid referencing table literals if they're not generated
|
||||
if (generateTables())
|
||||
printReferences(out, database.getTables(schema), Table.class);
|
||||
|
||||
@ -117,6 +117,7 @@ import org.jooq.Parser;
|
||||
import org.jooq.Query;
|
||||
import org.jooq.Record;
|
||||
import org.jooq.Record14;
|
||||
import org.jooq.Record6;
|
||||
import org.jooq.SQLDialect;
|
||||
import org.jooq.Schema;
|
||||
import org.jooq.Select;
|
||||
@ -213,6 +214,7 @@ public abstract class AbstractDatabase implements Database {
|
||||
|
||||
|
||||
|
||||
|
||||
private boolean includeSequences = true;
|
||||
private boolean includeIndexes = true;
|
||||
private boolean includeCheckConstraints = true;
|
||||
@ -306,6 +308,7 @@ public abstract class AbstractDatabase implements Database {
|
||||
|
||||
|
||||
|
||||
|
||||
private List<XMLSchemaCollectionDefinition> xmlSchemaCollections;
|
||||
private List<UDTDefinition> udts;
|
||||
private List<ArrayDefinition> arrays;
|
||||
@ -332,6 +335,7 @@ public abstract class AbstractDatabase implements Database {
|
||||
|
||||
|
||||
|
||||
|
||||
private transient Map<SchemaDefinition, List<XMLSchemaCollectionDefinition>> xmlSchemaCollectionsBySchema;
|
||||
private transient Map<SchemaDefinition, List<UDTDefinition>> udtsBySchema;
|
||||
private transient Map<PackageDefinition, List<UDTDefinition>> udtsByPackage;
|
||||
@ -1335,6 +1339,16 @@ public abstract class AbstractDatabase implements Database {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -3003,6 +3017,54 @@ public abstract class AbstractDatabase implements Database {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -4238,6 +4300,51 @@ public abstract class AbstractDatabase implements Database {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -355,6 +355,42 @@ public interface Database extends AutoCloseable {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -745,6 +781,16 @@ public interface Database extends AutoCloseable {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -0,0 +1,71 @@
|
||||
/*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* Other licenses:
|
||||
* -----------------------------------------------------------------------------
|
||||
* Commercial licenses for this work are available. These replace the above
|
||||
* Apache-2.0 license and offer limited warranties, support, maintenance, and
|
||||
* commercial database integrations.
|
||||
*
|
||||
* For more information, please visit: https://www.jooq.org/legal/licensing
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.jooq.meta;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -37,8 +37,7 @@
|
||||
*/
|
||||
package org.jooq.meta;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.EnumSet;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -47,8 +47,6 @@ import org.jooq.Record4;
|
||||
import org.jooq.Record5;
|
||||
import org.jooq.Record6;
|
||||
import org.jooq.ResultQuery;
|
||||
// ...
|
||||
// ...
|
||||
|
||||
import org.jetbrains.annotations.ApiStatus.Internal;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@ -203,6 +201,25 @@ public interface ResultQueryDatabase extends Database {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
58
jOOQ-meta/src/main/java/org/jooq/meta/SynonymDefinition.java
Normal file
58
jOOQ-meta/src/main/java/org/jooq/meta/SynonymDefinition.java
Normal file
@ -0,0 +1,58 @@
|
||||
/*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* Other licenses:
|
||||
* -----------------------------------------------------------------------------
|
||||
* Commercial licenses for this work are available. These replace the above
|
||||
* Apache-2.0 license and offer limited warranties, support, maintenance, and
|
||||
* commercial database integrations.
|
||||
*
|
||||
* For more information, please visit: https://www.jooq.org/legal/licensing
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.jooq.meta;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -361,6 +361,11 @@ public class ClickHouseDatabase extends AbstractDatabase implements ResultQueryD
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected List<XMLSchemaCollectionDefinition> getXMLSchemaCollections0() throws SQLException {
|
||||
List<XMLSchemaCollectionDefinition> result = new ArrayList<>();
|
||||
|
||||
@ -596,6 +596,11 @@ public class DerbyDatabase extends AbstractDatabase implements ResultQueryDataba
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -411,6 +411,11 @@ public class DuckDBDatabase extends AbstractDatabase implements ResultQueryDatab
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public ResultQuery<Record12<String, String, String, String, Integer, Integer, Long, Long, BigDecimal, BigDecimal, Boolean, Long>> sequences(List<String> schemas) {
|
||||
return create()
|
||||
|
||||
@ -690,6 +690,11 @@ public class FirebirdDatabase extends AbstractDatabase implements ResultQueryDat
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -747,6 +747,11 @@ public class H2Database extends AbstractDatabase implements ResultQueryDatabase
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected List<SequenceDefinition> getSequences0() throws SQLException {
|
||||
List<SequenceDefinition> result = new ArrayList<>();
|
||||
|
||||
@ -71,6 +71,7 @@ import static org.jooq.meta.hsqldb.information_schema.Tables.SCHEMATA;
|
||||
import static org.jooq.meta.hsqldb.information_schema.Tables.SEQUENCES;
|
||||
import static org.jooq.meta.hsqldb.information_schema.Tables.SYSTEM_COLUMNS;
|
||||
import static org.jooq.meta.hsqldb.information_schema.Tables.SYSTEM_INDEXINFO;
|
||||
import static org.jooq.meta.hsqldb.information_schema.Tables.SYSTEM_SYNONYMS;
|
||||
import static org.jooq.meta.hsqldb.information_schema.Tables.SYSTEM_TABLES;
|
||||
import static org.jooq.meta.hsqldb.information_schema.Tables.TABLE_CONSTRAINTS;
|
||||
import static org.jooq.meta.hsqldb.information_schema.Tables.TRIGGERS;
|
||||
@ -130,15 +131,19 @@ import org.jooq.meta.TableDefinition;
|
||||
// ...
|
||||
import org.jooq.meta.UDTDefinition;
|
||||
import org.jooq.meta.XMLSchemaCollectionDefinition;
|
||||
import org.jooq.meta.hsqldb.information_schema.Tables;
|
||||
import org.jooq.meta.hsqldb.information_schema.tables.CheckConstraints;
|
||||
import org.jooq.meta.hsqldb.information_schema.tables.Columns;
|
||||
import org.jooq.meta.hsqldb.information_schema.tables.DomainConstraints;
|
||||
import org.jooq.meta.hsqldb.information_schema.tables.Domains;
|
||||
import org.jooq.meta.hsqldb.information_schema.tables.KeyColumnUsage;
|
||||
import org.jooq.meta.hsqldb.information_schema.tables.SystemSynonyms;
|
||||
import org.jooq.meta.hsqldb.information_schema.tables.Triggers;
|
||||
import org.jooq.tools.JooqLogger;
|
||||
import org.jooq.tools.StringUtils;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* The HSQLDB database
|
||||
*
|
||||
@ -661,6 +666,26 @@ public class HSQLDBDatabase extends AbstractDatabase implements ResultQueryDatab
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -8,6 +8,7 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.jooq.Table;
|
||||
import org.jooq.impl.DSL;
|
||||
import org.jooq.impl.SchemaImpl;
|
||||
import org.jooq.meta.hsqldb.information_schema.tables.CheckConstraints;
|
||||
import org.jooq.meta.hsqldb.information_schema.tables.Columns;
|
||||
@ -22,6 +23,7 @@ import org.jooq.meta.hsqldb.information_schema.tables.Schemata;
|
||||
import org.jooq.meta.hsqldb.information_schema.tables.Sequences;
|
||||
import org.jooq.meta.hsqldb.information_schema.tables.SystemColumns;
|
||||
import org.jooq.meta.hsqldb.information_schema.tables.SystemIndexinfo;
|
||||
import org.jooq.meta.hsqldb.information_schema.tables.SystemSynonyms;
|
||||
import org.jooq.meta.hsqldb.information_schema.tables.SystemTables;
|
||||
import org.jooq.meta.hsqldb.information_schema.tables.TableConstraints;
|
||||
import org.jooq.meta.hsqldb.information_schema.tables.Tables;
|
||||
@ -32,7 +34,7 @@ import org.jooq.meta.hsqldb.information_schema.tables.Views;
|
||||
/**
|
||||
* This class is generated by jOOQ.
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||
public class InformationSchema extends SchemaImpl {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@ -109,6 +111,11 @@ public class InformationSchema extends SchemaImpl {
|
||||
*/
|
||||
public final SystemIndexinfo SYSTEM_INDEXINFO = SystemIndexinfo.SYSTEM_INDEXINFO;
|
||||
|
||||
/**
|
||||
* the synonyms for tables and other objects defined in this database
|
||||
*/
|
||||
public final SystemSynonyms SYSTEM_SYNONYMS = SystemSynonyms.SYSTEM_SYNONYMS;
|
||||
|
||||
/**
|
||||
* the accessible tables defined within this database
|
||||
*/
|
||||
@ -138,7 +145,7 @@ public class InformationSchema extends SchemaImpl {
|
||||
* No further instances allowed
|
||||
*/
|
||||
private InformationSchema() {
|
||||
super("INFORMATION_SCHEMA", null);
|
||||
super(DSL.name("INFORMATION_SCHEMA"), null, DSL.comment(""));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -157,6 +164,7 @@ public class InformationSchema extends SchemaImpl {
|
||||
Sequences.SEQUENCES,
|
||||
SystemColumns.SYSTEM_COLUMNS,
|
||||
SystemIndexinfo.SYSTEM_INDEXINFO,
|
||||
SystemSynonyms.SYSTEM_SYNONYMS,
|
||||
SystemTables.SYSTEM_TABLES,
|
||||
TableConstraints.TABLE_CONSTRAINTS,
|
||||
Tables.TABLES,
|
||||
|
||||
@ -29,7 +29,7 @@ import org.jooq.meta.hsqldb.information_schema.tables.Views;
|
||||
* A class modelling foreign key relationships and constraints of tables in
|
||||
* INFORMATION_SCHEMA.
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||
public class Keys {
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
@ -64,7 +64,6 @@ public class Keys {
|
||||
public static final ForeignKey<Record, Record> SYNTHETIC_FK_SEQUENCES__SYNTHETIC_PK_SCHEMATA = Internal.createForeignKey(Sequences.SEQUENCES, DSL.name("SYNTHETIC_FK_SEQUENCES__SYNTHETIC_PK_SCHEMATA"), new TableField[] { Sequences.SEQUENCES.SEQUENCE_CATALOG, Sequences.SEQUENCES.SEQUENCE_SCHEMA }, Keys.SYNTHETIC_PK_SCHEMATA, new TableField[] { Schemata.SCHEMATA.CATALOG_NAME, Schemata.SCHEMATA.SCHEMA_NAME }, true);
|
||||
public static final ForeignKey<Record, Record> SYNTHETIC_FK_TABLE_CONSTRAINTS__SYNTHETIC_PK_SCHEMATA = Internal.createForeignKey(TableConstraints.TABLE_CONSTRAINTS, DSL.name("SYNTHETIC_FK_TABLE_CONSTRAINTS__SYNTHETIC_PK_SCHEMATA"), new TableField[] { TableConstraints.TABLE_CONSTRAINTS.CONSTRAINT_CATALOG, TableConstraints.TABLE_CONSTRAINTS.CONSTRAINT_SCHEMA }, Keys.SYNTHETIC_PK_SCHEMATA, new TableField[] { Schemata.SCHEMATA.CATALOG_NAME, Schemata.SCHEMATA.SCHEMA_NAME }, true);
|
||||
public static final ForeignKey<Record, Record> SYNTHETIC_FK_TABLES__SYNTHETIC_PK_SCHEMATA = Internal.createForeignKey(Tables.TABLES, DSL.name("SYNTHETIC_FK_TABLES__SYNTHETIC_PK_SCHEMATA"), new TableField[] { Tables.TABLES.TABLE_CATALOG, Tables.TABLES.TABLE_SCHEMA }, Keys.SYNTHETIC_PK_SCHEMATA, new TableField[] { Schemata.SCHEMATA.CATALOG_NAME, Schemata.SCHEMATA.SCHEMA_NAME }, true);
|
||||
public static final ForeignKey<Record, Record> SYNTHETIC_FK_TRIGGERS__SYNTHETIC_PK_TABLES = Internal.createForeignKey(Triggers.TRIGGERS, DSL.name("SYNTHETIC_FK_TRIGGERS__SYNTHETIC_PK_TABLES"), new TableField[] { Triggers.TRIGGERS.EVENT_OBJECT_CATALOG, Triggers.TRIGGERS.EVENT_OBJECT_SCHEMA }, Keys.SYNTHETIC_PK_TABLES, new TableField[] { Tables.TABLES.TABLE_CATALOG, Tables.TABLES.TABLE_SCHEMA }, true);
|
||||
public static final ForeignKey<Record, Record> SYNTHETIC_FK_VIEWS__SYNTHETIC_PK_SCHEMATA = Internal.createForeignKey(Views.VIEWS, DSL.name("SYNTHETIC_FK_VIEWS__SYNTHETIC_PK_SCHEMATA"), new TableField[] { Views.VIEWS.TABLE_CATALOG, Views.VIEWS.TABLE_SCHEMA }, Keys.SYNTHETIC_PK_SCHEMATA, new TableField[] { Schemata.SCHEMATA.CATALOG_NAME, Schemata.SCHEMATA.SCHEMA_NAME }, true);
|
||||
public static final ForeignKey<Record, Record> SYNTHETIC_FK_VIEWS__SYNTHETIC_PK_TABLES = Internal.createForeignKey(Views.VIEWS, DSL.name("SYNTHETIC_FK_VIEWS__SYNTHETIC_PK_TABLES"), new TableField[] { Views.VIEWS.TABLE_CATALOG, Views.VIEWS.TABLE_SCHEMA, Views.VIEWS.TABLE_NAME }, Keys.SYNTHETIC_PK_TABLES, new TableField[] { Tables.TABLES.TABLE_CATALOG, Tables.TABLES.TABLE_SCHEMA, Tables.TABLES.TABLE_NAME }, true);
|
||||
}
|
||||
|
||||
@ -17,6 +17,7 @@ import org.jooq.meta.hsqldb.information_schema.tables.Schemata;
|
||||
import org.jooq.meta.hsqldb.information_schema.tables.Sequences;
|
||||
import org.jooq.meta.hsqldb.information_schema.tables.SystemColumns;
|
||||
import org.jooq.meta.hsqldb.information_schema.tables.SystemIndexinfo;
|
||||
import org.jooq.meta.hsqldb.information_schema.tables.SystemSynonyms;
|
||||
import org.jooq.meta.hsqldb.information_schema.tables.SystemTables;
|
||||
import org.jooq.meta.hsqldb.information_schema.tables.TableConstraints;
|
||||
import org.jooq.meta.hsqldb.information_schema.tables.Triggers;
|
||||
@ -26,7 +27,7 @@ import org.jooq.meta.hsqldb.information_schema.tables.Views;
|
||||
/**
|
||||
* Convenience access to all tables in INFORMATION_SCHEMA.
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||
public class Tables {
|
||||
|
||||
/**
|
||||
@ -96,6 +97,11 @@ public class Tables {
|
||||
*/
|
||||
public static final SystemIndexinfo SYSTEM_INDEXINFO = SystemIndexinfo.SYSTEM_INDEXINFO;
|
||||
|
||||
/**
|
||||
* the synonyms for tables and other objects defined in this database
|
||||
*/
|
||||
public static final SystemSynonyms SYSTEM_SYNONYMS = SystemSynonyms.SYSTEM_SYNONYMS;
|
||||
|
||||
/**
|
||||
* the accessible tables defined within this database
|
||||
*/
|
||||
|
||||
@ -28,7 +28,7 @@ import org.jooq.meta.hsqldb.information_schema.Keys;
|
||||
/**
|
||||
* one row for each domain constraint, table check constraint, and assertion.
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||
public class CheckConstraints extends TableImpl<Record> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@ -119,20 +119,7 @@ public class CheckConstraints extends TableImpl<Record> {
|
||||
|
||||
@Override
|
||||
public List<ForeignKey<Record, ?>> getReferences() {
|
||||
return Arrays.asList(Keys.SYNTHETIC_FK_CHECK_CONSTRAINTS__SYNTHETIC_PK_TABLE_CONSTRAINTS, Keys.SYNTHETIC_FK_CHECK_CONSTRAINTS__SYNTHETIC_PK_SCHEMATA);
|
||||
}
|
||||
|
||||
private transient TableConstraints _tableConstraints;
|
||||
|
||||
/**
|
||||
* Get the implicit join path to the
|
||||
* <code>INFORMATION_SCHEMA.TABLE_CONSTRAINTS</code> table.
|
||||
*/
|
||||
public TableConstraints tableConstraints() {
|
||||
if (_tableConstraints == null)
|
||||
_tableConstraints = new TableConstraints(this, Keys.SYNTHETIC_FK_CHECK_CONSTRAINTS__SYNTHETIC_PK_TABLE_CONSTRAINTS, null);
|
||||
|
||||
return _tableConstraints;
|
||||
return Arrays.asList(Keys.SYNTHETIC_FK_CHECK_CONSTRAINTS__SYNTHETIC_PK_SCHEMATA, Keys.SYNTHETIC_FK_CHECK_CONSTRAINTS__SYNTHETIC_PK_TABLE_CONSTRAINTS);
|
||||
}
|
||||
|
||||
private transient Schemata _schemata;
|
||||
@ -148,6 +135,19 @@ public class CheckConstraints extends TableImpl<Record> {
|
||||
return _schemata;
|
||||
}
|
||||
|
||||
private transient TableConstraints _tableConstraints;
|
||||
|
||||
/**
|
||||
* Get the implicit join path to the
|
||||
* <code>INFORMATION_SCHEMA.TABLE_CONSTRAINTS</code> table.
|
||||
*/
|
||||
public TableConstraints tableConstraints() {
|
||||
if (_tableConstraints == null)
|
||||
_tableConstraints = new TableConstraints(this, Keys.SYNTHETIC_FK_CHECK_CONSTRAINTS__SYNTHETIC_PK_TABLE_CONSTRAINTS, null);
|
||||
|
||||
return _tableConstraints;
|
||||
}
|
||||
|
||||
private transient DomainConstraints _domainConstraints;
|
||||
|
||||
/**
|
||||
|
||||
@ -27,7 +27,7 @@ import org.jooq.meta.hsqldb.information_schema.Keys;
|
||||
/**
|
||||
* one row for each column of table of view
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||
public class Columns extends TableImpl<Record> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@ -343,20 +343,7 @@ public class Columns extends TableImpl<Record> {
|
||||
|
||||
@Override
|
||||
public List<ForeignKey<Record, ?>> getReferences() {
|
||||
return Arrays.asList(Keys.SYNTHETIC_FK_COLUMNS__SYNTHETIC_PK_TABLES, Keys.SYNTHETIC_FK_COLUMNS__SYNTHETIC_PK_SCHEMATA);
|
||||
}
|
||||
|
||||
private transient Tables _tables;
|
||||
|
||||
/**
|
||||
* Get the implicit join path to the <code>INFORMATION_SCHEMA.TABLES</code>
|
||||
* table.
|
||||
*/
|
||||
public Tables tables() {
|
||||
if (_tables == null)
|
||||
_tables = new Tables(this, Keys.SYNTHETIC_FK_COLUMNS__SYNTHETIC_PK_TABLES, null);
|
||||
|
||||
return _tables;
|
||||
return Arrays.asList(Keys.SYNTHETIC_FK_COLUMNS__SYNTHETIC_PK_SCHEMATA, Keys.SYNTHETIC_FK_COLUMNS__SYNTHETIC_PK_TABLES);
|
||||
}
|
||||
|
||||
private transient Schemata _schemata;
|
||||
@ -372,6 +359,19 @@ public class Columns extends TableImpl<Record> {
|
||||
return _schemata;
|
||||
}
|
||||
|
||||
private transient Tables _tables;
|
||||
|
||||
/**
|
||||
* Get the implicit join path to the <code>INFORMATION_SCHEMA.TABLES</code>
|
||||
* table.
|
||||
*/
|
||||
public Tables tables() {
|
||||
if (_tables == null)
|
||||
_tables = new Tables(this, Keys.SYNTHETIC_FK_COLUMNS__SYNTHETIC_PK_TABLES, null);
|
||||
|
||||
return _tables;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Columns as(String alias) {
|
||||
return new Columns(DSL.name(alias), this);
|
||||
|
||||
@ -27,7 +27,7 @@ import org.jooq.meta.hsqldb.information_schema.Keys;
|
||||
/**
|
||||
* one row for each check constraint included in a domain definition
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||
public class DomainConstraints extends TableImpl<Record> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@ -137,20 +137,7 @@ public class DomainConstraints extends TableImpl<Record> {
|
||||
|
||||
@Override
|
||||
public List<ForeignKey<Record, ?>> getReferences() {
|
||||
return Arrays.asList(Keys.SYNTHETIC_FK_DOMAIN_CONSTRAINTS__SYNTHETIC_PK_SCHEMATA, Keys.SYNTHETIC_FK_DOMAIN_CONSTRAINTS__SYNTHETIC_PK_CHECK_CONSTRAINTS, Keys.SYNTHETIC_FK_DOMAIN_CONSTRAINTS__SYNTHETIC_PK_DOMAINS);
|
||||
}
|
||||
|
||||
private transient Schemata _schemata;
|
||||
|
||||
/**
|
||||
* Get the implicit join path to the
|
||||
* <code>INFORMATION_SCHEMA.SCHEMATA</code> table.
|
||||
*/
|
||||
public Schemata schemata() {
|
||||
if (_schemata == null)
|
||||
_schemata = new Schemata(this, Keys.SYNTHETIC_FK_DOMAIN_CONSTRAINTS__SYNTHETIC_PK_SCHEMATA, null);
|
||||
|
||||
return _schemata;
|
||||
return Arrays.asList(Keys.SYNTHETIC_FK_DOMAIN_CONSTRAINTS__SYNTHETIC_PK_CHECK_CONSTRAINTS, Keys.SYNTHETIC_FK_DOMAIN_CONSTRAINTS__SYNTHETIC_PK_DOMAINS, Keys.SYNTHETIC_FK_DOMAIN_CONSTRAINTS__SYNTHETIC_PK_SCHEMATA);
|
||||
}
|
||||
|
||||
private transient CheckConstraints _checkConstraints;
|
||||
@ -179,6 +166,19 @@ public class DomainConstraints extends TableImpl<Record> {
|
||||
return _domains;
|
||||
}
|
||||
|
||||
private transient Schemata _schemata;
|
||||
|
||||
/**
|
||||
* Get the implicit join path to the
|
||||
* <code>INFORMATION_SCHEMA.SCHEMATA</code> table.
|
||||
*/
|
||||
public Schemata schemata() {
|
||||
if (_schemata == null)
|
||||
_schemata = new Schemata(this, Keys.SYNTHETIC_FK_DOMAIN_CONSTRAINTS__SYNTHETIC_PK_SCHEMATA, null);
|
||||
|
||||
return _schemata;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DomainConstraints as(String alias) {
|
||||
return new DomainConstraints(DSL.name(alias), this);
|
||||
|
||||
@ -25,7 +25,7 @@ import org.jooq.meta.hsqldb.information_schema.Keys;
|
||||
/**
|
||||
* one row for each domain identified
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||
public class Domains extends TableImpl<Record> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ -21,7 +21,7 @@ import org.jooq.meta.hsqldb.information_schema.InformationSchema;
|
||||
/**
|
||||
* This class is generated by jOOQ.
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||
public class ElementTypes extends TableImpl<Record> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ -27,7 +27,7 @@ import org.jooq.meta.hsqldb.information_schema.Keys;
|
||||
/**
|
||||
* one row for each column used in s primary key or unique constraint
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||
public class KeyColumnUsage extends TableImpl<Record> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ -21,7 +21,7 @@ import org.jooq.meta.hsqldb.information_schema.InformationSchema;
|
||||
/**
|
||||
* one row for each routine parameter
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||
public class Parameters extends TableImpl<Record> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ -27,7 +27,7 @@ import org.jooq.meta.hsqldb.information_schema.Keys;
|
||||
/**
|
||||
* one row for each foreign key constraint
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||
public class ReferentialConstraints extends TableImpl<Record> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@ -143,20 +143,21 @@ public class ReferentialConstraints extends TableImpl<Record> {
|
||||
|
||||
@Override
|
||||
public List<ForeignKey<Record, ?>> getReferences() {
|
||||
return Arrays.asList(Keys.SYNTHETIC_FK_REFERENTIAL_CONSTRAINTS__SYNTHETIC_PK_SCHEMATA, Keys.REFERENCING_CONSTRAINT, Keys.REFERENCED_CONSTRAINT);
|
||||
return Arrays.asList(Keys.REFERENCED_CONSTRAINT, Keys.REFERENCING_CONSTRAINT, Keys.SYNTHETIC_FK_REFERENTIAL_CONSTRAINTS__SYNTHETIC_PK_SCHEMATA);
|
||||
}
|
||||
|
||||
private transient Schemata _schemata;
|
||||
private transient TableConstraints _referencedConstraint;
|
||||
|
||||
/**
|
||||
* Get the implicit join path to the
|
||||
* <code>INFORMATION_SCHEMA.SCHEMATA</code> table.
|
||||
* <code>INFORMATION_SCHEMA.TABLE_CONSTRAINTS</code> table, via the
|
||||
* <code>REFERENCED_CONSTRAINT</code> key.
|
||||
*/
|
||||
public Schemata schemata() {
|
||||
if (_schemata == null)
|
||||
_schemata = new Schemata(this, Keys.SYNTHETIC_FK_REFERENTIAL_CONSTRAINTS__SYNTHETIC_PK_SCHEMATA, null);
|
||||
public TableConstraints referencedConstraint() {
|
||||
if (_referencedConstraint == null)
|
||||
_referencedConstraint = new TableConstraints(this, Keys.REFERENCED_CONSTRAINT, null);
|
||||
|
||||
return _schemata;
|
||||
return _referencedConstraint;
|
||||
}
|
||||
|
||||
private transient TableConstraints _referencingConstraint;
|
||||
@ -173,18 +174,17 @@ public class ReferentialConstraints extends TableImpl<Record> {
|
||||
return _referencingConstraint;
|
||||
}
|
||||
|
||||
private transient TableConstraints _referencedConstraint;
|
||||
private transient Schemata _schemata;
|
||||
|
||||
/**
|
||||
* Get the implicit join path to the
|
||||
* <code>INFORMATION_SCHEMA.TABLE_CONSTRAINTS</code> table, via the
|
||||
* <code>REFERENCED_CONSTRAINT</code> key.
|
||||
* <code>INFORMATION_SCHEMA.SCHEMATA</code> table.
|
||||
*/
|
||||
public TableConstraints referencedConstraint() {
|
||||
if (_referencedConstraint == null)
|
||||
_referencedConstraint = new TableConstraints(this, Keys.REFERENCED_CONSTRAINT, null);
|
||||
public Schemata schemata() {
|
||||
if (_schemata == null)
|
||||
_schemata = new Schemata(this, Keys.SYNTHETIC_FK_REFERENTIAL_CONSTRAINTS__SYNTHETIC_PK_SCHEMATA, null);
|
||||
|
||||
return _referencedConstraint;
|
||||
return _schemata;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -28,7 +28,7 @@ import org.jooq.meta.hsqldb.information_schema.Keys;
|
||||
/**
|
||||
* one row for each routine
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||
public class Routines extends TableImpl<Record> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ -25,7 +25,7 @@ import org.jooq.meta.hsqldb.information_schema.Keys;
|
||||
/**
|
||||
* one row for each schema
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||
public class Schemata extends TableImpl<Record> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@ -139,6 +139,19 @@ public class Schemata extends TableImpl<Record> {
|
||||
return _checkConstraints;
|
||||
}
|
||||
|
||||
private transient Columns _columns;
|
||||
|
||||
/**
|
||||
* Get the implicit to-many join path to the
|
||||
* <code>INFORMATION_SCHEMA.COLUMNS</code> table
|
||||
*/
|
||||
public Columns columns() {
|
||||
if (_columns == null)
|
||||
_columns = new Columns(this, null, Keys.SYNTHETIC_FK_COLUMNS__SYNTHETIC_PK_SCHEMATA.getInverseKey());
|
||||
|
||||
return _columns;
|
||||
}
|
||||
|
||||
private transient DomainConstraints _domainConstraints;
|
||||
|
||||
/**
|
||||
@ -178,6 +191,32 @@ public class Schemata extends TableImpl<Record> {
|
||||
return _referentialConstraints;
|
||||
}
|
||||
|
||||
private transient Routines _routines;
|
||||
|
||||
/**
|
||||
* Get the implicit to-many join path to the
|
||||
* <code>INFORMATION_SCHEMA.ROUTINES</code> table
|
||||
*/
|
||||
public Routines routines() {
|
||||
if (_routines == null)
|
||||
_routines = new Routines(this, null, Keys.SYNTHETIC_FK_ROUTINES__SYNTHETIC_PK_SCHEMATA.getInverseKey());
|
||||
|
||||
return _routines;
|
||||
}
|
||||
|
||||
private transient Sequences _sequences;
|
||||
|
||||
/**
|
||||
* Get the implicit to-many join path to the
|
||||
* <code>INFORMATION_SCHEMA.SEQUENCES</code> table
|
||||
*/
|
||||
public Sequences sequences() {
|
||||
if (_sequences == null)
|
||||
_sequences = new Sequences(this, null, Keys.SYNTHETIC_FK_SEQUENCES__SYNTHETIC_PK_SCHEMATA.getInverseKey());
|
||||
|
||||
return _sequences;
|
||||
}
|
||||
|
||||
private transient TableConstraints _tableConstraints;
|
||||
|
||||
/**
|
||||
@ -191,19 +230,6 @@ public class Schemata extends TableImpl<Record> {
|
||||
return _tableConstraints;
|
||||
}
|
||||
|
||||
private transient Columns _columns;
|
||||
|
||||
/**
|
||||
* Get the implicit to-many join path to the
|
||||
* <code>INFORMATION_SCHEMA.COLUMNS</code> table
|
||||
*/
|
||||
public Columns columns() {
|
||||
if (_columns == null)
|
||||
_columns = new Columns(this, null, Keys.SYNTHETIC_FK_COLUMNS__SYNTHETIC_PK_SCHEMATA.getInverseKey());
|
||||
|
||||
return _columns;
|
||||
}
|
||||
|
||||
private transient Tables _tables;
|
||||
|
||||
/**
|
||||
@ -230,32 +256,6 @@ public class Schemata extends TableImpl<Record> {
|
||||
return _views;
|
||||
}
|
||||
|
||||
private transient Routines _routines;
|
||||
|
||||
/**
|
||||
* Get the implicit to-many join path to the
|
||||
* <code>INFORMATION_SCHEMA.ROUTINES</code> table
|
||||
*/
|
||||
public Routines routines() {
|
||||
if (_routines == null)
|
||||
_routines = new Routines(this, null, Keys.SYNTHETIC_FK_ROUTINES__SYNTHETIC_PK_SCHEMATA.getInverseKey());
|
||||
|
||||
return _routines;
|
||||
}
|
||||
|
||||
private transient Sequences _sequences;
|
||||
|
||||
/**
|
||||
* Get the implicit to-many join path to the
|
||||
* <code>INFORMATION_SCHEMA.SEQUENCES</code> table
|
||||
*/
|
||||
public Sequences sequences() {
|
||||
if (_sequences == null)
|
||||
_sequences = new Sequences(this, null, Keys.SYNTHETIC_FK_SEQUENCES__SYNTHETIC_PK_SCHEMATA.getInverseKey());
|
||||
|
||||
return _sequences;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Schemata as(String alias) {
|
||||
return new Schemata(DSL.name(alias), this);
|
||||
|
||||
@ -28,7 +28,7 @@ import org.jooq.meta.hsqldb.information_schema.Keys;
|
||||
/**
|
||||
* one row for each external sequence generator
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||
public class Sequences extends TableImpl<Record> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ -21,7 +21,7 @@ import org.jooq.meta.hsqldb.information_schema.InformationSchema;
|
||||
/**
|
||||
* the visible columns of each accessible table defined within this database
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||
public class SystemColumns extends TableImpl<Record> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ -22,7 +22,7 @@ import org.jooq.meta.hsqldb.information_schema.InformationSchema;
|
||||
* information about the indices of each accessible table defined within this
|
||||
* database
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||
public class SystemIndexinfo extends TableImpl<Record> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ -0,0 +1,130 @@
|
||||
/*
|
||||
* This file is generated by jOOQ.
|
||||
*/
|
||||
package org.jooq.meta.hsqldb.information_schema.tables;
|
||||
|
||||
|
||||
import org.jooq.Condition;
|
||||
import org.jooq.Field;
|
||||
import org.jooq.Name;
|
||||
import org.jooq.Record;
|
||||
import org.jooq.Schema;
|
||||
import org.jooq.Table;
|
||||
import org.jooq.TableField;
|
||||
import org.jooq.TableOptions;
|
||||
import org.jooq.impl.DSL;
|
||||
import org.jooq.impl.SQLDataType;
|
||||
import org.jooq.impl.TableImpl;
|
||||
import org.jooq.meta.hsqldb.information_schema.InformationSchema;
|
||||
|
||||
|
||||
/**
|
||||
* the synonyms for tables and other objects defined in this database
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||
public class SystemSynonyms extends TableImpl<Record> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* The reference instance of <code>INFORMATION_SCHEMA.SYSTEM_SYNONYMS</code>
|
||||
*/
|
||||
public static final SystemSynonyms SYSTEM_SYNONYMS = new SystemSynonyms();
|
||||
|
||||
/**
|
||||
* The class holding records for this type
|
||||
*/
|
||||
@Override
|
||||
public Class<Record> getRecordType() {
|
||||
return Record.class;
|
||||
}
|
||||
|
||||
/**
|
||||
* The column
|
||||
* <code>INFORMATION_SCHEMA.SYSTEM_SYNONYMS.SYNONYM_CATALOG</code>.
|
||||
*/
|
||||
public final TableField<Record, String> SYNONYM_CATALOG = createField(DSL.name("SYNONYM_CATALOG"), SQLDataType.VARCHAR(128), this, "");
|
||||
|
||||
/**
|
||||
* The column
|
||||
* <code>INFORMATION_SCHEMA.SYSTEM_SYNONYMS.SYNONYM_SCHEMA</code>.
|
||||
*/
|
||||
public final TableField<Record, String> SYNONYM_SCHEMA = createField(DSL.name("SYNONYM_SCHEMA"), SQLDataType.VARCHAR(128), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>INFORMATION_SCHEMA.SYSTEM_SYNONYMS.SYNONYM_NAME</code>.
|
||||
*/
|
||||
public final TableField<Record, String> SYNONYM_NAME = createField(DSL.name("SYNONYM_NAME"), SQLDataType.VARCHAR(128), this, "");
|
||||
|
||||
/**
|
||||
* The column
|
||||
* <code>INFORMATION_SCHEMA.SYSTEM_SYNONYMS.OBJECT_CATALOG</code>.
|
||||
*/
|
||||
public final TableField<Record, String> OBJECT_CATALOG = createField(DSL.name("OBJECT_CATALOG"), SQLDataType.VARCHAR(128), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>INFORMATION_SCHEMA.SYSTEM_SYNONYMS.OBJECT_SCHEMA</code>.
|
||||
*/
|
||||
public final TableField<Record, String> OBJECT_SCHEMA = createField(DSL.name("OBJECT_SCHEMA"), SQLDataType.VARCHAR(128), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>INFORMATION_SCHEMA.SYSTEM_SYNONYMS.OBJECT_NAME</code>.
|
||||
*/
|
||||
public final TableField<Record, String> OBJECT_NAME = createField(DSL.name("OBJECT_NAME"), SQLDataType.VARCHAR(128), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>INFORMATION_SCHEMA.SYSTEM_SYNONYMS.OBJECT_TYPE</code>.
|
||||
*/
|
||||
public final TableField<Record, String> OBJECT_TYPE = createField(DSL.name("OBJECT_TYPE"), SQLDataType.VARCHAR(128), this, "");
|
||||
|
||||
private SystemSynonyms(Name alias, Table<Record> aliased) {
|
||||
this(alias, aliased, (Field<?>[]) null, null);
|
||||
}
|
||||
|
||||
private SystemSynonyms(Name alias, Table<Record> aliased, Field<?>[] parameters, Condition where) {
|
||||
super(alias, null, aliased, parameters, DSL.comment("the synonyms for tables and other objects defined in this database"), TableOptions.table(), where);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an aliased <code>INFORMATION_SCHEMA.SYSTEM_SYNONYMS</code> table
|
||||
* reference
|
||||
*/
|
||||
public SystemSynonyms(String alias) {
|
||||
this(DSL.name(alias), SYSTEM_SYNONYMS);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an aliased <code>INFORMATION_SCHEMA.SYSTEM_SYNONYMS</code> table
|
||||
* reference
|
||||
*/
|
||||
public SystemSynonyms(Name alias) {
|
||||
this(alias, SYSTEM_SYNONYMS);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a <code>INFORMATION_SCHEMA.SYSTEM_SYNONYMS</code> table reference
|
||||
*/
|
||||
public SystemSynonyms() {
|
||||
this(DSL.name("SYSTEM_SYNONYMS"), null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Schema getSchema() {
|
||||
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SystemSynonyms as(String alias) {
|
||||
return new SystemSynonyms(DSL.name(alias), this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SystemSynonyms as(Name alias) {
|
||||
return new SystemSynonyms(alias, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SystemSynonyms as(Table<?> alias) {
|
||||
return new SystemSynonyms(alias.getQualifiedName(), this);
|
||||
}
|
||||
}
|
||||
@ -21,7 +21,7 @@ import org.jooq.meta.hsqldb.information_schema.InformationSchema;
|
||||
/**
|
||||
* the accessible tables defined within this database
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||
public class SystemTables extends TableImpl<Record> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ -28,7 +28,7 @@ import org.jooq.meta.hsqldb.information_schema.Keys;
|
||||
/**
|
||||
* one row for each table constraint associated with a table
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||
public class TableConstraints extends TableImpl<Record> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@ -164,6 +164,34 @@ public class TableConstraints extends TableImpl<Record> {
|
||||
return _schemata;
|
||||
}
|
||||
|
||||
private transient ReferentialConstraints _referencedConstraint;
|
||||
|
||||
/**
|
||||
* Get the implicit to-many join path to the
|
||||
* <code>INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS</code> table, via the
|
||||
* <code>REFERENCED_CONSTRAINT</code> key
|
||||
*/
|
||||
public ReferentialConstraints referencedConstraint() {
|
||||
if (_referencedConstraint == null)
|
||||
_referencedConstraint = new ReferentialConstraints(this, null, Keys.REFERENCED_CONSTRAINT.getInverseKey());
|
||||
|
||||
return _referencedConstraint;
|
||||
}
|
||||
|
||||
private transient ReferentialConstraints _referencingConstraint;
|
||||
|
||||
/**
|
||||
* Get the implicit to-many join path to the
|
||||
* <code>INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS</code> table, via the
|
||||
* <code>REFERENCING_CONSTRAINT</code> key
|
||||
*/
|
||||
public ReferentialConstraints referencingConstraint() {
|
||||
if (_referencingConstraint == null)
|
||||
_referencingConstraint = new ReferentialConstraints(this, null, Keys.REFERENCING_CONSTRAINT.getInverseKey());
|
||||
|
||||
return _referencingConstraint;
|
||||
}
|
||||
|
||||
private transient CheckConstraints _checkConstraints;
|
||||
|
||||
/**
|
||||
@ -190,34 +218,6 @@ public class TableConstraints extends TableImpl<Record> {
|
||||
return _keyColumnUsage;
|
||||
}
|
||||
|
||||
private transient ReferentialConstraints _referencingConstraint;
|
||||
|
||||
/**
|
||||
* Get the implicit to-many join path to the
|
||||
* <code>INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS</code> table, via the
|
||||
* <code>REFERENCING_CONSTRAINT</code> key
|
||||
*/
|
||||
public ReferentialConstraints referencingConstraint() {
|
||||
if (_referencingConstraint == null)
|
||||
_referencingConstraint = new ReferentialConstraints(this, null, Keys.REFERENCING_CONSTRAINT.getInverseKey());
|
||||
|
||||
return _referencingConstraint;
|
||||
}
|
||||
|
||||
private transient ReferentialConstraints _referencedConstraint;
|
||||
|
||||
/**
|
||||
* Get the implicit to-many join path to the
|
||||
* <code>INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS</code> table, via the
|
||||
* <code>REFERENCED_CONSTRAINT</code> key
|
||||
*/
|
||||
public ReferentialConstraints referencedConstraint() {
|
||||
if (_referencedConstraint == null)
|
||||
_referencedConstraint = new ReferentialConstraints(this, null, Keys.REFERENCED_CONSTRAINT.getInverseKey());
|
||||
|
||||
return _referencedConstraint;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableConstraints as(String alias) {
|
||||
return new TableConstraints(DSL.name(alias), this);
|
||||
|
||||
@ -28,7 +28,7 @@ import org.jooq.meta.hsqldb.information_schema.Keys;
|
||||
/**
|
||||
* one row for each table or view
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||
public class Tables extends TableImpl<Record> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@ -183,19 +183,6 @@ public class Tables extends TableImpl<Record> {
|
||||
return _columns;
|
||||
}
|
||||
|
||||
private transient Triggers _triggers;
|
||||
|
||||
/**
|
||||
* Get the implicit to-many join path to the
|
||||
* <code>INFORMATION_SCHEMA.TRIGGERS</code> table
|
||||
*/
|
||||
public Triggers triggers() {
|
||||
if (_triggers == null)
|
||||
_triggers = new Triggers(this, null, Keys.SYNTHETIC_FK_TRIGGERS__SYNTHETIC_PK_TABLES.getInverseKey());
|
||||
|
||||
return _triggers;
|
||||
}
|
||||
|
||||
private transient Views _views;
|
||||
|
||||
/**
|
||||
|
||||
@ -5,13 +5,9 @@ package org.jooq.meta.hsqldb.information_schema.tables;
|
||||
|
||||
|
||||
import java.time.OffsetDateTime;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.jooq.Condition;
|
||||
import org.jooq.Field;
|
||||
import org.jooq.ForeignKey;
|
||||
import org.jooq.InverseForeignKey;
|
||||
import org.jooq.Name;
|
||||
import org.jooq.Record;
|
||||
import org.jooq.Schema;
|
||||
@ -29,7 +25,7 @@ import org.jooq.meta.hsqldb.information_schema.Keys;
|
||||
/**
|
||||
* one row for each trigger definition
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||
public class Triggers extends TableImpl<Record> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@ -167,10 +163,6 @@ public class Triggers extends TableImpl<Record> {
|
||||
this(DSL.name("TRIGGERS"), null);
|
||||
}
|
||||
|
||||
public <O extends Record> Triggers(Table<O> path, ForeignKey<O, Record> childPath, InverseForeignKey<O, Record> parentPath) {
|
||||
super(path, childPath, parentPath, TRIGGERS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Schema getSchema() {
|
||||
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
|
||||
@ -181,24 +173,6 @@ public class Triggers extends TableImpl<Record> {
|
||||
return Keys.SYNTHETIC_PK_TRIGGERS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ForeignKey<Record, ?>> getReferences() {
|
||||
return Arrays.asList(Keys.SYNTHETIC_FK_TRIGGERS__SYNTHETIC_PK_TABLES);
|
||||
}
|
||||
|
||||
private transient Tables _tables;
|
||||
|
||||
/**
|
||||
* Get the implicit join path to the <code>INFORMATION_SCHEMA.TABLES</code>
|
||||
* table.
|
||||
*/
|
||||
public Tables tables() {
|
||||
if (_tables == null)
|
||||
_tables = new Tables(this, Keys.SYNTHETIC_FK_TRIGGERS__SYNTHETIC_PK_TABLES, null);
|
||||
|
||||
return _tables;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Triggers as(String alias) {
|
||||
return new Triggers(DSL.name(alias), this);
|
||||
|
||||
@ -27,7 +27,7 @@ import org.jooq.meta.hsqldb.information_schema.Keys;
|
||||
/**
|
||||
* the view descriptors of the accessible views defined within this database
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||
public class Views extends TableImpl<Record> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ -82,6 +82,8 @@ public class Database implements Serializable, XMLAppendable
|
||||
@XmlElement(defaultValue = "true")
|
||||
protected Boolean includeTriggers = true;
|
||||
@XmlElement(defaultValue = "true")
|
||||
protected Boolean includeSynonyms = true;
|
||||
@XmlElement(defaultValue = "true")
|
||||
protected Boolean includeSequences = true;
|
||||
@XmlElement(defaultValue = "true")
|
||||
protected Boolean includeIndexes = true;
|
||||
@ -873,6 +875,34 @@ public class Database implements Serializable, XMLAppendable
|
||||
this.includeTriggers = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* This flag indicates whether synonyms should be included in output produced by this database.
|
||||
* <p>
|
||||
* This feature is available in the commercial distribution only.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link Boolean }
|
||||
*
|
||||
*/
|
||||
public Boolean isIncludeSynonyms() {
|
||||
return includeSynonyms;
|
||||
}
|
||||
|
||||
/**
|
||||
* This flag indicates whether synonyms should be included in output produced by this database.
|
||||
* <p>
|
||||
* This feature is available in the commercial distribution only.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link Boolean }
|
||||
*
|
||||
*/
|
||||
public void setIncludeSynonyms(Boolean value) {
|
||||
this.includeSynonyms = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* This flag indicates whether sequences should be included in output produced by this database
|
||||
*
|
||||
@ -2466,6 +2496,17 @@ public class Database implements Serializable, XMLAppendable
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* This flag indicates whether synonyms should be included in output produced by this database.
|
||||
* <p>
|
||||
* This feature is available in the commercial distribution only.
|
||||
*
|
||||
*/
|
||||
public Database withIncludeSynonyms(Boolean value) {
|
||||
setIncludeSynonyms(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* This flag indicates whether sequences should be included in output produced by this database
|
||||
*
|
||||
@ -3181,6 +3222,7 @@ public class Database implements Serializable, XMLAppendable
|
||||
builder.append("includeUDTs", includeUDTs);
|
||||
builder.append("includeDomains", includeDomains);
|
||||
builder.append("includeTriggers", includeTriggers);
|
||||
builder.append("includeSynonyms", includeSynonyms);
|
||||
builder.append("includeSequences", includeSequences);
|
||||
builder.append("includeIndexes", includeIndexes);
|
||||
builder.append("includePrimaryKeys", includePrimaryKeys);
|
||||
@ -3462,6 +3504,15 @@ public class Database implements Serializable, XMLAppendable
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (includeSynonyms == null) {
|
||||
if (other.includeSynonyms!= null) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
if (!includeSynonyms.equals(other.includeSynonyms)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (includeSequences == null) {
|
||||
if (other.includeSequences!= null) {
|
||||
return false;
|
||||
@ -3969,6 +4020,7 @@ public class Database implements Serializable, XMLAppendable
|
||||
result = ((prime*result)+((includeUDTs == null)? 0 :includeUDTs.hashCode()));
|
||||
result = ((prime*result)+((includeDomains == null)? 0 :includeDomains.hashCode()));
|
||||
result = ((prime*result)+((includeTriggers == null)? 0 :includeTriggers.hashCode()));
|
||||
result = ((prime*result)+((includeSynonyms == null)? 0 :includeSynonyms.hashCode()));
|
||||
result = ((prime*result)+((includeSequences == null)? 0 :includeSequences.hashCode()));
|
||||
result = ((prime*result)+((includeIndexes == null)? 0 :includeIndexes.hashCode()));
|
||||
result = ((prime*result)+((includePrimaryKeys == null)? 0 :includePrimaryKeys.hashCode()));
|
||||
|
||||
@ -91,6 +91,8 @@ public class Generate implements Serializable, XMLAppendable
|
||||
@XmlElement(defaultValue = "true")
|
||||
protected Boolean triggers = true;
|
||||
@XmlElement(defaultValue = "true")
|
||||
protected Boolean synonyms = true;
|
||||
@XmlElement(defaultValue = "true")
|
||||
protected Boolean udts = true;
|
||||
@XmlElement(defaultValue = "true")
|
||||
protected Boolean queues = true;
|
||||
@ -169,6 +171,8 @@ public class Generate implements Serializable, XMLAppendable
|
||||
@XmlElement(defaultValue = "true")
|
||||
protected Boolean globalTriggerReferences = true;
|
||||
@XmlElement(defaultValue = "true")
|
||||
protected Boolean globalSynonymReferences = true;
|
||||
@XmlElement(defaultValue = "true")
|
||||
protected Boolean globalTableReferences = true;
|
||||
@XmlElement(defaultValue = "true")
|
||||
protected Boolean globalSequenceReferences = true;
|
||||
@ -924,7 +928,7 @@ public class Generate implements Serializable, XMLAppendable
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate Sequence classes.
|
||||
* Generate Sequence classes.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
@ -936,7 +940,7 @@ public class Generate implements Serializable, XMLAppendable
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate Sequence classes.
|
||||
* Generate Sequence classes.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
@ -948,7 +952,7 @@ public class Generate implements Serializable, XMLAppendable
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate Trigger classes.
|
||||
* Generate Trigger classes.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
@ -960,7 +964,7 @@ public class Generate implements Serializable, XMLAppendable
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate Trigger classes.
|
||||
* Generate Trigger classes.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
@ -972,7 +976,31 @@ public class Generate implements Serializable, XMLAppendable
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate UDT classes.
|
||||
* Generate Synonym classes.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link Boolean }
|
||||
*
|
||||
*/
|
||||
public Boolean isSynonyms() {
|
||||
return synonyms;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate Synonym classes.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link Boolean }
|
||||
*
|
||||
*/
|
||||
public void setSynonyms(Boolean value) {
|
||||
this.synonyms = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate UDT classes.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
@ -984,7 +1012,7 @@ public class Generate implements Serializable, XMLAppendable
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate UDT classes.
|
||||
* Generate UDT classes.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
@ -1901,6 +1929,30 @@ public class Generate implements Serializable, XMLAppendable
|
||||
this.globalTriggerReferences = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Turn off generation of global synonym references.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link Boolean }
|
||||
*
|
||||
*/
|
||||
public Boolean isGlobalSynonymReferences() {
|
||||
return globalSynonymReferences;
|
||||
}
|
||||
|
||||
/**
|
||||
* Turn off generation of global synonym references.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link Boolean }
|
||||
*
|
||||
*/
|
||||
public void setGlobalSynonymReferences(Boolean value) {
|
||||
this.globalSynonymReferences = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Turn off generation of global table references.
|
||||
*
|
||||
@ -3438,7 +3490,7 @@ public class Generate implements Serializable, XMLAppendable
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate Sequence classes.
|
||||
* Generate Sequence classes.
|
||||
*
|
||||
*/
|
||||
public Generate withSequences(Boolean value) {
|
||||
@ -3447,7 +3499,7 @@ public class Generate implements Serializable, XMLAppendable
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate Trigger classes.
|
||||
* Generate Trigger classes.
|
||||
*
|
||||
*/
|
||||
public Generate withTriggers(Boolean value) {
|
||||
@ -3456,7 +3508,16 @@ public class Generate implements Serializable, XMLAppendable
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate UDT classes.
|
||||
* Generate Synonym classes.
|
||||
*
|
||||
*/
|
||||
public Generate withSynonyms(Boolean value) {
|
||||
setSynonyms(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate UDT classes.
|
||||
*
|
||||
*/
|
||||
public Generate withUdts(Boolean value) {
|
||||
@ -3806,6 +3867,15 @@ public class Generate implements Serializable, XMLAppendable
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Turn off generation of global synonym references.
|
||||
*
|
||||
*/
|
||||
public Generate withGlobalSynonymReferences(Boolean value) {
|
||||
setGlobalSynonymReferences(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Turn off generation of global table references.
|
||||
*
|
||||
@ -4346,6 +4416,7 @@ public class Generate implements Serializable, XMLAppendable
|
||||
builder.append("routines", routines);
|
||||
builder.append("sequences", sequences);
|
||||
builder.append("triggers", triggers);
|
||||
builder.append("synonyms", synonyms);
|
||||
builder.append("udts", udts);
|
||||
builder.append("queues", queues);
|
||||
builder.append("links", links);
|
||||
@ -4385,6 +4456,7 @@ public class Generate implements Serializable, XMLAppendable
|
||||
builder.append("globalSchemaReferences", globalSchemaReferences);
|
||||
builder.append("globalDomainReferences", globalDomainReferences);
|
||||
builder.append("globalTriggerReferences", globalTriggerReferences);
|
||||
builder.append("globalSynonymReferences", globalSynonymReferences);
|
||||
builder.append("globalTableReferences", globalTableReferences);
|
||||
builder.append("globalSequenceReferences", globalSequenceReferences);
|
||||
builder.append("globalUDTReferences", globalUDTReferences);
|
||||
@ -4720,6 +4792,15 @@ public class Generate implements Serializable, XMLAppendable
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (synonyms == null) {
|
||||
if (other.synonyms!= null) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
if (!synonyms.equals(other.synonyms)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (udts == null) {
|
||||
if (other.udts!= null) {
|
||||
return false;
|
||||
@ -5071,6 +5152,15 @@ public class Generate implements Serializable, XMLAppendable
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (globalSynonymReferences == null) {
|
||||
if (other.globalSynonymReferences!= null) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
if (!globalSynonymReferences.equals(other.globalSynonymReferences)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (globalTableReferences == null) {
|
||||
if (other.globalTableReferences!= null) {
|
||||
return false;
|
||||
@ -5584,6 +5674,7 @@ public class Generate implements Serializable, XMLAppendable
|
||||
result = ((prime*result)+((routines == null)? 0 :routines.hashCode()));
|
||||
result = ((prime*result)+((sequences == null)? 0 :sequences.hashCode()));
|
||||
result = ((prime*result)+((triggers == null)? 0 :triggers.hashCode()));
|
||||
result = ((prime*result)+((synonyms == null)? 0 :synonyms.hashCode()));
|
||||
result = ((prime*result)+((udts == null)? 0 :udts.hashCode()));
|
||||
result = ((prime*result)+((queues == null)? 0 :queues.hashCode()));
|
||||
result = ((prime*result)+((links == null)? 0 :links.hashCode()));
|
||||
@ -5623,6 +5714,7 @@ public class Generate implements Serializable, XMLAppendable
|
||||
result = ((prime*result)+((globalSchemaReferences == null)? 0 :globalSchemaReferences.hashCode()));
|
||||
result = ((prime*result)+((globalDomainReferences == null)? 0 :globalDomainReferences.hashCode()));
|
||||
result = ((prime*result)+((globalTriggerReferences == null)? 0 :globalTriggerReferences.hashCode()));
|
||||
result = ((prime*result)+((globalSynonymReferences == null)? 0 :globalSynonymReferences.hashCode()));
|
||||
result = ((prime*result)+((globalTableReferences == null)? 0 :globalTableReferences.hashCode()));
|
||||
result = ((prime*result)+((globalSequenceReferences == null)? 0 :globalSequenceReferences.hashCode()));
|
||||
result = ((prime*result)+((globalUDTReferences == null)? 0 :globalUDTReferences.hashCode()));
|
||||
|
||||
@ -697,6 +697,11 @@ public class MySQLDatabase extends AbstractDatabase implements ResultQueryDataba
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1045,6 +1045,11 @@ public class PostgresDatabase extends AbstractDatabase implements ResultQueryDat
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -604,6 +604,11 @@ public class SQLiteDatabase extends AbstractDatabase implements ResultQueryDatab
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -193,6 +193,11 @@ public class TrinoDatabase extends AbstractDatabase implements ResultQueryDataba
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected List<CatalogDefinition> getCatalogs0() throws SQLException {
|
||||
List<CatalogDefinition> result = new ArrayList<>();
|
||||
|
||||
@ -1088,6 +1088,12 @@ Excludes match before includes, i.e. excludes have a higher priority.]]></jxb:ja
|
||||
This feature is available in the commercial distribution only.]]></jxb:javadoc></jxb:property></appinfo></annotation>
|
||||
</element>
|
||||
|
||||
<element name="includeSynonyms" type="boolean" default="true" minOccurs="0" maxOccurs="1">
|
||||
<annotation><appinfo><jxb:property><jxb:javadoc><![CDATA[This flag indicates whether synonyms should be included in output produced by this database.
|
||||
<p>
|
||||
This feature is available in the commercial distribution only.]]></jxb:javadoc></jxb:property></appinfo></annotation>
|
||||
</element>
|
||||
|
||||
<element name="includeSequences" type="boolean" default="true" minOccurs="0" maxOccurs="1">
|
||||
<annotation><appinfo><jxb:property><jxb:javadoc><![CDATA[This flag indicates whether sequences should be included in output produced by this database]]></jxb:javadoc></jxb:property></appinfo></annotation>
|
||||
</element>
|
||||
@ -2611,15 +2617,19 @@ jOOQ API, without adding custom data type bindings to them.]]></jxb:javadoc></jx
|
||||
</element>
|
||||
|
||||
<element name="sequences" type="boolean" default="true" minOccurs="0" maxOccurs="1">
|
||||
<annotation><appinfo><jxb:property><jxb:javadoc><![CDATA[Generate Sequence classes. ]]></jxb:javadoc></jxb:property></appinfo></annotation>
|
||||
<annotation><appinfo><jxb:property><jxb:javadoc><![CDATA[Generate Sequence classes.]]></jxb:javadoc></jxb:property></appinfo></annotation>
|
||||
</element>
|
||||
|
||||
<element name="triggers" type="boolean" default="true" minOccurs="0" maxOccurs="1">
|
||||
<annotation><appinfo><jxb:property><jxb:javadoc><![CDATA[Generate Trigger classes. ]]></jxb:javadoc></jxb:property></appinfo></annotation>
|
||||
<annotation><appinfo><jxb:property><jxb:javadoc><![CDATA[Generate Trigger classes.]]></jxb:javadoc></jxb:property></appinfo></annotation>
|
||||
</element>
|
||||
|
||||
<element name="synonyms" type="boolean" default="true" minOccurs="0" maxOccurs="1">
|
||||
<annotation><appinfo><jxb:property><jxb:javadoc><![CDATA[Generate Synonym classes.]]></jxb:javadoc></jxb:property></appinfo></annotation>
|
||||
</element>
|
||||
|
||||
<element name="udts" type="boolean" default="true" minOccurs="0" maxOccurs="1">
|
||||
<annotation><appinfo><jxb:property><jxb:javadoc><![CDATA[Generate UDT classes. ]]></jxb:javadoc></jxb:property></appinfo></annotation>
|
||||
<annotation><appinfo><jxb:property><jxb:javadoc><![CDATA[Generate UDT classes.]]></jxb:javadoc></jxb:property></appinfo></annotation>
|
||||
</element>
|
||||
|
||||
<element name="queues" type="boolean" default="true" minOccurs="0" maxOccurs="1">
|
||||
@ -2782,6 +2792,10 @@ jOOQ API, without adding custom data type bindings to them.]]></jxb:javadoc></jx
|
||||
<annotation><appinfo><jxb:property><jxb:javadoc><![CDATA[Turn off generation of global trigger references.]]></jxb:javadoc></jxb:property></appinfo></annotation>
|
||||
</element>
|
||||
|
||||
<element name="globalSynonymReferences" type="boolean" default="true" minOccurs="0" maxOccurs="1">
|
||||
<annotation><appinfo><jxb:property><jxb:javadoc><![CDATA[Turn off generation of global synonym references.]]></jxb:javadoc></jxb:property></appinfo></annotation>
|
||||
</element>
|
||||
|
||||
<element name="globalTableReferences" type="boolean" default="true" minOccurs="0" maxOccurs="1">
|
||||
<annotation><appinfo><jxb:property><jxb:javadoc><![CDATA[Turn off generation of global table references.]]></jxb:javadoc></jxb:property></appinfo></annotation>
|
||||
</element>
|
||||
|
||||
@ -93,6 +93,7 @@ import org.jooq.Schema;
|
||||
import org.jooq.Sequence;
|
||||
import org.jooq.Statement;
|
||||
import org.jooq.Support;
|
||||
// ...
|
||||
import org.jooq.Table;
|
||||
import org.jooq.TableElement;
|
||||
import org.jooq.TableField;
|
||||
@ -613,6 +614,20 @@ public final class Internal {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -15,6 +15,7 @@ final class MetaSQL {
|
||||
private static final EnumMap<SQLDialect, String> M_SOURCES = new EnumMap<>(SQLDialect.class);
|
||||
private static final EnumMap<SQLDialect, String> M_COMMENTS = new EnumMap<>(SQLDialect.class);
|
||||
private static final EnumMap<SQLDialect, String> M_TRIGGERS = new EnumMap<>(SQLDialect.class);
|
||||
private static final EnumMap<SQLDialect, String> M_SYNONYMS = new EnumMap<>(SQLDialect.class);
|
||||
|
||||
static final String M_UNIQUE_KEYS(SQLDialect dialect) {
|
||||
String result = M_UNIQUE_KEYS.get(dialect);
|
||||
@ -51,6 +52,11 @@ final class MetaSQL {
|
||||
return result != null ? result : M_TRIGGERS.get(dialect.family());
|
||||
}
|
||||
|
||||
static final String M_SYNONYMS(SQLDialect dialect) {
|
||||
String result = M_SYNONYMS.get(dialect);
|
||||
return result != null ? result : M_SYNONYMS.get(dialect.family());
|
||||
}
|
||||
|
||||
static {
|
||||
|
||||
M_UNIQUE_KEYS.put(DUCKDB, "select duckdb_constraints.database_name, duckdb_constraints.schema_name, duckdb_constraints.table_name, duckdb_constraints.constraint_name, unnest(duckdb_constraints.constraint_column_names) constraint_column_names, unnest(duckdb_constraints.constraint_column_indexes) constraint_column_indexes from duckdb_constraints() where (duckdb_constraints.constraint_type = 'UNIQUE' and duckdb_constraints.schema_name in (cast(? as varchar)))");
|
||||
@ -471,6 +477,10 @@ final class MetaSQL {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user