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

Method InsertOrUpdate

models/document_history.go:75–84  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

73}
74
75func (m *DocumentHistory) InsertOrUpdate() (history *DocumentHistory, err error) {
76 o := orm.NewOrm()
77 history = m
78 if history.HistoryId > 0 {
79 _, err = o.Update(history)
80 } else {
81 _, err = o.Insert(history)
82 }
83 return
84}
85
86//分页查询指定文档的历史.
87func (m *DocumentHistory) FindToPager(docId, pageIndex, pageSize int) (docs []*DocumentHistorySimpleResult, totalCount int, err error) {

Callers 1

ContentMethod · 0.95

Calls 2

UpdateMethod · 0.45
InsertMethod · 0.45

Tested by

no test coverage detected