[jOOQ/jOOQ#15005] No need for Path subtypes in jOOQ-meta (for now)

This commit is contained in:
Lukas Eder 2023-08-09 16:46:48 +02:00
parent 0e1c9535bc
commit 35a80da4c2
10 changed files with 66 additions and 368 deletions

View File

@ -12,7 +12,6 @@ import org.jooq.Field;
import org.jooq.ForeignKey;
import org.jooq.InverseForeignKey;
import org.jooq.Name;
import org.jooq.Path;
import org.jooq.Record;
import org.jooq.Schema;
import org.jooq.Table;
@ -24,7 +23,6 @@ import org.jooq.impl.SQLDataType;
import org.jooq.impl.TableImpl;
import org.jooq.meta.postgres.information_schema.InformationSchema;
import org.jooq.meta.postgres.information_schema.Keys;
import org.jooq.meta.postgres.information_schema.tables.Schemata.SchemataPath;
/**
@ -109,33 +107,6 @@ public class CheckConstraints extends TableImpl<Record> {
super(path, childPath, parentPath, CHECK_CONSTRAINTS);
}
/**
* A subtype implementing {@link Path} for simplified path-based joins.
*/
public static class CheckConstraintsPath extends CheckConstraints implements Path<Record> {
public <O extends Record> CheckConstraintsPath(Table<O> path, ForeignKey<O, Record> childPath, InverseForeignKey<O, Record> parentPath) {
super(path, childPath, parentPath);
}
private CheckConstraintsPath(Name alias, Table<Record> aliased) {
super(alias, aliased);
}
@Override
public CheckConstraintsPath as(String alias) {
return new CheckConstraintsPath(DSL.name(alias), this);
}
@Override
public CheckConstraintsPath as(Name alias) {
return new CheckConstraintsPath(alias, this);
}
@Override
public CheckConstraintsPath as(Table<?> alias) {
return new CheckConstraintsPath(alias.getQualifiedName(), this);
}
}
@Override
public Schema getSchema() {
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
@ -151,15 +122,15 @@ public class CheckConstraints extends TableImpl<Record> {
return Arrays.asList(Keys.CHECK_CONSTRAINTS__SYNTHETIC_FK_CHECK_CONSTRAINTS__SYNTHETIC_PK_SCHEMATA);
}
private transient SchemataPath _schemata;
private transient Schemata _schemata;
/**
* Get the implicit join path to the
* <code>information_schema.schemata</code> table.
*/
public SchemataPath schemata() {
public Schemata schemata() {
if (_schemata == null)
_schemata = new SchemataPath(this, Keys.CHECK_CONSTRAINTS__SYNTHETIC_FK_CHECK_CONSTRAINTS__SYNTHETIC_PK_SCHEMATA, null);
_schemata = new Schemata(this, Keys.CHECK_CONSTRAINTS__SYNTHETIC_FK_CHECK_CONSTRAINTS__SYNTHETIC_PK_SCHEMATA, null);
return _schemata;
}

View File

@ -12,7 +12,6 @@ import org.jooq.Field;
import org.jooq.ForeignKey;
import org.jooq.InverseForeignKey;
import org.jooq.Name;
import org.jooq.Path;
import org.jooq.Record;
import org.jooq.Schema;
import org.jooq.Table;
@ -23,8 +22,6 @@ import org.jooq.impl.SQLDataType;
import org.jooq.impl.TableImpl;
import org.jooq.meta.postgres.information_schema.InformationSchema;
import org.jooq.meta.postgres.information_schema.Keys;
import org.jooq.meta.postgres.information_schema.tables.Schemata.SchemataPath;
import org.jooq.meta.postgres.information_schema.tables.Tables.TablesPath;
/**
@ -304,33 +301,6 @@ public class Columns extends TableImpl<Record> {
super(path, childPath, parentPath, COLUMNS);
}
/**
* A subtype implementing {@link Path} for simplified path-based joins.
*/
public static class ColumnsPath extends Columns implements Path<Record> {
public <O extends Record> ColumnsPath(Table<O> path, ForeignKey<O, Record> childPath, InverseForeignKey<O, Record> parentPath) {
super(path, childPath, parentPath);
}
private ColumnsPath(Name alias, Table<Record> aliased) {
super(alias, aliased);
}
@Override
public ColumnsPath as(String alias) {
return new ColumnsPath(DSL.name(alias), this);
}
@Override
public ColumnsPath as(Name alias) {
return new ColumnsPath(alias, this);
}
@Override
public ColumnsPath as(Table<?> alias) {
return new ColumnsPath(alias.getQualifiedName(), this);
}
}
@Override
public Schema getSchema() {
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
@ -341,28 +311,28 @@ public class Columns extends TableImpl<Record> {
return Arrays.asList(Keys.COLUMNS__SYNTHETIC_FK_COLUMNS__SYNTHETIC_PK_TABLES, Keys.COLUMNS__SYNTHETIC_FK_COLUMNS__SYNTHETIC_PK_SCHEMATA);
}
private transient TablesPath _tables;
private transient Tables _tables;
/**
* Get the implicit join path to the <code>information_schema.tables</code>
* table.
*/
public TablesPath tables() {
public Tables tables() {
if (_tables == null)
_tables = new TablesPath(this, Keys.COLUMNS__SYNTHETIC_FK_COLUMNS__SYNTHETIC_PK_TABLES, null);
_tables = new Tables(this, Keys.COLUMNS__SYNTHETIC_FK_COLUMNS__SYNTHETIC_PK_TABLES, null);
return _tables;
}
private transient SchemataPath _schemata;
private transient Schemata _schemata;
/**
* Get the implicit join path to the
* <code>information_schema.schemata</code> table.
*/
public SchemataPath schemata() {
public Schemata schemata() {
if (_schemata == null)
_schemata = new SchemataPath(this, Keys.COLUMNS__SYNTHETIC_FK_COLUMNS__SYNTHETIC_PK_SCHEMATA, null);
_schemata = new Schemata(this, Keys.COLUMNS__SYNTHETIC_FK_COLUMNS__SYNTHETIC_PK_SCHEMATA, null);
return _schemata;
}

View File

@ -12,7 +12,6 @@ import org.jooq.Field;
import org.jooq.ForeignKey;
import org.jooq.InverseForeignKey;
import org.jooq.Name;
import org.jooq.Path;
import org.jooq.Record;
import org.jooq.Schema;
import org.jooq.Table;
@ -23,7 +22,6 @@ import org.jooq.impl.SQLDataType;
import org.jooq.impl.TableImpl;
import org.jooq.meta.postgres.information_schema.InformationSchema;
import org.jooq.meta.postgres.information_schema.Keys;
import org.jooq.meta.postgres.information_schema.tables.Schemata.SchemataPath;
/**
@ -134,33 +132,6 @@ public class KeyColumnUsage extends TableImpl<Record> {
super(path, childPath, parentPath, KEY_COLUMN_USAGE);
}
/**
* A subtype implementing {@link Path} for simplified path-based joins.
*/
public static class KeyColumnUsagePath extends KeyColumnUsage implements Path<Record> {
public <O extends Record> KeyColumnUsagePath(Table<O> path, ForeignKey<O, Record> childPath, InverseForeignKey<O, Record> parentPath) {
super(path, childPath, parentPath);
}
private KeyColumnUsagePath(Name alias, Table<Record> aliased) {
super(alias, aliased);
}
@Override
public KeyColumnUsagePath as(String alias) {
return new KeyColumnUsagePath(DSL.name(alias), this);
}
@Override
public KeyColumnUsagePath as(Name alias) {
return new KeyColumnUsagePath(alias, this);
}
@Override
public KeyColumnUsagePath as(Table<?> alias) {
return new KeyColumnUsagePath(alias.getQualifiedName(), this);
}
}
@Override
public Schema getSchema() {
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
@ -171,15 +142,15 @@ public class KeyColumnUsage extends TableImpl<Record> {
return Arrays.asList(Keys.KEY_COLUMN_USAGE__SYNTHETIC_FK_KEY_COLUMN_USAGE__SYNTHETIC_PK_SCHEMATA);
}
private transient SchemataPath _schemata;
private transient Schemata _schemata;
/**
* Get the implicit join path to the
* <code>information_schema.schemata</code> table.
*/
public SchemataPath schemata() {
public Schemata schemata() {
if (_schemata == null)
_schemata = new SchemataPath(this, Keys.KEY_COLUMN_USAGE__SYNTHETIC_FK_KEY_COLUMN_USAGE__SYNTHETIC_PK_SCHEMATA, null);
_schemata = new Schemata(this, Keys.KEY_COLUMN_USAGE__SYNTHETIC_FK_KEY_COLUMN_USAGE__SYNTHETIC_PK_SCHEMATA, null);
return _schemata;
}

View File

@ -12,7 +12,6 @@ import org.jooq.Field;
import org.jooq.ForeignKey;
import org.jooq.InverseForeignKey;
import org.jooq.Name;
import org.jooq.Path;
import org.jooq.Record;
import org.jooq.Schema;
import org.jooq.Table;
@ -23,7 +22,6 @@ import org.jooq.impl.SQLDataType;
import org.jooq.impl.TableImpl;
import org.jooq.meta.postgres.information_schema.InformationSchema;
import org.jooq.meta.postgres.information_schema.Keys;
import org.jooq.meta.postgres.information_schema.tables.Schemata.SchemataPath;
/**
@ -138,33 +136,6 @@ public class ReferentialConstraints extends TableImpl<Record> {
super(path, childPath, parentPath, REFERENTIAL_CONSTRAINTS);
}
/**
* A subtype implementing {@link Path} for simplified path-based joins.
*/
public static class ReferentialConstraintsPath extends ReferentialConstraints implements Path<Record> {
public <O extends Record> ReferentialConstraintsPath(Table<O> path, ForeignKey<O, Record> childPath, InverseForeignKey<O, Record> parentPath) {
super(path, childPath, parentPath);
}
private ReferentialConstraintsPath(Name alias, Table<Record> aliased) {
super(alias, aliased);
}
@Override
public ReferentialConstraintsPath as(String alias) {
return new ReferentialConstraintsPath(DSL.name(alias), this);
}
@Override
public ReferentialConstraintsPath as(Name alias) {
return new ReferentialConstraintsPath(alias, this);
}
@Override
public ReferentialConstraintsPath as(Table<?> alias) {
return new ReferentialConstraintsPath(alias.getQualifiedName(), this);
}
}
@Override
public Schema getSchema() {
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
@ -175,15 +146,15 @@ public class ReferentialConstraints extends TableImpl<Record> {
return Arrays.asList(Keys.REFERENTIAL_CONSTRAINTS__SYNTHETIC_FK_REFERENTIAL_CONSTRAINTS__SYNTHETIC_PK_SCHEMATA);
}
private transient SchemataPath _schemata;
private transient Schemata _schemata;
/**
* Get the implicit join path to the
* <code>information_schema.schemata</code> table.
*/
public SchemataPath schemata() {
public Schemata schemata() {
if (_schemata == null)
_schemata = new SchemataPath(this, Keys.REFERENTIAL_CONSTRAINTS__SYNTHETIC_FK_REFERENTIAL_CONSTRAINTS__SYNTHETIC_PK_SCHEMATA, null);
_schemata = new Schemata(this, Keys.REFERENTIAL_CONSTRAINTS__SYNTHETIC_FK_REFERENTIAL_CONSTRAINTS__SYNTHETIC_PK_SCHEMATA, null);
return _schemata;
}

View File

@ -13,7 +13,6 @@ import org.jooq.Field;
import org.jooq.ForeignKey;
import org.jooq.InverseForeignKey;
import org.jooq.Name;
import org.jooq.Path;
import org.jooq.Record;
import org.jooq.Schema;
import org.jooq.Table;
@ -24,7 +23,6 @@ import org.jooq.impl.SQLDataType;
import org.jooq.impl.TableImpl;
import org.jooq.meta.postgres.information_schema.InformationSchema;
import org.jooq.meta.postgres.information_schema.Keys;
import org.jooq.meta.postgres.information_schema.tables.Schemata.SchemataPath;
/**
@ -525,33 +523,6 @@ public class Routines extends TableImpl<Record> {
super(path, childPath, parentPath, ROUTINES);
}
/**
* A subtype implementing {@link Path} for simplified path-based joins.
*/
public static class RoutinesPath extends Routines implements Path<Record> {
public <O extends Record> RoutinesPath(Table<O> path, ForeignKey<O, Record> childPath, InverseForeignKey<O, Record> parentPath) {
super(path, childPath, parentPath);
}
private RoutinesPath(Name alias, Table<Record> aliased) {
super(alias, aliased);
}
@Override
public RoutinesPath as(String alias) {
return new RoutinesPath(DSL.name(alias), this);
}
@Override
public RoutinesPath as(Name alias) {
return new RoutinesPath(alias, this);
}
@Override
public RoutinesPath as(Table<?> alias) {
return new RoutinesPath(alias.getQualifiedName(), this);
}
}
@Override
public Schema getSchema() {
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
@ -562,15 +533,15 @@ public class Routines extends TableImpl<Record> {
return Arrays.asList(Keys.ROUTINES__SYNTHETIC_FK_ROUTINES__SYNTHETIC_PK_SCHEMATA);
}
private transient SchemataPath _schemata;
private transient Schemata _schemata;
/**
* Get the implicit join path to the
* <code>information_schema.schemata</code> table.
*/
public SchemataPath schemata() {
public Schemata schemata() {
if (_schemata == null)
_schemata = new SchemataPath(this, Keys.ROUTINES__SYNTHETIC_FK_ROUTINES__SYNTHETIC_PK_SCHEMATA, null);
_schemata = new Schemata(this, Keys.ROUTINES__SYNTHETIC_FK_ROUTINES__SYNTHETIC_PK_SCHEMATA, null);
return _schemata;
}

View File

@ -9,7 +9,6 @@ import org.jooq.Field;
import org.jooq.ForeignKey;
import org.jooq.InverseForeignKey;
import org.jooq.Name;
import org.jooq.Path;
import org.jooq.Record;
import org.jooq.Schema;
import org.jooq.Table;
@ -21,14 +20,6 @@ import org.jooq.impl.SQLDataType;
import org.jooq.impl.TableImpl;
import org.jooq.meta.postgres.information_schema.InformationSchema;
import org.jooq.meta.postgres.information_schema.Keys;
import org.jooq.meta.postgres.information_schema.tables.CheckConstraints.CheckConstraintsPath;
import org.jooq.meta.postgres.information_schema.tables.Columns.ColumnsPath;
import org.jooq.meta.postgres.information_schema.tables.KeyColumnUsage.KeyColumnUsagePath;
import org.jooq.meta.postgres.information_schema.tables.ReferentialConstraints.ReferentialConstraintsPath;
import org.jooq.meta.postgres.information_schema.tables.Routines.RoutinesPath;
import org.jooq.meta.postgres.information_schema.tables.Sequences.SequencesPath;
import org.jooq.meta.postgres.information_schema.tables.Tables.TablesPath;
import org.jooq.meta.postgres.information_schema.tables.Views.ViewsPath;
/**
@ -125,33 +116,6 @@ public class Schemata extends TableImpl<Record> {
super(path, childPath, parentPath, SCHEMATA);
}
/**
* A subtype implementing {@link Path} for simplified path-based joins.
*/
public static class SchemataPath extends Schemata implements Path<Record> {
public <O extends Record> SchemataPath(Table<O> path, ForeignKey<O, Record> childPath, InverseForeignKey<O, Record> parentPath) {
super(path, childPath, parentPath);
}
private SchemataPath(Name alias, Table<Record> aliased) {
super(alias, aliased);
}
@Override
public SchemataPath as(String alias) {
return new SchemataPath(DSL.name(alias), this);
}
@Override
public SchemataPath as(Name alias) {
return new SchemataPath(alias, this);
}
@Override
public SchemataPath as(Table<?> alias) {
return new SchemataPath(alias.getQualifiedName(), this);
}
}
@Override
public Schema getSchema() {
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
@ -162,106 +126,106 @@ public class Schemata extends TableImpl<Record> {
return Keys.SYNTHETIC_PK_SCHEMATA;
}
private transient CheckConstraintsPath _checkConstraints;
private transient CheckConstraints _checkConstraints;
/**
* Get the implicit to-many join path to the
* <code>information_schema.check_constraints</code> table
*/
public CheckConstraintsPath checkConstraints() {
public CheckConstraints checkConstraints() {
if (_checkConstraints == null)
_checkConstraints = new CheckConstraintsPath(this, null, Keys.CHECK_CONSTRAINTS__SYNTHETIC_FK_CHECK_CONSTRAINTS__SYNTHETIC_PK_SCHEMATA.getInverseKey());
_checkConstraints = new CheckConstraints(this, null, Keys.CHECK_CONSTRAINTS__SYNTHETIC_FK_CHECK_CONSTRAINTS__SYNTHETIC_PK_SCHEMATA.getInverseKey());
return _checkConstraints;
}
private transient KeyColumnUsagePath _keyColumnUsage;
private transient KeyColumnUsage _keyColumnUsage;
/**
* Get the implicit to-many join path to the
* <code>information_schema.key_column_usage</code> table
*/
public KeyColumnUsagePath keyColumnUsage() {
public KeyColumnUsage keyColumnUsage() {
if (_keyColumnUsage == null)
_keyColumnUsage = new KeyColumnUsagePath(this, null, Keys.KEY_COLUMN_USAGE__SYNTHETIC_FK_KEY_COLUMN_USAGE__SYNTHETIC_PK_SCHEMATA.getInverseKey());
_keyColumnUsage = new KeyColumnUsage(this, null, Keys.KEY_COLUMN_USAGE__SYNTHETIC_FK_KEY_COLUMN_USAGE__SYNTHETIC_PK_SCHEMATA.getInverseKey());
return _keyColumnUsage;
}
private transient ReferentialConstraintsPath _referentialConstraints;
private transient ReferentialConstraints _referentialConstraints;
/**
* Get the implicit to-many join path to the
* <code>information_schema.referential_constraints</code> table
*/
public ReferentialConstraintsPath referentialConstraints() {
public ReferentialConstraints referentialConstraints() {
if (_referentialConstraints == null)
_referentialConstraints = new ReferentialConstraintsPath(this, null, Keys.REFERENTIAL_CONSTRAINTS__SYNTHETIC_FK_REFERENTIAL_CONSTRAINTS__SYNTHETIC_PK_SCHEMATA.getInverseKey());
_referentialConstraints = new ReferentialConstraints(this, null, Keys.REFERENTIAL_CONSTRAINTS__SYNTHETIC_FK_REFERENTIAL_CONSTRAINTS__SYNTHETIC_PK_SCHEMATA.getInverseKey());
return _referentialConstraints;
}
private transient ColumnsPath _columns;
private transient Columns _columns;
/**
* Get the implicit to-many join path to the
* <code>information_schema.columns</code> table
*/
public ColumnsPath columns() {
public Columns columns() {
if (_columns == null)
_columns = new ColumnsPath(this, null, Keys.COLUMNS__SYNTHETIC_FK_COLUMNS__SYNTHETIC_PK_SCHEMATA.getInverseKey());
_columns = new Columns(this, null, Keys.COLUMNS__SYNTHETIC_FK_COLUMNS__SYNTHETIC_PK_SCHEMATA.getInverseKey());
return _columns;
}
private transient TablesPath _tables;
private transient Tables _tables;
/**
* Get the implicit to-many join path to the
* <code>information_schema.tables</code> table
*/
public TablesPath tables() {
public Tables tables() {
if (_tables == null)
_tables = new TablesPath(this, null, Keys.TABLES__SYNTHETIC_FK_TABLES__SYNTHETIC_PK_SCHEMATA.getInverseKey());
_tables = new Tables(this, null, Keys.TABLES__SYNTHETIC_FK_TABLES__SYNTHETIC_PK_SCHEMATA.getInverseKey());
return _tables;
}
private transient ViewsPath _views;
private transient Views _views;
/**
* Get the implicit to-many join path to the
* <code>information_schema.views</code> table
*/
public ViewsPath views() {
public Views views() {
if (_views == null)
_views = new ViewsPath(this, null, Keys.VIEWS__SYNTHETIC_FK_VIEWS__SYNTHETIC_PK_SCHEMATA.getInverseKey());
_views = new Views(this, null, Keys.VIEWS__SYNTHETIC_FK_VIEWS__SYNTHETIC_PK_SCHEMATA.getInverseKey());
return _views;
}
private transient RoutinesPath _routines;
private transient Routines _routines;
/**
* Get the implicit to-many join path to the
* <code>information_schema.routines</code> table
*/
public RoutinesPath routines() {
public Routines routines() {
if (_routines == null)
_routines = new RoutinesPath(this, null, Keys.ROUTINES__SYNTHETIC_FK_ROUTINES__SYNTHETIC_PK_SCHEMATA.getInverseKey());
_routines = new Routines(this, null, Keys.ROUTINES__SYNTHETIC_FK_ROUTINES__SYNTHETIC_PK_SCHEMATA.getInverseKey());
return _routines;
}
private transient SequencesPath _sequences;
private transient Sequences _sequences;
/**
* Get the implicit to-many join path to the
* <code>information_schema.sequences</code> table
*/
public SequencesPath sequences() {
public Sequences sequences() {
if (_sequences == null)
_sequences = new SequencesPath(this, null, Keys.SEQUENCES__SYNTHETIC_FK_SEQUENCES__SYNTHETIC_PK_SCHEMATA.getInverseKey());
_sequences = new Sequences(this, null, Keys.SEQUENCES__SYNTHETIC_FK_SEQUENCES__SYNTHETIC_PK_SCHEMATA.getInverseKey());
return _sequences;
}

View File

@ -12,7 +12,6 @@ import org.jooq.Field;
import org.jooq.ForeignKey;
import org.jooq.InverseForeignKey;
import org.jooq.Name;
import org.jooq.Path;
import org.jooq.Record;
import org.jooq.Schema;
import org.jooq.Table;
@ -24,7 +23,6 @@ import org.jooq.impl.SQLDataType;
import org.jooq.impl.TableImpl;
import org.jooq.meta.postgres.information_schema.InformationSchema;
import org.jooq.meta.postgres.information_schema.Keys;
import org.jooq.meta.postgres.information_schema.tables.Schemata.SchemataPath;
/**
@ -144,33 +142,6 @@ public class Sequences extends TableImpl<Record> {
super(path, childPath, parentPath, SEQUENCES);
}
/**
* A subtype implementing {@link Path} for simplified path-based joins.
*/
public static class SequencesPath extends Sequences implements Path<Record> {
public <O extends Record> SequencesPath(Table<O> path, ForeignKey<O, Record> childPath, InverseForeignKey<O, Record> parentPath) {
super(path, childPath, parentPath);
}
private SequencesPath(Name alias, Table<Record> aliased) {
super(alias, aliased);
}
@Override
public SequencesPath as(String alias) {
return new SequencesPath(DSL.name(alias), this);
}
@Override
public SequencesPath as(Name alias) {
return new SequencesPath(alias, this);
}
@Override
public SequencesPath as(Table<?> alias) {
return new SequencesPath(alias.getQualifiedName(), this);
}
}
@Override
public Schema getSchema() {
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
@ -186,15 +157,15 @@ public class Sequences extends TableImpl<Record> {
return Arrays.asList(Keys.SEQUENCES__SYNTHETIC_FK_SEQUENCES__SYNTHETIC_PK_SCHEMATA);
}
private transient SchemataPath _schemata;
private transient Schemata _schemata;
/**
* Get the implicit join path to the
* <code>information_schema.schemata</code> table.
*/
public SchemataPath schemata() {
public Schemata schemata() {
if (_schemata == null)
_schemata = new SchemataPath(this, Keys.SEQUENCES__SYNTHETIC_FK_SEQUENCES__SYNTHETIC_PK_SCHEMATA, null);
_schemata = new Schemata(this, Keys.SEQUENCES__SYNTHETIC_FK_SEQUENCES__SYNTHETIC_PK_SCHEMATA, null);
return _schemata;
}

View File

@ -12,7 +12,6 @@ import org.jooq.Field;
import org.jooq.ForeignKey;
import org.jooq.InverseForeignKey;
import org.jooq.Name;
import org.jooq.Path;
import org.jooq.Record;
import org.jooq.Schema;
import org.jooq.Table;
@ -24,10 +23,6 @@ import org.jooq.impl.SQLDataType;
import org.jooq.impl.TableImpl;
import org.jooq.meta.postgres.information_schema.InformationSchema;
import org.jooq.meta.postgres.information_schema.Keys;
import org.jooq.meta.postgres.information_schema.tables.Columns.ColumnsPath;
import org.jooq.meta.postgres.information_schema.tables.Schemata.SchemataPath;
import org.jooq.meta.postgres.information_schema.tables.Triggers.TriggersPath;
import org.jooq.meta.postgres.information_schema.tables.Views.ViewsPath;
/**
@ -147,33 +142,6 @@ public class Tables extends TableImpl<Record> {
super(path, childPath, parentPath, TABLES);
}
/**
* A subtype implementing {@link Path} for simplified path-based joins.
*/
public static class TablesPath extends Tables implements Path<Record> {
public <O extends Record> TablesPath(Table<O> path, ForeignKey<O, Record> childPath, InverseForeignKey<O, Record> parentPath) {
super(path, childPath, parentPath);
}
private TablesPath(Name alias, Table<Record> aliased) {
super(alias, aliased);
}
@Override
public TablesPath as(String alias) {
return new TablesPath(DSL.name(alias), this);
}
@Override
public TablesPath as(Name alias) {
return new TablesPath(alias, this);
}
@Override
public TablesPath as(Table<?> alias) {
return new TablesPath(alias.getQualifiedName(), this);
}
}
@Override
public Schema getSchema() {
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
@ -189,54 +157,54 @@ public class Tables extends TableImpl<Record> {
return Arrays.asList(Keys.TABLES__SYNTHETIC_FK_TABLES__SYNTHETIC_PK_SCHEMATA);
}
private transient SchemataPath _schemata;
private transient Schemata _schemata;
/**
* Get the implicit join path to the
* <code>information_schema.schemata</code> table.
*/
public SchemataPath schemata() {
public Schemata schemata() {
if (_schemata == null)
_schemata = new SchemataPath(this, Keys.TABLES__SYNTHETIC_FK_TABLES__SYNTHETIC_PK_SCHEMATA, null);
_schemata = new Schemata(this, Keys.TABLES__SYNTHETIC_FK_TABLES__SYNTHETIC_PK_SCHEMATA, null);
return _schemata;
}
private transient ColumnsPath _columns;
private transient Columns _columns;
/**
* Get the implicit to-many join path to the
* <code>information_schema.columns</code> table
*/
public ColumnsPath columns() {
public Columns columns() {
if (_columns == null)
_columns = new ColumnsPath(this, null, Keys.COLUMNS__SYNTHETIC_FK_COLUMNS__SYNTHETIC_PK_TABLES.getInverseKey());
_columns = new Columns(this, null, Keys.COLUMNS__SYNTHETIC_FK_COLUMNS__SYNTHETIC_PK_TABLES.getInverseKey());
return _columns;
}
private transient TriggersPath _triggers;
private transient Triggers _triggers;
/**
* Get the implicit to-many join path to the
* <code>information_schema.triggers</code> table
*/
public TriggersPath triggers() {
public Triggers triggers() {
if (_triggers == null)
_triggers = new TriggersPath(this, null, Keys.TRIGGERS__SYNTHETIC_FK_TRIGGERS__SYNTHETIC_PK_TABLES.getInverseKey());
_triggers = new Triggers(this, null, Keys.TRIGGERS__SYNTHETIC_FK_TRIGGERS__SYNTHETIC_PK_TABLES.getInverseKey());
return _triggers;
}
private transient ViewsPath _views;
private transient Views _views;
/**
* Get the implicit to-many join path to the
* <code>information_schema.views</code> table
*/
public ViewsPath views() {
public Views views() {
if (_views == null)
_views = new ViewsPath(this, null, Keys.VIEWS__SYNTHETIC_FK_VIEWS__SYNTHETIC_PK_TABLES.getInverseKey());
_views = new Views(this, null, Keys.VIEWS__SYNTHETIC_FK_VIEWS__SYNTHETIC_PK_TABLES.getInverseKey());
return _views;
}

View File

@ -13,7 +13,6 @@ import org.jooq.Field;
import org.jooq.ForeignKey;
import org.jooq.InverseForeignKey;
import org.jooq.Name;
import org.jooq.Path;
import org.jooq.Record;
import org.jooq.Schema;
import org.jooq.Table;
@ -25,7 +24,6 @@ import org.jooq.impl.SQLDataType;
import org.jooq.impl.TableImpl;
import org.jooq.meta.postgres.information_schema.InformationSchema;
import org.jooq.meta.postgres.information_schema.Keys;
import org.jooq.meta.postgres.information_schema.tables.Tables.TablesPath;
/**
@ -173,33 +171,6 @@ public class Triggers extends TableImpl<Record> {
super(path, childPath, parentPath, TRIGGERS);
}
/**
* A subtype implementing {@link Path} for simplified path-based joins.
*/
public static class TriggersPath extends Triggers implements Path<Record> {
public <O extends Record> TriggersPath(Table<O> path, ForeignKey<O, Record> childPath, InverseForeignKey<O, Record> parentPath) {
super(path, childPath, parentPath);
}
private TriggersPath(Name alias, Table<Record> aliased) {
super(alias, aliased);
}
@Override
public TriggersPath as(String alias) {
return new TriggersPath(DSL.name(alias), this);
}
@Override
public TriggersPath as(Name alias) {
return new TriggersPath(alias, this);
}
@Override
public TriggersPath as(Table<?> alias) {
return new TriggersPath(alias.getQualifiedName(), this);
}
}
@Override
public Schema getSchema() {
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
@ -215,15 +186,15 @@ public class Triggers extends TableImpl<Record> {
return Arrays.asList(Keys.TRIGGERS__SYNTHETIC_FK_TRIGGERS__SYNTHETIC_PK_TABLES);
}
private transient TablesPath _tables;
private transient Tables _tables;
/**
* Get the implicit join path to the <code>information_schema.tables</code>
* table.
*/
public TablesPath tables() {
public Tables tables() {
if (_tables == null)
_tables = new TablesPath(this, Keys.TRIGGERS__SYNTHETIC_FK_TRIGGERS__SYNTHETIC_PK_TABLES, null);
_tables = new Tables(this, Keys.TRIGGERS__SYNTHETIC_FK_TRIGGERS__SYNTHETIC_PK_TABLES, null);
return _tables;
}

View File

@ -12,7 +12,6 @@ import org.jooq.Field;
import org.jooq.ForeignKey;
import org.jooq.InverseForeignKey;
import org.jooq.Name;
import org.jooq.Path;
import org.jooq.Record;
import org.jooq.Schema;
import org.jooq.Table;
@ -23,8 +22,6 @@ import org.jooq.impl.SQLDataType;
import org.jooq.impl.TableImpl;
import org.jooq.meta.postgres.information_schema.InformationSchema;
import org.jooq.meta.postgres.information_schema.Keys;
import org.jooq.meta.postgres.information_schema.tables.Schemata.SchemataPath;
import org.jooq.meta.postgres.information_schema.tables.Tables.TablesPath;
/**
@ -132,33 +129,6 @@ public class Views extends TableImpl<Record> {
super(path, childPath, parentPath, VIEWS);
}
/**
* A subtype implementing {@link Path} for simplified path-based joins.
*/
public static class ViewsPath extends Views implements Path<Record> {
public <O extends Record> ViewsPath(Table<O> path, ForeignKey<O, Record> childPath, InverseForeignKey<O, Record> parentPath) {
super(path, childPath, parentPath);
}
private ViewsPath(Name alias, Table<Record> aliased) {
super(alias, aliased);
}
@Override
public ViewsPath as(String alias) {
return new ViewsPath(DSL.name(alias), this);
}
@Override
public ViewsPath as(Name alias) {
return new ViewsPath(alias, this);
}
@Override
public ViewsPath as(Table<?> alias) {
return new ViewsPath(alias.getQualifiedName(), this);
}
}
@Override
public Schema getSchema() {
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
@ -169,28 +139,28 @@ public class Views extends TableImpl<Record> {
return Arrays.asList(Keys.VIEWS__SYNTHETIC_FK_VIEWS__SYNTHETIC_PK_SCHEMATA, Keys.VIEWS__SYNTHETIC_FK_VIEWS__SYNTHETIC_PK_TABLES);
}
private transient SchemataPath _schemata;
private transient Schemata _schemata;
/**
* Get the implicit join path to the
* <code>information_schema.schemata</code> table.
*/
public SchemataPath schemata() {
public Schemata schemata() {
if (_schemata == null)
_schemata = new SchemataPath(this, Keys.VIEWS__SYNTHETIC_FK_VIEWS__SYNTHETIC_PK_SCHEMATA, null);
_schemata = new Schemata(this, Keys.VIEWS__SYNTHETIC_FK_VIEWS__SYNTHETIC_PK_SCHEMATA, null);
return _schemata;
}
private transient TablesPath _tables;
private transient Tables _tables;
/**
* Get the implicit join path to the <code>information_schema.tables</code>
* table.
*/
public TablesPath tables() {
public Tables tables() {
if (_tables == null)
_tables = new TablesPath(this, Keys.VIEWS__SYNTHETIC_FK_VIEWS__SYNTHETIC_PK_TABLES, null);
_tables = new Tables(this, Keys.VIEWS__SYNTHETIC_FK_VIEWS__SYNTHETIC_PK_TABLES, null);
return _tables;
}