#define CBLAPI
Definition CBL_Compat.h:105
#define _cbl_nullable
Definition CBL_Compat.h:92
#define CBL_CAPI_BEGIN
Definition CBL_Compat.h:107
#define CBL_CAPI_END
Definition CBL_Compat.h:108
#define CBL_PUBLIC
Definition CBL_Compat.h:125
#define CBL_ENUM(_type, _name)
Definition CBL_Compat.h:62
#define _cbl_warn_unused
Definition CBL_Compat.h:40
FLSlice FLString
Definition FLSlice.h:98
struct CBLCollection CBLCollection
A collection, a document container.
Definition CBLBase.h:195
_cbl_warn_unused FLSliceResult CBLDocument_CreateJSON(const CBLDocument *)
Returns a document's properties as JSON.
_cbl_warn_unused CBLDocument * CBLDocument_MutableCopy(const CBLDocument *original)
Creates a new mutable CBLDocument instance that refers to the same document as the original.
_cbl_warn_unused CBLDocument * CBLDocument_Create(void)
Creates a new, empty document in memory, with a randomly-generated unique ID.
CBLConcurrencyControl
Definition CBLDocument.h:35
FLString CBLDocument_ID(const CBLDocument *)
Returns a document's ID.
bool CBLDocument_SetJSON(CBLDocument *, FLSlice json, CBLError *_cbl_nullable outError)
Sets a mutable document's properties from a JSON string.
CBLCollection *_cbl_nullable CBLDocument_Collection(const CBLDocument *)
Returns a document's collection or NULL for the new document that hasn't been saved.
uint64_t CBLDocument_Timestamp(const CBLDocument *)
The hybrid logical timestamp in nanoseconds since epoch that the revision was created.
CBL_PUBLIC const FLSlice kCBLTypeProperty
"@type"
bool(* CBLConflictHandler)(void *_cbl_nullable context, CBLDocument *_cbl_nullable documentBeingSaved, const CBLDocument *_cbl_nullable conflictingDocument)
Custom conflict handler for use when saving or deleting a document.
Definition CBLDocument.h:55
struct CBLDocument CBLDocument
An in-memory copy of a document.
Definition CBLBase.h:204
uint64_t CBLDocument_Sequence(const CBLDocument *)
Returns a document's current sequence in the local database.
FLString CBLDocument_RevisionID(const CBLDocument *)
Returns a document's revision ID, which is a short opaque string that's guaranteed to be unique to ev...
FLMutableDict CBLDocument_MutableProperties(CBLDocument *)
Returns a mutable document's properties as a mutable dictionary.
FLDict CBLDocument_Properties(const CBLDocument *)
Returns a document's properties as a dictionary.
_cbl_warn_unused CBLDocument * CBLDocument_CreateWithID(FLString docID)
Creates a new, empty document in memory, with the given ID.
void CBLDocument_SetProperties(CBLDocument *, FLMutableDict properties)
Sets a mutable document's properties.
@ kCBLConcurrencyControlLastWriteWins
The current save/delete will overwrite a conflicting revision if there is a conflict.
Definition CBLDocument.h:37
@ kCBLConcurrencyControlFailOnConflict
The current save/delete will fail if there is a conflict.
Definition CBLDocument.h:39
#define CBL_REFCOUNTED(TYPE, NAME)
Definition CBLBase.h:171
struct _FLDict * FLMutableDict
A reference to a mutable dictionary.
Definition FLBase.h:40
const struct _FLDict * FLDict
A reference to a dictionary (map) value.
Definition FLBase.h:37
A struct holding information about an error.
Definition CBLBase.h:105
A simple reference to a block of memory.
Definition FLSlice.h:45
A heap-allocated block of memory returned from an API call.
Definition FLSlice.h:66