Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-3676

Make the toString() method of Derby PreparedStatements print out SQL text with ? parameters replaced by the values that have been set so far

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • None
    • None
    • JDBC
    • None
    • Newcomer

    Description

      This topic came up in the following email thread on the user list: http://www.nabble.com/PreparedStatement.toString%28%29---nice-formatting-td17250811.html#a17250811 Here's what the thread requests:

      "In mysql, a toString() on a PreparedStatement will do this, eg "select x
      from foo where x.a = ?" will become "select x from foo where x.a = 1" with
      the appropriate setValue() call."

      At first blush, this seems like it might be a simple project for a newcomer.

      Attachments

        1. d3676.patch
          6 kB
          Siddharth Srivastava
        2. humanstringprepared.txt
          11 kB
          Mark B
        3. humanstringprepared.txt
          12 kB
          Mark B
        4. humanstringprepared.txt
          9 kB
          Mark B
        5. humanstringprepared.txt
          8 kB
          Mark B
        6. humanstringprepared.txt
          8 kB
          Mark B
        7. humanstringprepared.txt
          7 kB
          Mark B
        8. humanstringprepared.txt
          2 kB
          Mark B
        9. ick.txt
          1.0 kB
          mike bell
        10. ick.txt
          0.8 kB
          mike bell
        11. prepared.diff
          9 kB
          Mark B
        12. statementCacheVTI.sql
          0.3 kB
          Richard N. Hillegas

        Issue Links

          Activity

            People

              siddharthsrivastava Siddharth Srivastava
              rhillegas Richard N. Hillegas
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: