30#ifdef COUCHBASE_ENTERPRISE
33#pragma mark - Database Extension
54#pragma mark - CONFIGURATION
60#ifdef COUCHBASE_ENTERPRISE
82#ifdef COUCHBASE_ENTERPRISE
100#ifdef COUCHBASE_ENTERPRISE
122#pragma mark - FILE OPERATIONS
162#pragma mark - LIFECYCLE
207#ifdef COUCHBASE_ENTERPRISE
247#pragma mark - ACCESSORS
270#pragma mark - NOTIFICATION SCHEDULING
#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_ENUM(_type, _name)
Definition CBL_Compat.h:62
#define _cbl_warn_unused
Definition CBL_Compat.h:40
FLSliceResult FLStringResult
Definition FLSlice.h:99
FLSlice FLString
Definition FLSlice.h:98
bool CBL_CopyDatabase(FLString fromPath, FLString toName, const CBLDatabaseConfiguration *_cbl_nullable config, CBLError *_cbl_nullable outError)
Copies a database file to a new location, and assigns it a new internal UUID to distinguish it from t...
bool CBLDatabase_EndTransaction(CBLDatabase *, bool commit, CBLError *_cbl_nullable outError)
Ends a transaction, either committing or aborting.
struct CBLDatabase CBLDatabase
A connection to an open database.
Definition CBLBase.h:183
bool CBLEncryptionKey_FromPassword(CBLEncryptionKey *key, FLString password)
Derives an encryption key from a password.
bool CBLDatabase_Delete(CBLDatabase *, CBLError *_cbl_nullable outError)
Closes and deletes a database.
bool CBLDatabase_Close(CBLDatabase *, CBLError *_cbl_nullable outError)
Closes an open database.
bool CBL_DatabaseExists(FLString name, FLString inDirectory)
Returns true if a database with the given name exists in the given directory.
bool CBLDatabase_ChangeEncryptionKey(CBLDatabase *, const CBLEncryptionKey *_cbl_nullable newKey, CBLError *outError)
Encrypts or decrypts a database, or changes its encryption key.
_cbl_warn_unused CBLDatabase *_cbl_nullable CBLDatabase_Open(FLSlice name, const CBLDatabaseConfiguration *_cbl_nullable config, CBLError *_cbl_nullable outError)
Opens a database, or creates it if it doesn't exist yet, returning a new CBLDatabase instance.
bool CBL_DeleteDatabase(FLString name, FLString inDirectory, CBLError *_cbl_nullable outError)
Deletes a database file.
const CBLDatabaseConfiguration CBLDatabase_Config(const CBLDatabase *)
Returns the database's configuration, as given when it was opened.
CBLEncryptionAlgorithm
Definition CBLDatabase.h:62
bool CBLDatabase_PerformMaintenance(CBLDatabase *db, CBLMaintenanceType type, CBLError *_cbl_nullable outError)
Performs database maintenance.
_cbl_warn_unused FLStringResult CBLDatabase_Path(const CBLDatabase *)
Returns the database's full filesystem path, or null slice if the database is closed or deleted.
CBLDatabaseConfiguration CBLDatabaseConfiguration_Default(void)
Returns the default database configuration.
CBLMaintenanceType
Definition CBLDatabase.h:219
bool CBLDatabase_BeginTransaction(CBLDatabase *, CBLError *_cbl_nullable outError)
Begins a transaction.
bool CBL_EnableVectorSearch(FLString path, CBLError *_cbl_nullable outError)
ENTERPRISE EDITION ONLY.
bool CBLEncryptionKey_FromPasswordOld(CBLEncryptionKey *key, FLString password)
VOLATILE API: Derives an encryption key from a password in a way that is compatible with certain vari...
CBLEncryptionKeySize
Definition CBLDatabase.h:68
FLString CBLDatabase_Name(const CBLDatabase *)
Returns the database's name.
@ kCBLEncryptionNone
No encryption (default)
Definition CBLDatabase.h:63
@ kCBLEncryptionAES256
AES with 256-bit key.
Definition CBLDatabase.h:64
@ kCBLMaintenanceTypeIntegrityCheck
Check for the database’s corruption. If found, an error will be returned.
Definition CBLDatabase.h:227
@ kCBLMaintenanceTypeCompact
Compact the database file and delete unused attachments.
Definition CBLDatabase.h:221
@ kCBLMaintenanceTypeOptimize
Partially scan indexes to gather database statistics that help optimize queries.
Definition CBLDatabase.h:231
@ kCBLMaintenanceTypeReindex
Rebuild the entire database's indexes.
Definition CBLDatabase.h:224
@ kCBLMaintenanceTypeFullOptimize
Fully scans all indexes to gather database statistics that help optimize queries.
Definition CBLDatabase.h:236
@ kCBLEncryptionKeySizeAES256
Key size for kCBLEncryptionAES256.
Definition CBLDatabase.h:69
void(* CBLNotificationsReadyCallback)(void *_cbl_nullable context, CBLDatabase *db)
Callback indicating that the database (or an object belonging to it) is ready to call one or more lis...
Definition CBLDatabase.h:295
void CBLDatabase_SendNotifications(CBLDatabase *db)
Immediately issues all pending notifications for this database, by calling their listener callbacks.
void CBLDatabase_BufferNotifications(CBLDatabase *db, CBLNotificationsReadyCallback _cbl_nullable callback, void *_cbl_nullable context)
Switches the database to buffered-notification mode.
#define CBL_REFCOUNTED(TYPE, NAME)
Definition CBLBase.h:171
Database configuration options.
Definition CBLDatabase.h:80
bool fullSync
As Couchbase Lite normally configures its databases, There is a very small (though non-zero) chance t...
Definition CBLDatabase.h:94
FLString directory
The parent directory of the database.
Definition CBLDatabase.h:81
CBLEncryptionKey encryptionKey
The database's encryption key (if any)
Definition CBLDatabase.h:83
Encryption key specified in a CBLDatabaseConfiguration.
Definition CBLDatabase.h:73
uint8_t bytes[32]
Raw key data.
Definition CBLDatabase.h:75
CBLEncryptionAlgorithm algorithm
Encryption algorithm.
Definition CBLDatabase.h:74
A struct holding information about an error.
Definition CBLBase.h:105
A simple reference to a block of memory.
Definition FLSlice.h:45