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

Function NewDocument

db/document.go:366–368  ·  view source on GitHub ↗

Returns a new empty document.

(docid string)

Source from the content-addressed store, hash-verified

364
365// Returns a new empty document.
366func NewDocument(docid string) *Document {
367 return &Document{ID: docid, SyncData: SyncData{History: make(RevTree)}}
368}
369
370// Accessors for document properties. To support lazy unmarshalling of document contents, all access should be done through accessors
371func (doc *Document) Body(ctx context.Context) Body {

Callers 7

unmarshalDocumentFunction · 0.85
GetDocumentMethod · 0.85
BenchmarkUnmarshalBodyFunction · 0.85
TestRevAndVersionFunction · 0.85
TestAlignRevTreeHistoryFunction · 0.85
TestRevTreeConflictCheckFunction · 0.85

Calls

no outgoing calls

Tested by 5

GetDocumentMethod · 0.68
BenchmarkUnmarshalBodyFunction · 0.68
TestRevAndVersionFunction · 0.68
TestAlignRevTreeHistoryFunction · 0.68
TestRevTreeConflictCheckFunction · 0.68