com.jfinal.plugin.activerecord.Db.queryInt()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(1.3k)|赞(0)|评价(0)|浏览(164)

本文整理了Java中com.jfinal.plugin.activerecord.Db.queryInt()方法的一些代码示例,展示了Db.queryInt()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Db.queryInt()方法的具体详情如下:
包路径:com.jfinal.plugin.activerecord.Db
类名称:Db
方法名:queryInt

Db.queryInt介绍

暂无

代码示例

代码示例来源:origin: JpressProjects/jpress

@Override
public int findCountByStatus(String status) {
  return Db.queryInt("select count(*) from user where status = ?", status);
}

代码示例来源:origin: JpressProjects/jpress

@Override
public int findCountByStatus(String status) {
  return Db.queryInt("select count(*) from article where status = ?", status);
}

代码示例来源:origin: JpressProjects/jpress

@Override
public int findCountByStatus(String status) {
  return Db.queryInt("select count(*) from single_page where status = ?", status);
}

代码示例来源:origin: ticktack/kungfu

protected static boolean isExist(String sql, Object... params) {
  // sql : select id from table_name where  ...
  return Db.queryInt(sql, params) == null ? false : true;
}

代码示例来源:origin: 94fzb/zrlog

public boolean updateByKV(String name, Object value) {
  if (Db.queryInt("select siteId from " + TABLE_NAME + " where name=?", name) != null) {
    Db.update("update " + TABLE_NAME + " set value=? where name=?", value, name);
  } else {
    Db.update("insert " + TABLE_NAME + "(`value`,`name`) value(?,?)", value, name);
  }
  return true;
}

相关文章