Skip to content

Commit

Permalink
perfect the executeUpdate
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiyi yan committed Dec 13, 2019
1 parent 26b9790 commit 4cd3ce5
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,15 @@ public ResultSet executeQuery() throws SQLException {

@Override
public int executeUpdate() throws SQLException {
return 0;
try {
SQLUnit sqlUnit = getSQLUnit(sql);
preparedStatement = preparedStatementGenerator.createPreparedStatement(sqlUnit.getSql());
replayMethodsInvocation(preparedStatement);
replaySetParameter(preparedStatement, sqlUnit.getParameters());
return preparedStatement.executeUpdate();
} finally {
clearParameters();
}
}

@Override
Expand Down

0 comments on commit 4cd3ce5

Please sign in to comment.