CBLDocument

@interface CBLDocument : NSObject <CBLDictionary, NSMutableCopying>

A Couchbase Lite document. The CBLDocument is immutable.

  • id

    The document’s ID.

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSString *_Nonnull id;

    Swift

    var id: String { get }
  • The ID representing a document’s revision.

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable) NSString *revisionID;

    Swift

    var revisionID: String? { get }
  • Sequence number of the document in the database. This indicates how recently the document has been changed: every time any document is updated, the database assigns it the next sequential sequence number. Thus, if a document’s sequence property changes that means it’s been changed (on-disk); and if one document’s sequence is greater than another’s, that means it was changed more recently.

    Declaration

    Objective-C

    @property (readonly, nonatomic) uint64_t sequence;

    Swift

    var sequence: UInt64 { get }
  • Returns a mutable copy of the document.

    Declaration

    Objective-C

    - (nonnull CBLMutableDocument *)toMutable;

    Swift

    func toMutable() -> CBLMutableDocument

    Return Value

    The CBLMutableDocument object.

  • Undocumented

    Declaration

    Objective-C

    - (instancetype) init NS_UNAVAILABLE;