Mantis - Resin
Viewing Issue Advanced Details
523 feature always 12-20-05 08:28 01-17-06 11:03
anonymous  
 
normal  
closed 3.0.16  
fixed  
none    
none 3.0.18  
0000523: Implement toString() for com.caucho.sql.UserPreparedStatement
It would be nice if the prepared statment implemenation that resin uses would implement a toString() function.
For debugging it is sometimes helpful to just include a quick dump of a prepared statment (eg. System.out.println("QUERY: " + ps);). I realize that I am relying on implementation specific behavior, but I have found it to be pretty useful - especially for tracking down parameters that have not been filled in correctly or parameters that have been numbered wrong.

Since your code appears to be just a simple proxy, the change should be pretty straightforward:

------------- CODE -----------

/**
 * Convert this prepared statment to a string. Only for debugging.
 */
public String toString()
{
  return _pstmt.toString();
}

----------- END CODE -----------

There are no notes attached to this issue.