MCPcopy Create free account
hub / github.com/TruthHun/BookStack / List

Method List

models/bookmarks.go:107–114  ·  view source on GitHub ↗

查询书签列表

(uid, bookId int)

Source from the content-addressed store, hash-verified

105
106//查询书签列表
107func (m *Bookmark) List(uid, bookId int) (bl []bookmarkList, rows int64, err error) {
108 o := orm.NewOrm()
109 fields := "b.id,d.document_name title,d.identify,b.book_id,b.uid,b.doc_id,b.create_at"
110 sql := "select %v from md_bookmark b left join md_documents d on b.doc_id=d.document_id where b.uid=? and b.book_id=? order by b.id desc limit 1000"
111 sql = fmt.Sprintf(sql, fields)
112 rows, err = o.Raw(sql, uid, bookId).QueryRows(&bl)
113 return
114}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected