本文整理了Java中com.jfinal.plugin.activerecord.Db.query()
方法的一些代码示例,展示了Db.query()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Db.query()
方法的具体详情如下:
包路径:com.jfinal.plugin.activerecord.Db
类名称:Db
方法名:query
暂无
代码示例来源:origin: jfinal/jfinal
public static <T> List<T> query(Connection conn, String sql, Object... paras) throws SQLException {
return Db.query(DbKit.config, conn, sql, paras);
}
代码示例来源:origin: jfinal/jfinal
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);
}
代码示例来源:origin: jfinal/jfinal
List result = Db.query(config, conn, totalRowSql, paras);
int size = result.size();
if (isGroupBySql == null) {
代码示例来源:origin: com.jfinal/jfinal
public static <T> List<T> query(Connection conn, String sql, Object... paras) throws SQLException {
return Db.query(DbKit.config, conn, sql, paras);
}
代码示例来源:origin: com.github.sogyf/goja-jfinal
public static <T> List<T> query(Connection conn, String sql, Object... paras) throws SQLException {
return Db.query(DbKit.config, conn, sql, paras);
}
代码示例来源:origin: 94fzb/zrlog
public Map<String, Long> getArchives() {
List<Timestamp> lo = Db.query("select releaseTime from " + TABLE_NAME + " where rubbish=? and privacy=? order by releaseTime desc", rubbish, privacy);
Map<String, Long> archives = new LinkedHashMap<>();
for (Timestamp objects : lo) {
if (objects != null) {
String key = new SimpleDateFormat("yyyy_MM").format(new Date(objects.getTime()));
if (archives.containsKey(key)) {
archives.put(key, archives.get(key) + 1);
} else {
archives.put(key, 1L);
}
}
}
return archives;
}
代码示例来源:origin: com.github.sogyf/goja-jfinal
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);
}
代码示例来源:origin: com.jfinal/jfinal
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);
}
代码示例来源:origin: stackoverflow.com
protected static boolean exists(String table, long id) throws Exception
{
Db db = Util.getDb();
Query q = db.query();
q.select( idField ).whereLong(idField, id).limit(1).get(table);
return q.hasResults();
}
代码示例来源:origin: com.github.sogyf/goja-jfinal
List result = Db.query(config, conn, "select count(*) " + DbKit.replaceFormatSqlOrderBy(sqlExceptSelect), paras);
int size = result.size();
if (size == 1)
代码示例来源:origin: com.jfinal/jfinal
List result = Db.query(config, conn, totalRowSql, paras);
int size = result.size();
if (isGroupBySql == null) {
内容来源于网络,如有侵权,请联系作者删除!