MCPcopy Index your code
hub / github.com/TruthHun/BookStack / FindByFieldFirst

Method FindByFieldFirst

models/document.go:157–161  ·  view source on GitHub ↗

根据指定字段查询一条文档.

(field string, v interface{})

Source from the content-addressed store, hash-verified

155
156//根据指定字段查询一条文档.
157func (m *Document) FindByFieldFirst(field string, v interface{}) (*Document, error) {
158 o := orm.NewOrm()
159 err := o.QueryTable(m.TableNameWithPrefix()).Filter(field, v).One(m)
160 return m, err
161}
162
163//根据指定字段查询一条文档.
164func (m *Document) FindByBookIdAndDocIdentify(BookId, Identify interface{}) (*Document, error) {

Callers

nothing calls this directly

Calls 1

TableNameWithPrefixMethod · 0.95

Tested by

no test coverage detected