MCPcopy Index your code
hub / github.com/wyouflf/xUtils3 / count

Method count

xutils/src/main/java/org/xutils/db/Selector.java:190–199  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

188 }
189
190 public long count() throws DbException {
191 if (!table.tableIsExists()) return 0;
192
193 DbModelSelector dmSelector = this.select("count(\"" + table.getId().getName() + "\") as count");
194 DbModel firstModel = dmSelector.findFirst();
195 if (firstModel != null) {
196 return firstModel.getLong("count", 0);
197 }
198 return 0;
199 }
200
201 @Override
202 public String toString() {

Callers 2

runMethod · 0.80
runMethod · 0.80

Calls 6

selectMethod · 0.95
findFirstMethod · 0.95
getLongMethod · 0.95
tableIsExistsMethod · 0.80
getNameMethod · 0.45
getIdMethod · 0.45

Tested by

no test coverage detected