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

Method FindByFieldFirst

models/book.go:218–222  ·  view source on GitHub ↗

根据指定字段查询一个结果.

(field string, value interface{})

Source from the content-addressed store, hash-verified

216
217//根据指定字段查询一个结果.
218func (m *Book) FindByFieldFirst(field string, value interface{}) (book *Book, err error) {
219 o := orm.NewOrm()
220 err = o.QueryTable(m.TableNameWithPrefix()).Filter(field, value).One(m)
221 return m, err
222}
223
224func (m *Book) FindByIdentify(identify string, cols ...string) (book *Book, err error) {
225 o := orm.NewOrm()

Callers 15

isReadableFunction · 0.45
EditMethod · 0.45
CreateMethod · 0.45
UploadMethod · 0.45
DownloadAttachmentMethod · 0.45
DeleteMethod · 0.45
ContentMethod · 0.45
HistoryMethod · 0.45
DeleteHistoryMethod · 0.45
RestoreHistoryMethod · 0.45
CompareMethod · 0.45
FindPasswordMethod · 0.45

Calls 1

TableNameWithPrefixMethod · 0.95

Tested by

no test coverage detected