couchbase_lite_c_bindings library

Classes

CBLAuthenticator
CBLBlob
CBLBlobReadStream
CBLBlobWriteStream
CblC
CBLDatabase
CBLDatabaseConfiguration
Database configuration options.
CBLDocument
CBLEncryptionKey
Encryption key specified in a \ref CBLDatabaseConfiguration.
CBLError
A struct holding information about an error. It's declared on the stack by a caller, and its address is passed to an API function. If the function's return value indicates that there was an error (usually by returning NULL or false), then the CBLError will have been filled in with the details.
CBLIndexSpec
Parameters for creating a database index.
CBLListenerToken
CBLLogFileConfiguration
CBLProxySettings
Proxy settings for the replicator.
CBLQuery
CBLReplicatedDocument
CBLReplicator
CBLReplicatorProgress
A fractional progress value, ranging from 0.0 to 1.0 as replication progresses. The value is very approximate and may bounce around during replication; making it more accurate would require slowing down the replicator and incurring more load on the server. It's fine to use in a progress bar, though.
CBLReplicatorStatus
A replicator's current status.
CBLResultSet
FLArray
FLArrayIterator
FLDict
FLDictIterator
FLDoc
FLKeyPath
FLMutableArray
FLMutableDict
FLSharedKeys
FLSlot
FLString
FLValue
Work
Used for C<->Dart async callbacks

Properties

CBL_CopyDatabase → _dart_CBL_CopyDatabase
Copies a database file to a new location, and assigns it a new internal UUID to distinguish it from the original database when replicating. [...]
final
CBL_DatabaseExists → _dart_CBL_DatabaseExists
Returns true if a database with the given name exists in the given directory. [...]
final
CBL_DeleteDatabase → _dart_CBL_DeleteDatabase
Deletes a database file with the given name exists in the given directory. [...]
final
CBL_InstanceCount → _dart_CBL_InstanceCount
final
CBL_Log → _dart_CBLLog
final
CBL_Log_s → _dart_CBLLog_s
final
CBL_Release → _dart_CBL_Release
final
CBLAuth_NewBasic → _dart_CBLAuth_NewBasic
Creates an authenticator for HTTP Basic (username/password) auth.
final
CBLAuth_NewSession → _dart_CBLAuth_NewSession
Creates an authenticator using a Couchbase Sync Gateway login session identifier, and optionally a cookie name (pass NULL for the default.)
final
CBLBlob_ContentType → _dart_CBLBlob_ContentType
Returns a blob's MIME type, if its metadata has a content_type property.
final
CBLBlob_CreateWithData_c → _dart_CBLBlob_CreateWithData_c
final
CBLBlob_CreateWithStream → _dart_CBLBlob_CreateWithStream
final
CBLBlob_Digest → _dart_CBLBlob_Digest
Returns the cryptographic digest of a blob's content (from its digest property).
final
CBLBlob_Get → _dart_CBLBlob_Get
final
CBLBlob_Length → _dart_CBLBlob_Length
final
CBLBlob_LoadContent → _dart_CBLBlob_LoadContent
final
CBLBlob_OpenContentStream → _dart_CBLBlob_OpenContentStream
final
CBLBlob_Properties → _dart_CBLBlob_Properties
Returns a blob's metadata. This includes the digest, length and content_type properties, as well as any custom ones that may have been added.
final
CBLBlobReader_Close → _dart_CBLBlobReader_Close
final
CBLBlobReader_Read → _dart_CBLBlobReader_Read
final
CBLBlobWriter_Close → _dart_CBLBlobWriter_Close
final
CBLBlobWriter_New → _dart_CBLBlobWriter_New
final
CBLBlobWriter_Write → _dart_CBLBlobWriter_Write
final
CBLDatabase_AddChangeListener → _dart_CBLDatabase_AddChangeListener
Registers a database change listener callback. It will be called after one or more documents are changed on disk.
final
CBLDatabase_AddDocumentChangeListener → _dart_CBLDatabase_AddDocumentChangeListener
Registers a document change listener callback. It will be called after a specific document is changed on disk.
final
CBLDatabase_BeginBatch → _dart_CBLDatabase_BeginBatch
Begins a batch operation, similar to a transaction. You must later call CBLDatabase_EndBatch to end (commit) the batch. [...]
final
CBLDatabase_BufferNotifications → _dart_CBLDatabase_BufferNotifications
Switches the database to buffered-notification mode. Notifications for objects belonging to this database (documents, queries, replicators, and of course the database) will not be called immediately; your CBLNotificationsReadyCallback will be called instead.
final
CBLDatabase_Close → _dart_CBLDatabase_Close
Closes an open database.
final
CBLDatabase_Compact → _dart_CBLDatabase_Compact
Compacts a database file.
final
CBLDatabase_Count → _dart_CBLDatabase_Count
Returns the number of documents in the database.
final
CBLDatabase_CreateIndex → _dart_CBLDatabase_CreateIndex
Creates a database index. [...]
final
CBLDatabase_Delete → _dart_CBLDatabase_Delete
Closes and deletes a database. If there are any other connections to the database, an error is returned.
final
CBLDatabase_DeleteIndex → _dart_CBLDatabase_DeleteIndex
Deletes an index given its name.
final
CBLDatabase_EndBatch → _dart_CBLDatabase_EndBatch
Ends a batch operation. This must be called after CBLDatabase_BeginBatch.
final
CBLDatabase_GetDocument → _dart_CBLDatabase_GetDocument
Reads a document from the database, creating a new (immutable) CBLDocument object. Each call to this function creates a new object (which must later be released.) [...]
final
CBLDatabase_GetDocumentExpiration → _dart_CBLDatabase_GetDocumentExpiration
Returns the time, if any, at which a given document will expire and be purged. [...]
final
CBLDatabase_GetMutableDocument → _dart_CBLDatabase_GetMutableDocument
Reads a document from the database, in mutable form that can be updated and saved. This function is otherwise identical to CBLDatabase_GetDocument. [...]
final
CBLDatabase_IndexNames → _dart_CBLDatabase_IndexNames
Returns the names of the indexes on this database, as a Fleece array of strings.
final
CBLDatabase_Open → _dart_CBLDatabase_Open
Opens a database, or creates it if it doesn't exist yet, returning a new CBLDatabase instance. [...]
final
CBLDatabase_Path → _dart_CBLDatabase_Path
Returns the database's full filesystem path.
final
CBLDatabase_PurgeDocumentByID → _dart_CBLDatabase_PurgeDocumentByID
Purges a document, given only its ID. [...]
final
CBLDatabase_SaveDocument → _dart_CBLDatabase_SaveDocument
Saves a (mutable) document to the database. [...]
final
CBLDatabase_SaveDocumentResolving → _dart_CBLDatabase_SaveDocumentResolving
Saves a (mutable) document to the database. This function is the same as CBLDatabase_SaveDocument, except that it allows for custom conflict handling in the event that the document has been updated since doc was loaded.
final
CBLDatabase_SendNotifications → _dart_CBLDatabase_SendNotifications
Immediately issues all pending notifications for this database, by calling their listener callbacks.
final
CBLDatabase_SetDocumentExpiration → _dart_CBLDatabase_SetDocumentExpiration
Sets or clears the expiration time of a document. The expiration time is a CBLTimestamp (milliseconds since Unix epoch), or 0 if the document should never expire.
final
CBLDocument_Delete → _dart_CBLDocument_Delete
Deletes a document from the database. Deletions are replicated. [...]
final
CBLDocument_ID → _dart_CBLDocument_ID
Returns a document's ID.
final
CBLDocument_MutableCopy → _dart_CBLDocument_MutableCopy
Creates a new mutable CBLDocument instance that refers to the same document as the original. If the original document has unsaved changes, the new one will also start out with the same changes; but mutating one document thereafter will not affect the other. [...]
final
CBLDocument_MutableProperties → _dart_CBLDocument_MutableProperties
Returns a document's mutable properties.
final
CBLDocument_New → _dart_CBLDocument_New
Creates a new, empty document in memory. It will not be added to a database until saved.
final
CBLDocument_Properties → _dart_CBLDocument_Properties
Returns a document's properties.
final
CBLDocument_PropertiesAsJSON → _dart_CBLDocument_PropertiesAsJSON
Returns a document's properties as a null-terminated JSON string. [...]
final
CBLDocument_Purge → _dart_CBLDocument_Purge
Purges a document. This removes all traces of the document from the database. Purges are not replicated. If the document is changed on a server, it will be re-created when pulled. [...]
final
CBLDocument_RevisionID → _dart_CBLDocument_RevisionID
Returns a document's revision ID, which is a short opaque string that's guaranteed to be unique to every change made to the document. If the document doesn't exist yet, this function returns NULL.
final
CBLDocument_Sequence → _dart_CBLDocument_Sequence
Returns a document's current sequence in the local database. This number increases every time the document is saved, and a more recently saved document will have a greater sequence number than one saved earlier, so sequences may be used as an abstract 'clock' to tell relative modification times.
final
CBLDocument_SetProperties → _dart_CBLDocument_SetProperties
Set a document's properties.
final
CBLDocument_SetPropertiesAsJSON → _dart_CBLDocument_SetPropertiesAsJSON
Sets a mutable document's properties from a JSON string.
final
CBLError_Message → _dart_CBLError_Message
final
CBLListener_Remove → _dart_CBLListener_Remove
final
CBLLog_ConsoleLevel → _dart_CBLLog_ConsoleLevel
final
CBLLog_FileConfig → _dart_CBLLog_FileConfig
final
CBLLog_SetCallback_d → _dart_CBLLog_SetCallback_d
final
CBLLog_SetConsoleLevel → _dart_CBLLog_SetConsoleLevel
final
CBLLog_SetFileConfig → _dart_CBLLog_SetFileConfig
final
CBLLog_WillLogToConsole → _dart_CBLLog_WillLogToConsole
final
CBLQuery_AddChangeListener_d → _dart_CBLQuery_AddChangeListener_d
Registers a change listener callback with a query, turning it into a "live query" until the listener is removed (via CBLListener_Remove). [...]
final
CBLQuery_CopyCurrentResults → _dart_CBLQuery_CopyCurrentResults
final
CBLQuery_Execute → _dart_CBLQuery_Execute
Runs the query, returning the results. To obtain the results you'll typically call \ref CBLResultSet_Next in a while loop, examining the values in the \ref CBLResultSet each time around. [...]
final
CBLQuery_Explain_c → _dart_CBLQuery_Explain_c
Returns information about the query, including the translated SQLite form, and the search strategy. You can use this to help optimize the query: the word SCAN in the strategy indicates a linear scan of the entire database, which should be avoided by adding an index. The strategy will also show which index(es), if any, are used.
final
CBLQuery_New → _dart_CBLQuery_New
Creates a new query by compiling the input string. [...]
final
CBLQuery_ParametersAsJSON → _dart_CBLQuery_ParametersAsJSON
Returns the query's current parameter bindings as a JSON string, if any.
final
CBLQuery_SetParametersAsJSON → _dart_CBLQuery_SetParametersAsJSON
Assigns values to the query's parameters, from JSON data. See CBLQuery_SetParameters for details.
final
CBLReplicator_AddChangeListener_d → _dart_CBLReplicator_AddChangeListener_d
final
CBLReplicator_IsDocumentPending → _dart_CBLReplicator_IsDocumentPending
Indicates whether the document with the given ID has local changes that have not yet been pushed to the server by this replicator. This is equivalent to, but faster than, calling \ref CBLReplicator_PendingDocumentIDs and checking whether the result contains \p docID. See that function's documentation for details. \note A false result means the document is not pending, or there was an error. To tell the difference, compare the error code to zero.
final
CBLReplicator_New_d → _dart_CBLReplicator_New_d
final
CBLReplicator_PendingDocumentIDs → _dart_CBLReplicator_PendingDocumentIDs
Indicates which documents have local changes that have not yet been pushed to the server by this replicator. This is of course a snapshot, that will go out of date as the replicator makes progress and/or documents are saved locally. [...]
final
CBLReplicator_ResetCheckpoint → _dart_CBLReplicator_ResetCheckpoint
Instructs the replicator to ignore existing checkpoints the next time it runs. This will cause it to scan through all the documents on the remote database, which takes a lot longer, but it can resolve problems with missing documents if the client and server have gotten out of sync somehow.
final
CBLReplicator_SetHostReachable → _dart_CBLReplicator_SetHostReachable
Informs the replicator whether it's considered possible to reach the remote host with the current network configuration. The default value is true. This only affects the replicator's behavior while it's in the Offline state: Setting it to false will cancel any pending retry and prevent future automatic retries. Setting it back to true will initiate an immediate retry.
final
CBLReplicator_SetSuspended → _dart_CBLReplicator_SetSuspended
Puts the replicator in or out of "suspended" state. The default is false. Setting suspended=true causes the replicator to disconnect and enter Offline state; it will not attempt to reconnect while it's suspended. Setting suspended=false causes the replicator to attempt to reconnect, if it was connected when suspended, and is still in Offline state.
final
CBLReplicator_Start → _dart_CBLReplicator_Start
Starts a replicator, asynchronously. Does nothing if it's already started.
final
CBLReplicator_Status → _dart_CBLReplicator_Status
Returns the replicator's current status.
final
CBLReplicator_Stop → _dart_CBLReplicator_Stop
Stops a running replicator, asynchronously. Does nothing if it's not already started. The replicator will call your \ref CBLReplicatorChangeListener with an activity level of \ref kCBLReplicatorStopped after it stops. Until then, consider it still active.
final
CBLResultSet_Next → _dart_CBLResultSet_Next
Moves the result-set iterator to the next result. Returns false if there are no more results. [...]
final
CBLResultSet_RowArray → _dart_CBLResultSet_RowArray
Returns the current result as Array.
final
CBLResultSet_RowDict → _dart_CBLResultSet_RowDict
Returns the current result as Dict.
final
CBLResultSet_RowJSON → _dart_CBLResultSet_RowJSON
Returns the current result as a JSON string mapping column names to values.
final
Dart_ExecuteCallback → void Function(Pointer<Work>)
final
Dart_Free → _dart_Dart_Free
final
FLArray_AsMutable → _dart_FLArray_AsMutable
final
FLArray_Count → _dart_FLArray_Count
final
FLArray_Get → _dart_FLArray_Get
final
FLArray_IsEmpty → _dart_FLArray_IsEmpty
final
FLArray_MutableCopy → _dart_FLArray_MutableCopy
final
FLArrayIterator_Begin → _dart_FLArrayIterator_Begin
final
FLArrayIterator_GetValue → _dart_FLArrayIterator_GetValue
final
FLArrayIterator_New → _dart_FLArrayIterator_New
final
FLArrayIterator_Next → _dart_FLArrayIterator_Next
final
FLDict_AsMutable → _dart_FLDict_AsMutable
final
FLDict_Count → _dart_FLDict_Count
final
FLDict_Get → _dart_FLDict_Get
final
FLDict_IsEmpty → _dart_FLDict_IsEmpty
final
FLDict_MutableCopy → _dart_FLDict_MutableCopy
final
FLDictIterator_Begin → _dart_FLDictIterator_Begin
final
FLDictIterator_GetKey → _dart_FLDictIterator_GetKey
final
FLDictIterator_GetKeyString → _dart_FLDictIterator_GetKeyString
final
FLDictIterator_GetValue → _dart_FLDictIterator_GetValue
final
FLDictIterator_New → _dart_FLDictIterator_New
final
FLDictIterator_Next → _dart_FLDictIterator_Next
final
FLDoc_FromJSON → _dart_FLDoc_FromJSON
final
FLDoc_GetRoot → _dart_FLDoc_GetRoot
final
FLDoc_Release → _dart_FLDoc_Release
final
FLDoc_Retain → _dart_FLDoc_Retain
final
FLDump → _dart_FLDump
final
FLKeyPath_Eval → _dart_FLKeyPath_Eval
final
FLKeyPath_EvalOnce → _dart_FLKeyPath_EvalOnce
final
FLKeyPath_New → _dart_FLKeyPath_New
final
FLMutableArray_Append → _dart_FLMutableArray_Append
final
FLMutableArray_IsChanged → _dart_FLMutableArray_IsChanged
final
FLMutableArray_New → _dart_FLMutableArray_New
final
FLMutableArray_Remove → _dart_FLMutableArray_Remove
final
FLMutableArray_Set → _dart_FLMutableArray_Set
final
FLMutableDict_IsChanged → _dart_FLMutableDict_IsChanged
final
FLMutableDict_New → _dart_FLMutableDict_New
final
FLMutableDict_Remove → _dart_FLMutableDict_Remove
final
FLMutableDict_RemoveAll → _dart_FLMutableDict_RemoveAll
final
FLMutableDict_Set → _dart_FLMutableDict_Set
final
FLSlot_SetBool → _dart_FLSlot_SetBool
final
FLSlot_SetDouble → _dart_FLSlot_SetDouble
final
FLSlot_SetFloat → _dart_FLSlot_SetFloat
final
FLSlot_SetInt → _dart_FLSlot_SetInt
final
FLSlot_SetNull → _dart_FLSlot_SetNull
final
FLSlot_SetString → _dart_FLSlot_SetString
final
FLSlot_SetUInt → _dart_FLSlot_SetUInt
final
FLSlot_SetValue → _dart_FLSlot_SetValue
final
FLValue_AsArray → _dart_FLValue_AsArray
final
FLValue_AsBool → _dart_FLValue_AsBool
final
FLValue_AsDict → _dart_FLValue_AsDict
final
FLValue_AsDouble → _dart_FLValue_AsDouble
final
FLValue_AsFloat → _dart_FLValue_AsFloat
final
FLValue_AsInt → _dart_FLValue_AsInt
final
FLValue_AsString → _dart_FLValue_AsString_p
final
FLValue_AsUnsigned → _dart_FLValue_AsUnsigned
final
FLValue_FromJSON → _dart_FLValue_FromJSON
final
FLValue_GetType → _dart_FLValue_GetType
final
FLValue_IsDouble → _dart_FLValue_IsDouble
final
FLValue_IsEqual → _dart_FLValue_IsEqual
final
FLValue_IsInteger → _dart_FLValue_IsInteger
final
FLValue_IsUnsigned → _dart_FLValue_IsUnsigned
final
FLValue_Release → _dart_FLValue_Release
final
FLValue_Retain → _dart_FLValue_Retain
final
FLValue_ToString → _dart_FLValue_ToString
final
packagePath → String
final
registerDart_CloseNativePort → void Function(Pointer<NativeFunction<Int8 Function(Int64)>> functionPointer)
final
registerDart_NewNativePort → void Function(Pointer<NativeFunction<Int64 Function(Pointer<Uint8>, Pointer<NativeFunction<Dart_NativeMessageHandler>>, Int8)>> functionPointer)
final
registerDart_PostCObject → void Function(Pointer<NativeFunction<Int8 Function(Int64, Pointer<Dart_CObject>)>> functionPointer)
final
RegisterDartPorts → _dart_RegisterDartPorts
Returns a message describing an error. [...]
final
registerDartPrint → void Function(Pointer<NativeType>)
final
registerSendPort → void Function(int sendPort)
final
winLibPath → String
final
wrappedPrintPointer → Pointer<NativeFunction<_dart_Print>>
final

