Quantcast
Channel: MySQL Forums - Connector/J, JDBC and Java
Viewing all articles
Browse latest Browse all 884

asSql() method is removed from ClientPreparedStatement (2 replies)

$
0
0
In the mysql-connector-java library, ClientPreparedStatement had a public method called asSql(). The function was there in the 8.0.28 jar (Jan 17, 2022) but removed in 8.0.29 (Apr 25, 2022). I recognize that this is not part of the published JDBC interface, so I cannot legitimately call it a “bug”, but it was a public method and was not deprecated, and it was a very useful function for me. I used it in a QueryInterceptor which allowed me to give a meaningful name to AWS X-ray subsegments. I tried using toString() which I see invokes asSql(), but it prepends the class name which I then have to strip off.

The method was removed on Jan 17, 2022 by soklakov in commit 4c98c11eb93dd56c01b9f5945f0e16137c585a39.

Is there some recommended way for me to get the query from the ClientPreparedStatement, or its underlying this.query object since that has the asSql() function?

Viewing all articles
Browse latest Browse all 884

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>