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

Method Find

models/attachment.go:67–74  ·  view source on GitHub ↗
(id int)

Source from the content-addressed store, hash-verified

65}
66
67func (m *Attachment) Find(id int) (*Attachment, error) {
68 if id <= 0 {
69 return m, ErrInvalidParameter
70 }
71 o := orm.NewOrm()
72 err := o.QueryTable(m.TableNameWithPrefix()).Filter("attachment_id", id).One(m)
73 return m, err
74}
75
76func (m *Attachment) FindListByDocumentId(docId int) (attaches []*Attachment, err error) {
77 o := orm.NewOrm()

Callers

nothing calls this directly

Calls 1

TableNameWithPrefixMethod · 0.95

Tested by

no test coverage detected