MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / Get1xRevBody

Method Get1xRevBody

db/crud.go:290–302  ·  view source on GitHub ↗

Get Rev with all-or-none history based on specified 'history' flag

(ctx context.Context, docid, revOrCV string, history bool, attachmentsSince []string)

Source from the content-addressed store, hash-verified

288
289// Get Rev with all-or-none history based on specified 'history' flag
290func (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
304type Get1xRevBodyOptions struct {
305 MaxHistory int

Calls 1