Couchbase Lite
Objective-C API for iOS and Mac OS
CBLDatabase.h File Reference
#import "CBLBase.h"
#import "CBLView.h"

Go to the source code of this file.

Classes

protocol  <CBLFilterCompiler >
 An external object that knows how to convert source code into an executable filter. More...
 
class  CBLDatabase
 A CouchbaseLite database. More...
 
protocol  <CBLValidationContext >
 Context passed into a CBLValidationBlock. More...
 

Macros

#define VALIDATIONBLOCK(BLOCK)
 
#define FILTERBLOCK(BLOCK)   ^BOOL(CBLSavedRevision* revision, NSDictionary* params) {BLOCK}
 

Typedefs

typedef BOOL(^ CBLFilterBlock) (CBLSavedRevision *revision, NSDictionary *__nullable params)
 Filter block, used in changes feeds and replication. More...
 
typedef BOOL(^ CBLChangeEnumeratorBlock) (NSString *key, __nullable id oldValue, __nullable id newValue)
 The type of callback block passed to -[CBLValidationContext enumerateChanges:]. More...
 

Variables

NS_ASSUME_NONNULL_BEGIN typedef void(^ CBLValidationBlock )(CBLRevision *newRevision, id< CBLValidationContext > context)
 Validation block, used to approve revisions being added to the database. More...
 
NSString *const kCBLDatabaseChangeNotification
 This notification is posted by a CBLDatabase in response to document changes. More...
 

Macro Definition Documentation

◆ VALIDATIONBLOCK

#define VALIDATIONBLOCK (   BLOCK)
Value:
^void(CBLRevision* newRevision, id<CBLValidationContext> context)\
{BLOCK}
A revision of a CBLDocument.
Definition: CBLRevision.h:17

◆ FILTERBLOCK

#define FILTERBLOCK (   BLOCK)    ^BOOL(CBLSavedRevision* revision, NSDictionary* params) {BLOCK}

Typedef Documentation

◆ CBLFilterBlock

typedef BOOL(^ CBLFilterBlock) (CBLSavedRevision *revision, NSDictionary *__nullable params)

Filter block, used in changes feeds and replication.

◆ CBLChangeEnumeratorBlock

typedef BOOL(^ CBLChangeEnumeratorBlock) (NSString *key, __nullable id oldValue, __nullable id newValue)

The type of callback block passed to -[CBLValidationContext enumerateChanges:].

Variable Documentation

◆ CBLValidationBlock

NS_ASSUME_NONNULL_BEGIN typedef void(^ CBLValidationBlock) (CBLRevision *newRevision, id< CBLValidationContext > context)

Validation block, used to approve revisions being added to the database.

The block should call [context reject] or [context rejectWithMessage:] if the proposed new revision is invalid.

◆ kCBLDatabaseChangeNotification

NSString* const kCBLDatabaseChangeNotification

This notification is posted by a CBLDatabase in response to document changes.

The notification's userInfo dictionary's "changes" key contains an NSArray of CBLDatabaseChange objects that describe the revisions that were added.