[jOOQ/jOOQ#13069] Implementation draft for <rowConvenienceToOne/>

This commit is contained in:
Lukas Eder 2022-02-23 08:56:18 +01:00
parent 1d84bfbace
commit f492aa31c1
2 changed files with 86 additions and 0 deletions

View File

@ -6137,6 +6137,47 @@ public class JavaGenerator extends AbstractGenerator {

View File

@ -63,6 +63,7 @@ import static org.jooq.impl.DSL.multisetAgg;
import static org.jooq.impl.DSL.row;
import static org.jooq.impl.DSL.select;
import static org.jooq.impl.DSL.selectFrom;
import static org.jooq.impl.DSL.val;
import static org.jooq.impl.DefaultMetaProvider.meta;
import static org.jooq.impl.Internal.createPathAlias;
import static org.jooq.impl.Keywords.K_TABLE;
@ -92,6 +93,8 @@ import org.jooq.Name;
// ...
import org.jooq.QueryPart;
import org.jooq.Record;
import org.jooq.Record1;
import org.jooq.Record2;
// ...
import org.jooq.Result;
import org.jooq.Row;
@ -275,6 +278,39 @@ implements
return null;
}
/**
* Create a <code>ROW</code> to-one parent table expression from this table.
*/
@org.jooq.Internal
@NotNull
protected <O1 extends Record, O2 extends Record> Field<O2> toOneRow(
ForeignKey<R, O1> path,
Function<? super Table<O1>, ? extends TableLike<O2>> f
) {
if (CONFIG.commercial()) {
}
throw new DataAccessException("The to-one ROW convenience feature is available in the commercial jOOQ distribution only. Please consider upgrading to the jOOQ Professional Edition or jOOQ Enterprise Edition.");
}
/**
* Create a <code>MULTISET</code> one-to-many child table expression from
* this table.
@ -425,6 +461,15 @@ implements