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

Add @ClosureParams to closure input parameter of Sql.withBatch(...)

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.5.8
    • 2.5.9, 3.0.0-rc-1
    • SQL processing
    • None

    Description

      Similar to GROOVY-9229.

      The overloadings of groovy.sql.Sql.withBatch(...) do not declare the closure input parameter type. It's not so straightforward to find out what is the type of the parameter the closure is expected to receive, you have to read the Javadoc carefully or look at the implementation. The documentation at http://groovy-lang.org/databases.html talks about statements and prepared statements, but actually the injected parameter is of type BatchingStatementWrapper or BatchingPreparedStatementWrapper, depending on the overloading.

      It's especially annoying when you use static compilation.

      Attachments

        Activity

          People

            emilles Eric Milles
            mauromol Mauro Molinari
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: