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

Method GetDocument

db/crud.go:64–67  ·  view source on GitHub ↗

GetDocument with raw returns the document from the bucket. This may perform an on-demand import.

(ctx context.Context, docid string, unmarshalLevel DocumentUnmarshalLevel)

Source from the content-addressed store, hash-verified

62
63// GetDocument with raw returns the document from the bucket. This may perform an on-demand import.
64func (c *DatabaseCollection) GetDocument(ctx context.Context, docid string, unmarshalLevel DocumentUnmarshalLevel) (doc *Document, err error) {
65 doc, _, err = c.GetDocumentWithRaw(ctx, docid, unmarshalLevel)
66 return doc, err
67}
68
69// GetDocumentWithRaw returns the document from the bucket. This may perform an on-demand import.
70func (c *DatabaseCollection) GetDocumentWithRaw(ctx context.Context, docid string, unmarshalLevel DocumentUnmarshalLevel) (doc *Document, rawBucketDoc *sgbucket.BucketDocument, err error) {

Callers 2

RequireCurrentVersionMethod · 0.95

Calls 1

GetDocumentWithRawMethod · 0.95

Tested by

no test coverage detected