[
https://issues.apache.org/jira/browse/GROOVY-10512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17498808#comment-17498808
]
Paul King commented on GROOVY-10512:
------------------------------------
For {{eachRow}}, you should be able to do something like:
{code}
sql.eachRow('SELECT * FROM Price') {
println "$it.name $it.price"
if (it.getWarnings()) println "First warning was
${it.getWarnings().message}"
else println "No warnings found"
}
{code}
For {{execute}}, yes some after/post version Closure complementing the
{{configureStatement}} might be the way to go.
> groovy.sql.Sql : provide a way to get the SQLWarning of a Statement,
> Connection, ResultSet
> ------------------------------------------------------------------------------------------
>
> Key: GROOVY-10512
> URL: https://issues.apache.org/jira/browse/GROOVY-10512
> Project: Groovy
> Issue Type: New Feature
> Components: SQL processing
> Affects Versions: 3.0.9
> Reporter: Philippe Gaudin
> Priority: Minor
>
> I need a way to be able to retrieve the possible *{{java.sql.SQLWarning}}* on
> a {{Statement}}, {{Connection}} and {{ResultSet}}.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)