提交 4277bfae authored 作者: Thomas Mueller's avatar Thomas Mueller

PreparedStatement.toString() now includes the parameter values in a human readable format.

上级 d8ea7a95
......@@ -82,11 +82,11 @@ public class TestPreparedStatement extends TestBase {
private void testToString(Connection conn) throws SQLException {
PreparedStatement prep = conn.prepareStatement("call 1");
assertEquals("prep0: call 1", prep.toString());
assertTrue(prep.toString().endsWith(": call 1"));
prep = conn.prepareStatement("call ?");
assertEquals("prep1: call ? {1: NULL}", prep.toString());
assertTrue(prep.toString().endsWith(": call ? {1: NULL}"));
prep.setString(1, "Hello World");
assertEquals("prep1: call ? {1: 'Hello World'}", prep.toString());
assertTrue(prep.toString().endsWith(": call ? {1: 'Hello World'}"));
}
private void testExecuteUpdateCall(Connection conn) throws SQLException {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论