mirror of
https://github.com/documize/community.git
synced 2025-07-25 08:09:43 +02:00
WIP vendored dep upgrades
This commit is contained in:
parent
5f59e95495
commit
6409ad0d63
190 changed files with 64265 additions and 109666 deletions
|
@ -249,6 +249,18 @@ func (s Scope) UpdateLevel(ctx domain.RequestContext, documentID, pageID string,
|
|||
return
|
||||
}
|
||||
|
||||
// UpdateLevelSequence changes page level and sequence numbers.
|
||||
func (s Scope) UpdateLevelSequence(ctx domain.RequestContext, documentID, pageID string, level int, sequence float64) (err error) {
|
||||
_, err = ctx.Transaction.Exec("UPDATE page SET level=?, sequence=? WHERE orgid=? AND refid=?",
|
||||
level, sequence, ctx.OrgID, pageID)
|
||||
|
||||
if err != nil {
|
||||
err = errors.Wrap(err, "execute page level/sequence update")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// GetNextPageSequence returns the next sequence numbner to use for a page in given document.
|
||||
func (s Scope) GetNextPageSequence(ctx domain.RequestContext, documentID string) (maxSeq float64, err error) {
|
||||
row := s.Runtime.Db.QueryRow("SELECT max(sequence) FROM page WHERE orgid=? AND documentid=?", ctx.OrgID, documentID)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue