[英]How can I upadate with jooq using map?
I want to update a table of ORACLE using other table data.我想使用其他表数据更新 ORACLE 表。 I tried putting the data into map and setting them with jooq.The format of the data is not problem but it doesn't work.我尝试将数据放入 map 并使用 jooq 设置它们。数据的格式没有问题,但它不起作用。 Summary Code is here.摘要代码在这里。
Map <String, Object> testMap = dbDataMap
DSL.update(table)
.set(testMap)
.where(condition)
.execute();
Or I tried或者我试过
Map <String, Object> testMap = dbDataMap
DSL.update(table)
.set(DSL.row(testMap.keySet(),(RowN)testMap.values())
.where(condition)
.execute();
The second approach should work like this:第二种方法应该像这样工作:
DSL.update(table)
.set(DSL.row(testMap.keySet()), DSL.row(testMap.values())
.where(condition)
.execute();
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.