Adds an existing revision to a document along with its history (list of rev IDs.)
(ctx context.Context, newDoc *Document, docHistory []string, noConflicts bool, forceAllConflicts bool, existingDoc *sgbucket.BucketDocument, docUpdateEvent DocUpdateType)
| 1556 | |
| 1557 | // Adds an existing revision to a document along with its history (list of rev IDs.) |
| 1558 | func (db *DatabaseCollectionWithUser) PutExistingRev(ctx context.Context, newDoc *Document, docHistory []string, noConflicts bool, forceAllConflicts bool, existingDoc *sgbucket.BucketDocument, docUpdateEvent DocUpdateType) (doc *Document, newRevID string, err error) { |
| 1559 | opts := PutDocOptions{ |
| 1560 | NewDoc: newDoc, |
| 1561 | RevTreeHistory: docHistory, |
| 1562 | NoConflicts: noConflicts, |
| 1563 | ForceAllowConflictingTombstone: forceAllConflicts, |
| 1564 | ExistingDoc: existingDoc, |
| 1565 | DocUpdateEvent: docUpdateEvent, |
| 1566 | } |
| 1567 | return db.PutExistingRevWithConflictResolution(ctx, opts) |
| 1568 | } |
| 1569 | |
| 1570 | // PutDocOptions encapsulates the options for putting a document revision. |
| 1571 | type PutDocOptions struct { |