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

Method FindFirst

models/label.go:34–40  ·  view source on GitHub ↗
(field string, value interface{})

Source from the content-addressed store, hash-verified

32}
33
34func (m *Label) FindFirst(field string, value interface{}) (*Label, error) {
35 o := orm.NewOrm()
36
37 err := o.QueryTable(m.TableNameWithPrefix()).Filter(field, value).One(m)
38
39 return m, err
40}
41
42//插入或更新标签.
43func (m *Label) InsertOrUpdate(labelName string) (err error) {

Callers 1

RunMigrationFunction · 0.45

Calls 1

TableNameWithPrefixMethod · 0.95

Tested by

no test coverage detected