This commit is contained in:
2019-04-22 00:27:04 +08:00
parent db8c9b3182
commit ebbd490913
19 changed files with 329 additions and 107 deletions

View File

@@ -121,6 +121,20 @@ public class DbSourceMysql implements DbSource {
new RuntimeException("[DbSourceMysql.dropTable] NOT SUPPORT right now" ); // todo:
}
@Override
public void exetute(String sql) {
Connection connection = connection();
try (
PreparedStatement ps = connection.prepareStatement(sql);
){
ps.executeUpdate();
} catch (SQLException e) {
e.printStackTrace();
} finally {
release(connection);
}
}
private Connection connection() {
return connection(0);
}