【发布时间】:2014-11-22 01:12:46
【问题描述】:
我有生成 jOOQ Select 对象的代码,我需要将其用作更复杂查询的一部分。
这样的工作:
Select<Record3<Long, Integer, BigDecimal>> s = getFromSomewhere();
Field<?>[] f = s.fields();
// use it in a sub-select
Select<Record2<?,?>> x = DSL.select(f[0], f[1]).from(s);
但现在我丢失了所有类型信息。
有没有更好的办法?
【问题讨论】:
-
Row 类型似乎很有帮助,请参阅stackoverflow.com/questions/19638337/…,但我不知道如何从我的 Select 中构造 Row。