Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
4.5.2
-
None
-
None
Description
This issue is about making the prepare statement creation methods delegate to org.apache.phoenix.jdbc.PhoenixConnection#prepareStatement(java.lang.String) in order to avoid exception in applications and clients using this method.
For the context, the issue was raised by a user of vert.x (http://vertx.io). This user tries to connect the vertx-jdbc-client to phoenix. A vert.x application cannot use directly the JDBC driver because it promotes an asynchronous and non-blocking development model (while jdbc interactions are blocking). The vertx-jdbc-client is using ` `prepareStatement(String sql, int autoGeneratedKeys)` which throws an exception.
A solution would be to delegate the method to the "simplest" version (just "sql") and ignore the effect of the passed parameter.