Adds a revision body (as Body) to a document. Removes special properties first.
(ctx context.Context, revid string, newDoc *Document, storeInline, hasAttachments bool)
| 837 | |
| 838 | // Adds a revision body (as Body) to a document. Removes special properties first. |
| 839 | func (doc *Document) setRevisionBody(ctx context.Context, revid string, newDoc *Document, storeInline, hasAttachments bool) { |
| 840 | if revid == doc.GetRevTreeID() { |
| 841 | doc._body = newDoc._body |
| 842 | doc._rawBody = newDoc._rawBody |
| 843 | } else { |
| 844 | bodyBytes, _ := newDoc.BodyBytes(ctx) |
| 845 | doc.setNonWinningRevisionBody(revid, bodyBytes, storeInline, hasAttachments) |
| 846 | } |
| 847 | } |
| 848 | |
| 849 | // Adds a revision body (as []byte) to a document. Flags for external storage when appropriate |
| 850 | func (doc *Document) setNonWinningRevisionBody(revid string, body []byte, storeInline bool, hasAttachments bool) { |
no test coverage detected