pub unsafe extern "C" fn c4db_getDoc(
database: *mut C4Database,
docID: C4String,
mustExist: bool,
content: C4DocContentLevel,
outError: *mut C4Error,
) -> *mut C4DocumentExpand description
Gets a document from the database given its ID.
The current revision is selected (if the document exists.)
You must call c4doc_release() when finished with the document.
@param database The database to read from.
@param docID The document’s ID.
@param mustExist Governs behavior if no document with that ID exists. If true, the call fails
with error kC4NotFound. If false, a C4Document with no contents is returned.
@param content How much content to retrieve: metadata only, current revision, or all revisions.
@param outError On failure, error information is stored here.
@return A new C4Document instance (which must be released), or NULL.