MCPcopy Create free account
hub / github.com/castello/spring_basic / count

Method count

ch4/UserDaoImpl.java:111–125  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

109 }
110
111 @Override
112 public int count() throws Exception {
113 String sql = "SELECT count(*) FROM user_info ";
114
115 try(
116 Connection conn = ds.getConnection();
117 PreparedStatement pstmt = conn.prepareStatement(sql);
118 ResultSet rs = pstmt.executeQuery();
119 ){
120 rs.next();
121 int result = rs.getInt(1);
122
123 return result;
124 }
125 }
126
127 @Override
128 public void deleteAll() throws Exception {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected