/** * @see #queryFirst(String, Object...) * @param sql an SQL statement */ public static <T> T queryFirst(String sql) { return dbPro.queryFirst(sql); }
/** * Execute sql query and return the first result. I recommend add "limit 1" in your sql. * * @param sql an SQL statement that may contain one or more '?' IN parameter placeholders * @param paras the parameters of sql * @return Object[] if your sql has select more than one column, and it return Object if your sql * has select only one column. */ public static <T> T queryFirst(String sql, Object... paras) { return dbPro.queryFirst(sql, paras); }