MCPcopy Index your code
hub / github.com/TruthHun/DocHub / Count

Function Count

models/Models.go:502–505  ·  view source on GitHub ↗

对单表记录进行统计查询 @param table 需要查询或者统计的表 @param cond 查询条件 @return cnt 统计的记录数

(table string, cond *orm.Condition)

Source from the content-addressed store, hash-verified

500//@param cond 查询条件
501//@return cnt 统计的记录数
502func Count(table string, cond *orm.Condition) (cnt int64) {
503 cnt, _ = orm.NewOrm().QueryTable(getTable(table)).SetCond(cond).Count()
504 return
505}
506
507//是否已收藏文档
508//@param did 文档id,即document id

Callers

nothing calls this directly

Calls 2

getTableFunction · 0.85
CountMethod · 0.80

Tested by

no test coverage detected