[ https://issues.apache.org/jira/browse/GROOVY-11541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17909542#comment-17909542 ]
ASF GitHub Bot commented on GROOVY-11541: ----------------------------------------- codecov-commenter commented on PR #2139: URL: https://github.com/apache/groovy/pull/2139#issuecomment-2569024772 ## [Codecov](https://app.codecov.io/gh/apache/groovy/pull/2139?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report All modified and coverable lines are covered by tests :white_check_mark: > Project coverage is 68.8300%. Comparing base [(`3d97ab7`)](https://app.codecov.io/gh/apache/groovy/commit/3d97ab7ae83c73450d4de7a4adc69f9a45bf1d79?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`fcfe772`)](https://app.codecov.io/gh/apache/groovy/commit/fcfe772e4dfb3b73e0fde335412389d1efcf131f?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache). <details><summary>Additional details and impacted files</summary> [](https://app.codecov.io/gh/apache/groovy/pull/2139?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) ```diff @@ Coverage Diff @@ ## master #2139 +/- ## ============================================= Coverage 68.8300% 68.8300% + Complexity 29427 29425 -2 ============================================= Files 1420 1420 Lines 113141 113141 Branches 19547 19547 ============================================= Hits 77875 77875 - Misses 28724 28725 +1 + Partials 6542 6541 -1 ``` | [Files with missing lines](https://app.codecov.io/gh/apache/groovy/pull/2139?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | | |---|---|---| | [...jects/groovy-sql/src/main/java/groovy/sql/Sql.java](https://app.codecov.io/gh/apache/groovy/pull/2139?src=pr&el=tree&filepath=subprojects%2Fgroovy-sql%2Fsrc%2Fmain%2Fjava%2Fgroovy%2Fsql%2FSql.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VicHJvamVjdHMvZ3Jvb3Z5LXNxbC9zcmMvbWFpbi9qYXZhL2dyb292eS9zcWwvU3FsLmphdmE=) | `64.6637% <100.0000%> (ø)` | | | [...vy-sql/src/main/java/groovy/sql/SqlWithParams.java](https://app.codecov.io/gh/apache/groovy/pull/2139?src=pr&el=tree&filepath=subprojects%2Fgroovy-sql%2Fsrc%2Fmain%2Fjava%2Fgroovy%2Fsql%2FSqlWithParams.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VicHJvamVjdHMvZ3Jvb3Z5LXNxbC9zcmMvbWFpbi9qYXZhL2dyb292eS9zcWwvU3FsV2l0aFBhcmFtcy5qYXZh) | `100.0000% <100.0000%> (ø)` | | ... and [4 files with indirect coverage changes](https://app.codecov.io/gh/apache/groovy/pull/2139/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) </details> > Sql should accept wildcard parameters > ------------------------------------- > > Key: GROOVY-11541 > URL: https://issues.apache.org/jira/browse/GROOVY-11541 > Project: Groovy > Issue Type: Improvement > Components: SQL processing > Affects Versions: 5.0.0-alpha-11 > Reporter: Sergey Chernov > Priority: Minor > > {{groovy.sql.Sql}} declares several methods with SQL statement and parameters > like this > {code:java} > public boolean execute(String sql, List<Object> params) throws SLQException { > {code} > This declaration has one major drawback: it's not possible to pass as an > argument the List which is not exactly {{List<Object>}}, e.g. {{List<Integer> > params = List.of(1)}}. > This List is only iterated, hence using wildcard here is safe. Also changing > the type to wildcard as receiving argument should be binary compatible. > Suggested method signature (example; address all such methods of Sql class): > {code:java} > public boolean execute(String sql, List<?> params) throws SLQException { > {code} > Additional notes: > * there are few methods that return {{List<Object>}}, e.g. > {{SqlWithParams.getParams()}} - in this case the Object generic should be > preserved. > * For reference: pretty similar problem solved for cassandra-java-driver > https://github.com/apache/cassandra-java-driver/commit/be07a77e4f80435a52b1347a07fd566448d9f4ef -- This message was sent by Atlassian Jira (v8.20.10#820010)