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

Method FindForRoleId

models/relationship.go:90–97  ·  view source on GitHub ↗
(bookId, memberId int)

Source from the content-addressed store, hash-verified

88}
89
90func (m *Relationship) FindForRoleId(bookId, memberId int) (int, error) {
91 o := orm.NewOrm()
92 err := o.QueryTable(m.TableNameWithPrefix()).Filter("book_id", bookId).Filter("member_id", memberId).One(m, "role_id")
93 if err != nil {
94 return 0, err
95 }
96 return m.RoleId, nil
97}
98
99func (m *Relationship) FindByBookIdAndMemberId(bookId, memberId int) (*Relationship, error) {
100 o := orm.NewOrm()

Callers 2

isReadableFunction · 0.80
AddMemberMethod · 0.80

Calls 1

TableNameWithPrefixMethod · 0.95

Tested by

no test coverage detected