|
LiteCore
Couchbase Lite cross-platform core implementation
|
Data Structures | |
| struct | C4EnumeratorOptions |
| Options for enumerating over all documents. More... | |
| struct | C4DocumentInfo |
| Metadata about a document (actually about its current revision.) More... | |
Enumerations | |
| enum | C4EnumeratorFlags : uint16_t { kC4Descending = 0x01 , kC4Unsorted = 0x02 , kC4IncludeDeleted = 0x08 , kC4IncludeNonConflicted = 0x10 , kC4IncludeBodies = 0x20 , kC4IncludeRevHistory = 0x40 } |
Functions | |
| void | c4enum_close (C4DocEnumerator *e) |
| Closes an enumeration. | |
| NODISCARD CBL_CORE_API C4DocEnumerator * | c4db_enumerateChanges (C4Database *database, C4SequenceNumber since, const C4EnumeratorOptions *options, C4Error *outError) |
| Creates an enumerator ordered by sequence. | |
| NODISCARD CBL_CORE_API C4DocEnumerator * | c4db_enumerateAllDocs (C4Database *database, const C4EnumeratorOptions *options, C4Error *outError) |
| Creates an enumerator ordered by docID. | |
| NODISCARD CBL_CORE_API C4DocEnumerator * | c4coll_enumerateChanges (C4Collection *collection, C4SequenceNumber since, const C4EnumeratorOptions *options, C4Error *outError) |
| Creates an enumerator ordered by sequence. | |
| NODISCARD CBL_CORE_API C4DocEnumerator * | c4coll_enumerateAllDocs (C4Collection *collection, const C4EnumeratorOptions *options, C4Error *outError) |
| Creates an enumerator ordered by docID. | |
| NODISCARD CBL_CORE_API bool | c4enum_next (C4DocEnumerator *e, C4Error *outError) |
| Advances the enumerator to the next document. | |
| NODISCARD CBL_CORE_API C4Document * | c4enum_getDocument (C4DocEnumerator *e, C4Error *outError) |
| Returns the current document, if any, from an enumerator. | |
| CBL_CORE_API bool | c4enum_getDocumentInfo (C4DocEnumerator *e, C4DocumentInfo *outInfo) |
| Stores the metadata of the enumerator's current document into the supplied C4DocumentInfo struct. | |
Variables | |
| CBL_CORE_API const C4EnumeratorOptions | kC4DefaultEnumeratorOptions |
| Default all-docs enumeration options. | |
| enum C4EnumeratorFlags : uint16_t |
| NODISCARD CBL_CORE_API C4DocEnumerator * c4coll_enumerateAllDocs | ( | C4Collection * | collection, |
| const C4EnumeratorOptions * | options, | ||
| C4Error * | outError ) |
Creates an enumerator ordered by docID.
Options have the same meanings as in Couchbase Lite. There's no 'limit' option; just stop enumerating when you're done. Caller is responsible for freeing the enumerator when finished with it.
| collection | The collection. |
| options | Enumeration options (NULL for defaults). |
| outError | Error will be stored here on failure. |
| NODISCARD CBL_CORE_API C4DocEnumerator * c4coll_enumerateChanges | ( | C4Collection * | collection, |
| C4SequenceNumber | since, | ||
| const C4EnumeratorOptions * | options, | ||
| C4Error * | outError ) |
Creates an enumerator ordered by sequence.
Caller is responsible for freeing the enumerator when finished with it.
| collection | The collection. |
| since | The sequence number to start after. Pass 0 to start from the beginning. |
| options | Enumeration options (NULL for defaults). |
| outError | Error will be stored here on failure. |
| NODISCARD CBL_CORE_API C4DocEnumerator * c4db_enumerateAllDocs | ( | C4Database * | database, |
| const C4EnumeratorOptions * | options, | ||
| C4Error * | outError ) |
Creates an enumerator ordered by docID.
Options have the same meanings as in Couchbase Lite. There's no 'limit' option; just stop enumerating when you're done. Caller is responsible for freeing the enumerator when finished with it.
| database | The database. |
| options | Enumeration options (NULL for defaults). |
| outError | Error will be stored here on failure. |
| NODISCARD CBL_CORE_API C4DocEnumerator * c4db_enumerateChanges | ( | C4Database * | database, |
| C4SequenceNumber | since, | ||
| const C4EnumeratorOptions * | options, | ||
| C4Error * | outError ) |
Creates an enumerator ordered by sequence.
Caller is responsible for freeing the enumerator when finished with it.
| database | The database. |
| since | The sequence number to start after. Pass 0 to start from the beginning. |
| options | Enumeration options (NULL for defaults). |
| outError | Error will be stored here on failure. |
| void c4enum_close | ( | C4DocEnumerator * | e | ) |
Closes an enumeration.
This is optional, but can be used to free up resources if the enumeration has not reached its end, but will not be freed for a while.
| NODISCARD CBL_CORE_API C4Document * c4enum_getDocument | ( | C4DocEnumerator * | e, |
| C4Error * | outError ) |
Returns the current document, if any, from an enumerator.
| e | The enumerator. |
| outError | Error will be stored here on failure. |
| CBL_CORE_API bool c4enum_getDocumentInfo | ( | C4DocEnumerator * | e, |
| C4DocumentInfo * | outInfo ) |
Stores the metadata of the enumerator's current document into the supplied C4DocumentInfo struct.
Unlike c4enum_getDocument(), this allocates no memory.
| e | The enumerator. |
| outInfo | A pointer to a C4DocumentInfo struct that will be filled in if a document is found. |
| NODISCARD CBL_CORE_API bool c4enum_next | ( | C4DocEnumerator * | e, |
| C4Error * | outError ) |
Advances the enumerator to the next document.
Returns false at the end, or on error; look at the C4Error to determine which occurred, and don't forget to free the enumerator.
|
extern |
Default all-docs enumeration options.
(Equal to kC4IncludeNonConflicted | kC4IncludeBodies)