Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-2453

Make prepared statement creation delegate to org.apache.phoenix.jdbc.PhoenixConnection#prepareStatement(java.lang.String)

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.5.2
    • 4.7.0
    • 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.

      Attachments

        1. PHOENIX-2453.patch
          4 kB
          Clement Escoffier

        Activity

          People

            clement.escoffier Clement Escoffier
            clement.escoffier Clement Escoffier
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: