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

Method FindByField

models/book.go:211–215  ·  view source on GitHub ↗

根据指定字段查询结果集.

(field string, value interface{})

Source from the content-addressed store, hash-verified

209
210//根据指定字段查询结果集.
211func (m *Book) FindByField(field string, value interface{}) (books []*Book, err error) {
212 o := orm.NewOrm()
213 _, err = o.QueryTable(m.TableNameWithPrefix()).Filter(field, value).All(&books)
214 return
215}
216
217//根据指定字段查询一个结果.
218func (m *Book) FindByFieldFirst(field string, value interface{}) (book *Book, err error) {

Callers 1

CreateMethod · 0.95

Calls 2

TableNameWithPrefixMethod · 0.95
AllMethod · 0.45

Tested by

no test coverage detected