Get Rev with all-or-none history based on specified 'history' flag
(ctx context.Context, docid, revOrCV string, history bool, attachmentsSince []string)
| 288 | |
| 289 | // Get Rev with all-or-none history based on specified 'history' flag |
| 290 | func (db *DatabaseCollectionWithUser) Get1xRevBody(ctx context.Context, docid, revOrCV string, history bool, attachmentsSince []string) (Body, error) { |
| 291 | maxHistory := 0 |
| 292 | if history { |
| 293 | maxHistory = math.MaxInt32 |
| 294 | } |
| 295 | |
| 296 | return db.Get1xRevBodyWithHistory(ctx, docid, revOrCV, Get1xRevBodyOptions{ |
| 297 | MaxHistory: maxHistory, |
| 298 | HistoryFrom: nil, |
| 299 | AttachmentsSince: attachmentsSince, |
| 300 | ShowExp: false, |
| 301 | }) |
| 302 | } |
| 303 | |
| 304 | type Get1xRevBodyOptions struct { |
| 305 | MaxHistory int |