public class BtDbUtil extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
void |
exeCallDb(String sql,
List<Object> params)
查询单条记录
|
List<Map<String,Object>> |
findModeResult(String sql,
List<Object> params)
查询多条记录
|
Map<String,Object> |
findSimpleResult(String sql,
List<Object> params)
查询单条记录
|
Connection |
getConnection()
获得数据库的连接
|
static BtDbUtil |
getInstance() |
void |
releaseConn()
释放数据库连接
|
boolean |
updateByPreparedStatement(String sql,
List<Object> params)
增加、删除、改
|
public static BtDbUtil getInstance()
public Connection getConnection()
public boolean updateByPreparedStatement(String sql, List<Object> params) throws SQLException
sql - SQL语句params - 参数SQLException - SQL异常public Map<String,Object> findSimpleResult(String sql, List<Object> params) throws SQLException
sql - SQL语句params - 参数SQLException - SQL异常public void exeCallDb(String sql, List<Object> params) throws SQLException
sql - SQL语句params - 参数SQLException - SQL异常public List<Map<String,Object>> findModeResult(String sql, List<Object> params) throws SQLException
sql - SQL语句params - 参数SQLException - SQL异常public void releaseConn()
Copyright © 2019. All rights reserved.