public class TenantTable extends TableImpl<Record> {
public static final TenantTable TENANT_TABLE = new TenantTable(); public final TableField<Record, String> API_TOKEN = createField("api_token", SQLDataType.VARCHAR.length(36), this); public final TableField<Record, EventType> EVENT_TYPE = createField("event_type", SQLDataType.VARCHAR.length(16), this, null, EventTypeConverter.INSTANCE); public final TableField<Record, Integer> YEAR = createField("year", SQLDataType.INTEGER, this); public final TableField<Record, Integer> MONTH = createField("month", SQLDataType.INTEGER, this); public TenantTable() { super("tenant_table"); } }Table<Record> foo = table("SELECT A, B, C, D FROM Foo"); //simplification but u get the ideadslContext.insertInto(TENANT_TABLE, TENANT_TABLE.EVENT_TYPE, TENANT_TABLE.API_TOKEN, TENANT_TABLE.MONTH, TENANT_TABLE.YEAR).select(selectFrom(foo));
INSERT INTO tenant(api_token, event_type, year, month) select A,B,C,D FROM Foo;
--
You received this message because you are subscribed to the Google Groups "jOOQ User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Table<Record> foo = table("SELECT A, B, C, D FROM Foo"); To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+...@googlegroups.com.
dslContext.insertInto(TENANT_TABLE, new Field[] {TENANT_TABLE.EVENT_TYPE,TENANT_TABLE.API_TOKEN,TENANT_TABLE.MONTH,TENANT_TABLE.YEAR}).select(selectFrom(foo));dslContext.insertInto(TENANT_TABLE,TENANT_TABLE.EVENT_TYPE,TENANT_TABLE.API_TOKEN,TENANT_TABLE.MONTH,TENANT_TABLE.YEAR).select(selectFrom((Table) foo));
To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+unsubscribe@googlegroups.com.