如何在 JOOQ 中将 Record 转换为 Table Record?

use*_*723 5 java sql jooq

我需要将 JOOQ 的记录结果集转换为表记录列表。有什么方法可以这样做吗?

Luk*_*der 3

是的,您可以使用Result.into(Table). 一个例子:

Result<?> result = create.fetch(...);
Table<MyRecord> MY_TABLE = ...
Result<MyRecord> other = result.into(MY_TABLE);
Run Code Online (Sandbox Code Playgroud)

作为Result实现List,这应该可以满足您的需要