Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-4798

To support PreparedStatement.addBatch()

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.8.1
    • Component/s: SQL processing
    • Labels:
      None
    • Flags:
      Patch

      Description

      Create a new version of Sql.withBatch with support to prepared statements (PreparedStatement.addBatch()). For the vast majority of cases this should perform better than Sql.withBatch using statements (Statement.addBatch(String)).

      I've added some patches to perform the suggested change.
      The patch files were generated using "diff -u base_file modified_file". Groovy 1.7.5 was used as base.

      Additional information here: http://groovy.329449.n5.nabble.com/Groovy-SQL-and-batch-updates-tp4339851p4339851.html

      Thanks.

        Attachments

        1. batch_insert_20110428.tar.bz2
          2.97 MB
          Daniel Henrique Alves Lima
        2. BatchingPreparedStatementWrapper.java
          3 kB
          Daniel Henrique Alves Lima
        3. BatchingStatementWrapper.java.patch
          0.7 kB
          Daniel Henrique Alves Lima
        4. grails_output.txt
          4 kB
          Daniel Henrique Alves Lima
        5. groovy_batch_update.zip
          7.20 MB
          Daniel Henrique Alves Lima
        6. output_rollback.txt
          1 kB
          Daniel Henrique Alves Lima
        7. output.txt
          0.4 kB
          Daniel Henrique Alves Lima
        8. output2_rollback.txt
          1 kB
          Daniel Henrique Alves Lima
        9. output2.txt
          0.6 kB
          Daniel Henrique Alves Lima
        10. run2.groovy
          4 kB
          Daniel Henrique Alves Lima
        11. Sql.java.patch
          4 kB
          Daniel Henrique Alves Lima

          Issue Links

            Activity

              People

              • Assignee:
                paulk Paul King
                Reporter:
                daniel_henrique Daniel Henrique Alves Lima
              • Votes:
                2 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: