Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-5003

Add support of generated keys retrieval in JDBC component

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.9.0
    • 2.10.0
    • camel-jdbc
    • None
    • Patch Available
    • Unknown

    Description

      The JDBC component has no support of generated keys retrieval, i.e use of Jdbc api calls :

      • statement.execute(String, int)
      • [statement.execute(String, int[])|http://docs.oracle.com/javase/6/docs/api/java/sql/Statement.html#execute(java.lang.String,%20int[])]
      • [statement.execute(String, String[])|http://docs.oracle.com/javase/6/docs/api/java/sql/Statement.html#execute(java.lang.String,%20java.lang.String[])]

      This patch allow to retrieve the generated keys using headers :

      • JDBC_RETRIEVE_GENERATED_KEYS : boolean (mandatory to retrieve the generated keys)
      • JDBC_GENERATED_COLUMNS : containing the int[] or String[] generated keys expected (optional)

      The results are put in two headers :

      • JDBC_GENERATED_KEYS_DATA : the generated keys rows
      • JDBC_GENERATED_KEYS_ROW_COUNT : the number of generated keys rows put

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            davsclaus Claus Ibsen
            thomasgueze Thomas Gueze
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment