android ormlite queryBuilder.where() 多条件

时间:2024-11-01 11:35:26
QueryBuilder<VideoTagInfo, Integer> queryBuilder = videoTagInfoIntegerDao.queryBuilder();
try {
queryBuilder.where().eq("value",roomId).and().eq("myFocus",true);
VideoTagInfo videoTagInfo = queryBuilder.queryForFirst();
long count = queryBuilder.countOf();
Log.i("ss","___________________________________count:"+count+"_____videoTagInfo:"+videoTagInfo);
if(videoTagInfo != null){
return true;
} } catch (SQLException e) {
Log.i("ss","____________________________________________e:"+e);
e.printStackTrace(); }