asSql() method is removed from ClientPreparedStatement
Posted by: Ken Van Camp
Date: December 21, 2022 09:57AM

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?

Options: ReplyQuote


Subject
Written By
Posted
asSql() method is removed from ClientPreparedStatement
December 21, 2022 09:57AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.