[jOOQ/jOOQ#18543] Open up utility function to OSS edition
This commit is contained in:
parent
f47010666e
commit
8f2e2d3385
@ -4203,24 +4203,24 @@ final class Tools {
|
||||
|
||||
|
||||
|
||||
static final Select<?> extractSelectFromDerivedTable(Table<?> table) {
|
||||
return extractSelectFromDerivedTable(table, false);
|
||||
}
|
||||
|
||||
private static final Select<?> extractSelectFromDerivedTable(Table<?> table, boolean force) {
|
||||
Table<?> aliased;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (table instanceof DerivedTable<?> t)
|
||||
return t.query();
|
||||
else if (table instanceof AliasedSelect<?> s)
|
||||
return s.query();
|
||||
else if ((aliased = aliased(table)) != null)
|
||||
return extractSelectFromDerivedTable(aliased, true);
|
||||
else if (force)
|
||||
return select(asterisk()).from(table);
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
static final <R extends Record> SelectQueryImpl<R> selectQueryImpl(QueryPart part) {
|
||||
|
||||
@ -74,7 +74,7 @@ import static org.jooq.impl.Names.N_OFFSET;
|
||||
import static org.jooq.impl.Names.N_ORDINAL;
|
||||
import static org.jooq.impl.SQLDataType.BIGINT;
|
||||
import static org.jooq.impl.SubqueryCharacteristics.DERIVED_TABLE;
|
||||
// ...
|
||||
import static org.jooq.impl.Tools.extractSelectFromDerivedTable;
|
||||
import static org.jooq.impl.Tools.visitSubquery;
|
||||
import static org.jooq.impl.Tools.BooleanDataKey.DATA_FORCE_LIMIT_WITH_ORDER_BY;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user