类 DbUtil
- java.lang.Object
-
- cn.codeforfun.migrate.core.utils.DbUtil
-
public class DbUtil extends Object
DbUtil工具类- 作者:
- wangbin
-
-
构造器概要
构造器 构造器 说明 DbUtil()
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static voidexecute(Connection connection, String sql)static <T> TgetBean(Connection connection, String sql, Class<T> clazz)static <T> TgetBean(Connection connection, String sql, Class<T> clazz, Object... params)static <T> List<T>getBeanList(Connection connection, String sql, Class<T> clazz)static <T> List<T>getBeanList(Connection connection, String sql, Class<T> clazz, Object... params)static ConnectiongetConnection(String url, String username, String password)
-
-
-
方法详细资料
-
getBeanList
public static <T> List<T> getBeanList(Connection connection, String sql, Class<T> clazz) throws SQLException
- 抛出:
SQLException
-
getBeanList
public static <T> List<T> getBeanList(Connection connection, String sql, Class<T> clazz, Object... params) throws SQLException
- 抛出:
SQLException
-
getBean
public static <T> T getBean(Connection connection, String sql, Class<T> clazz) throws SQLException
- 抛出:
SQLException
-
getBean
public static <T> T getBean(Connection connection, String sql, Class<T> clazz, Object... params) throws SQLException
- 抛出:
SQLException
-
getConnection
public static Connection getConnection(String url, String username, String password)
-
execute
public static void execute(Connection connection, String sql) throws SQLException
- 抛出:
SQLException
-
-