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

GroovySQL should allow a closure to be registered to configure the JDBC statement before use

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.0-beta-10
    • None
    • None

    Description

      e.g. to allow you to configure query timeout or fetch size etc.

      sql.withStatement

      { s| s.queryTimeout = 100; s.batchSize = 10 }

      ...

      sql.eachRow("select * from foo")

      { row | println row.name }

      Attachments

        Activity

          People

            jstrachan James Strachan
            jstrachan James Strachan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: