6

i would like to write an hibernate dialect for Apache Phoenix. The huge problem is that the keyword of an insert statement is "Upsert" instead of "Insert". This keyword is declared at org.hibernate.sql.Insert. Is there a possibility to write an dialect for Apache Phoenix ?

Source http://phoenix.apache.org/language/index.html#upsert_values

Kind regards

4

2 回答 2

0

我找到了一个理论上的解决方案。最简单的方法是覆盖 apache phoenix 创建的 jdbc。您必须覆盖 exceuteQuery() 和 updateQuery() 函数。您必须将“insert”和“update”替换为“upsert”。你怎么看?我还没有测试它。

于 2014-11-08T11:14:46.387 回答
0

如果您可以使用“胖”凤凰客户端,这似乎工作得很好:https ://github.com/jruesga/phoenix-hibernate-dialect

于 2018-07-12T03:33:33.480 回答