public int findCount(QueryBuilder.Where wh = null) { QueryBuilder.Select select = new QueryBuilder.Select(this.table); select.addField("COUNT(1) AS C"); if (wh != null) { select.setWhere(wh); } var group_records = db.select(select.get()); int c = 0; if (group_records.Count > 0) { var records = group_records["0"]; if (records.Count > 0) { var record = records[0]; c = int.Parse(record["C"].ToString()); } } return(c); }
public Dictionary <String, List <Dictionary <String, Object> > > find(QueryBuilder.Select select) { this.beforeFind(select); var q = select.get(); var records = db.select(q); return(records); }