JOOQ中的例程和存储过程



我写的代码正确吗?

select sbcm_ref.process_legal_entities_buf_record(legal_entities_buf_id value from table legal_entities_buf)

DSL.using(connection)
.select(Routines.processLegalEntitiesBufRecord(field(select(LEGAL_ENTITIES_BUF.LEGAL_ENTITIES_BUF_ID)
.from(LEGAL_ENTITIES_BUF)))).fetch();

我从来没有见过任何(<column> value from table <table>)语法在SQL(如在你的函数参数列表),所以我假设这只是一些伪SQL你写的,不是实际的SQL,还是一个错字?

实际的SQL看起来像这样,那么?

select sbcm_ref.process_legal_entities_buf_record(legal_entities_buf_id)
from legal_entities_buf

在这种情况下,将1:1转换为jOOQ

ctx.select(Routines.processLegalEntitiesBufRecord(
LEGAL_ENTITIES_BUF.LEGAL_ENTITIES_BUF_ID))
.from(LEGAL_ENTITIES_BUF)
.fetch();

最新更新