Functions

findPackagePath(String currentPath, {bool windows}) → String
Find our package path in the current project
strToUtf8(String str) → Pointer<Int8>
toFilePath(String parent, String path, {bool windows}) → String
Build a file path.
utf8ToStr(Pointer<Int8> p) → String
wrappedPrint(Pointer<Utf8> arg) → void

Enums

CBLErrorCode
Couchbase Lite error codes, in the CBLDomain. */
CBLErrorDomain
Error domains, serving as namespaces for numeric error codes. */
CBLIndexType
Types of database indexes.
CBLNetworkErrorCode
Network error codes, in the CBLNetworkDomain.
FLCopyFlags
FLTrust

Typedefs

CBLDatabaseChangeListener(Pointer<Void>, Pointer<CBLDatabase>, Uint32, Pointer<Pointer<Int8>>) → Void
CBLDocumentChangeListener(Pointer<Void>, Pointer<CBLDatabase>, Pointer<Int8>) → Void
CBLNotificationsReadyCallback(Pointer<Void>, Pointer<CBLDatabase>) → Void
CBLSaveConflictHandler(Pointer<Void>, Pointer<CBLDocument>, Pointer<CBLDocument>) → Int8
ConflictCallback(Pointer<Int8> replicatorId, Pointer<Int8> documentId, Pointer<CBLDocument> localDOcument, Pointer<CBLDocument> remoteDocument) → Pointer<CBLDocument>
FilterCallback(Int8, Pointer<Int8> replicatorId, Pointer<CBLDocument>, Int8) → Int8
StatusCallback(Pointer<Int8> replicatorId, Pointer<FLDict>) → Void