bug fixed for sql parser && enhance mock driver

This commit is contained in:
温少
2012-03-31 22:44:05 +08:00
parent ffcd1cae4a
commit 8a6bd52078
7 changed files with 126 additions and 31 deletions
@@ -65,6 +65,10 @@ public class MockPreparedStatement extends MockStatement implements PreparedStat
if (mockConnection != null && mockConnection.getDriver() != null) {
return mockConnection.getDriver().createResultSet(this);
}
if (mockConnection != null) {
mockConnection.handleSleep();
}
return new MockResultSet(this);
}
@@ -76,6 +80,10 @@ public class MockPreparedStatement extends MockStatement implements PreparedStat
@Override
public int executeUpdate() throws SQLException {
checkOpen();
if (mockConnection != null) {
mockConnection.handleSleep();
}
return 0;
}
@@ -186,6 +194,10 @@ public class MockPreparedStatement extends MockStatement implements PreparedStat
public boolean execute() throws SQLException {
checkOpen();
if (mockConnection != null) {
mockConnection.handleSleep();
}
return false;
}