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

Method InsertOrUpdateMulti

models/label.go:57–66  ·  view source on GitHub ↗

批量插入或更新标签.

(labels string)

Source from the content-addressed store, hash-verified

55
56//批量插入或更新标签.
57func (m *Label) InsertOrUpdateMulti(labels string) {
58 if labels != "" {
59 labelArray := strings.Split(labels, ",")
60 for _, label := range labelArray {
61 if label != "" {
62 NewLabel().InsertOrUpdate(strings.TrimSpace(label))
63 }
64 }
65 }
66}
67
68//分页查找标签.
69func (m *Label) FindToPager(pageIndex, pageSize int, word ...string) (labels []*Label, totalCount int, err error) {

Callers 4

AddTagsMethod · 0.80
InsertMethod · 0.80
UpdateMethod · 0.80
ThoroughDeleteBookMethod · 0.80

Calls 2

NewLabelFunction · 0.85
InsertOrUpdateMethod · 0.45

Tested by

no test coverage detected