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

Function DelByIds

models/Models.go:148–150  ·  view source on GitHub ↗

根据指定的表和id删除指定的记录,如果在删除记录的时候也删除记录中记录的文件,则不能调用该方法 @param table 指定要删除记录的数据表 @param id 要删除的记录的ID @return affected 影响的记录数 @return err 错误

(table string, id ...interface{})

Source from the content-addressed store, hash-verified

146//@return affected 影响的记录数
147//@return err 错误
148func DelByIds(table string, id ...interface{}) (affected int64, err error) {
149 return orm.NewOrm().QueryTable(getTable(table)).Filter("Id__in", id...).Delete()
150}
151
152//根据指定的表和id条件更新表字段,不支持批量更新
153//@param table 需要更新的表

Callers

nothing calls this directly

Calls 2

getTableFunction · 0.85
DeleteMethod · 0.80

Tested by

no test coverage detected