Browse Source

!59 add query with config paras in CPI
Merge pull request !59 from fuhai/N/A

JFinal 5 years ago
parent
commit
a61984d96d
1 changed files with 4 additions and 0 deletions
  1. 4 0
      src/main/java/com/jfinal/plugin/activerecord/CPI.java

+ 4 - 0
src/main/java/com/jfinal/plugin/activerecord/CPI.java

@@ -67,6 +67,10 @@ public abstract class CPI {
 	public static <T> List<T> query(String configName, Connection conn, String sql, Object... paras) throws SQLException {
 		return Db.query(DbKit.getConfig(configName), conn, sql, paras);
 	}
+
+	public static <T> List<T> query(Config config, Connection conn, String sql, Object... paras) throws SQLException {
+		return Db.query(config, conn, sql, paras);
+	}
 	
 	/**
 	 * Return the columns map of the record