public class ResultSets extends Object
Modifier and Type | Method and Description |
---|---|
static void |
showResult(ResultSet rs,
int limit)
显示sql的resultset
|
static void |
showResult(ResultSet rs,
int limit,
boolean closeIt)
以文本显示SQL结果
|
static List<Map<String,Object>> |
toMap(ResultSet rs) |
static List<Object> |
toObject(ResultSet rs,
int column) |
static List<Object> |
toObjectList(ResultSet wrapper,
int column,
int maxReturn) |
static List<String> |
toStringList(ResultSet rs,
String column,
int maxReturn)
获取指定列的String数据,整体返回一个List
|
public static void showResult(ResultSet rs, int limit)
rs
- 结果集limit
- 限制public static void showResult(ResultSet rs, int limit, boolean closeIt)
rs
- 结果集limit
- 限制closeIt
- 是否关闭public static List<Map<String,Object>> toMap(ResultSet rs) throws SQLException
SQLException
public static List<Object> toObject(ResultSet rs, int column) throws SQLException
SQLException
public static List<Object> toObjectList(ResultSet wrapper, int column, int maxReturn) throws SQLException
SQLException
public static List<String> toStringList(ResultSet rs, String column, int maxReturn) throws SQLException
rs
- column
- maxReturn
- SQLException
Copyright © 2020. All rights reserved.