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

Function listByDBWithLabel

models/releate_book.go:120–129  ·  view source on GitHub ↗

Get the related books directly from DB by SQL composed with Labels

(book *Book, length int)

Source from the content-addressed store, hash-verified

118
119// Get the related books directly from DB by SQL composed with Labels
120func listByDBWithLabel(book *Book, length int) (ids []int) {
121 rawKeyWords := book.Label
122 if rawKeyWords == "" {
123 return
124 }
125
126 bookModel := NewBook()
127 ids, _ = bookModel.SearchBookByLabel(strings.Split(rawKeyWords, ","), length, []int{book.BookId})
128 return
129}

Callers 1

ListsMethod · 0.85

Calls 2

SearchBookByLabelMethod · 0.95
NewBookFunction · 0.85

Tested by

no test coverage detected