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

Method updateExpiry

db/crud.go:2465–2483  ·  view source on GitHub ↗
(syncExpiry, updatedExpiry *uint32, expiry *uint32)

Source from the content-addressed store, hash-verified

2463}
2464
2465func (doc *Document) updateExpiry(syncExpiry, updatedExpiry *uint32, expiry *uint32) (finalExp *uint32) {
2466 if syncExpiry != nil {
2467 finalExp = syncExpiry
2468 } else if updatedExpiry != nil {
2469 finalExp = updatedExpiry
2470 } else if expiry != nil {
2471 finalExp = expiry
2472 }
2473
2474 if finalExp != nil {
2475 doc.UpdateExpiry(*finalExp)
2476 } else {
2477 doc.UpdateExpiry(0)
2478
2479 }
2480
2481 return finalExp
2482
2483}
2484
2485// IsIllegalConflict returns true if the given operation is forbidden due to conflicts.
2486// AllowConflicts is whether or not the database allows conflicts,

Callers 1

documentUpdateFuncMethod · 0.80

Calls 1

UpdateExpiryMethod · 0.95

Tested by

no test coverage detected