Menu

#459 Change AS400JDBCStatement.toString() to return the query instead of name

JDBC
closed-invalid
None
3
2022-02-17
2022-02-17
No

When configured Hibernate’s slow query log, the outcome doesn't have the query printed. Instead, it prints the statement number.

[2022-02-08 16:48:01.302] [ForkJoinPool.commonPool-worker-5] INFO org.hibernate.SQL_SLOW@logSlowQuery:183 - SlowQuery: 82 milliseconds. SQL: 'HikariProxyPreparedStatement@1198569055 wrapping STMT0001'

Would it be possible to return the query as opposed to name in AS400JDBCStatement.toString() ?

Discussion

  • John Eberhard

    John Eberhard - 2022-02-17
    • status: open --> closed-invalid
    • assigned_to: John Eberhard
     
  • John Eberhard

    John Eberhard - 2022-02-17

    Sorry, that is not possible. The method is already defined as follows.

    public java.lang.String toString()
    
    Returns the statement name.
    

    The statement name could be used in other ways by other applications, so making the change could break other applications.

     

Log in to post a comment.

MongoDB Logo MongoDB