/**
* ResultSet 转换成JsonArray
*
* @throws SQLException
**/
public JSONArray resultSet2JsonArray(ResultSet rs) throws SQLException {
ResultSetMetaData md = rs.getMetaData(); // 得到结果集(rs)的结构信息,比如字段数、字段名等
int columnCount = md.getColumnCount(); // 返回此 ResultSet 对象中的列数
JSONArray jsonArray = new JSONArray();
while (rs.next()) {
JSONObject json = new JSONObject();
for (int i = 1; i <= columnCount; i++) {
j
* ResultSet 转换成JsonArray
*
* @throws SQLException
**/
public JSONArray resultSet2JsonArray(ResultSet rs) throws SQLException {
ResultSetMetaData md = rs.getMetaData(); // 得到结果集(rs)的结构信息,比如字段数、字段名等
int columnCount = md.getColumnCount(); // 返回此 ResultSet 对象中的列数
JSONArray jsonArray = new JSONArray();
while (rs.next()) {
JSONObject json = new JSONObject();
for (int i = 1; i <= columnCount; i++) {
j