MCPcopy Index your code
hub / github.com/castello/spring_basic / deleteUser

Method deleteUser

ch3/DBConnectionTest2Test.java:68–78  ·  view source on GitHub ↗
(String id)

Source from the content-addressed store, hash-verified

66 }
67
68 public int deleteUser(String id) throws Exception {
69 Connection conn = ds.getConnection();
70
71 String sql = "delete from user_info where id= ? ";
72
73 PreparedStatement pstmt = conn.prepareStatement(sql); // SQL Injection공격, 성능향상
74 pstmt.setString(1, id);
75// int rowCnt = pstmt.executeUpdate(); // insert, delete, update
76// return rowCnt;
77 return pstmt.executeUpdate(); // insert, delete, update
78 }
79
80 public User selectUser(String id) throws Exception {
81 Connection conn = ds.getConnection();

Callers 1

deleteUserTestMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected