简体   繁体   English

jOOQ - 选择查询数组

[英]jOOQ - array of select query

Does jOOQ support array of select query? jOOQ是否支持select查询数组? I want something like the following: 我想要以下内容:

select table.*, array(select another_table.id from another_table where ...)
from   table;

I tried experimenting with DSL.array(context.select(...).asField()) but this generates array[(select ...)] instead of array(select(...)) . 我尝试使用DSL.array(context.select(...).asField())但这会生成array[(select ...)]而不是array(select(...))

I should have done: 我应该做的:

PostgresDSL.array(context.select(...))

Note that we are using PostgresDSL instead of the generic DSL and not applying .asField() to the select, to inline the inner select query into the outer query. 请注意,我们使用PostgresDSL而不是通用DSL而不是将.asField()应用于select,以将内部选择查询内联到外部查询中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM