简体   繁体   English

如何在JOOQ中将记录转换为表记录?

[英]How to convert Record to Table Record in JOOQ?

I need to convert JOOQ's Result set of Record to a List of Table Record. 我需要将JOOQ的Record结果集转换为Table Record列表。 Is there any method to do so? 有没有办法这样做?

Yes, you can use Result.into(Table) . 是的,您可以使用Result.into(Table) An example: 一个例子:

Result<?> result = create.fetch(...);
Table<MyRecord> MY_TABLE = ...
Result<MyRecord> other = result.into(MY_TABLE);

As Result implements List , this should do what you need Result实现List ,这应该做你需要的

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

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