|
Couchbase Lite C
Couchbase Lite C API
|
A CBLScope represents a scope or namespace of the collections. More...
Typedefs | |
| typedef struct CBLScope | CBLScope |
| A collection's scope. | |
Functions | |
| static const CBLScope * | CBLScope_Retain (const CBLScope *_cbl_nullable t) |
| static void | CBLScope_Release (const CBLScope *_cbl_nullable t) |
Default Scope Name | |
The default scope name constant. | |
| CBL_PUBLIC const FLString | kCBLDefaultScopeName |
| The default scope's name. | |
Scope Accessors | |
Getting information about a scope. | |
| FLString | CBLScope_Name (const CBLScope *scope) |
| Returns the name of the scope. | |
| CBLDatabase * | CBLScope_Database (const CBLScope *scope) |
| Returns the scope's database. | |
Collections | |
Accessing the collections under the scope. | |
| FLMutableArray _cbl_nullable | CBLScope_CollectionNames (const CBLScope *scope, CBLError *_cbl_nullable outError) |
| Returns the names of all collections in the scope. | |
| CBLCollection *_cbl_nullable | CBLScope_Collection (const CBLScope *scope, FLString collectionName, CBLError *_cbl_nullable outError) |
| Returns an existing collection in the scope with the given name. | |
A CBLScope represents a scope or namespace of the collections.
The scope implicitly exists when there is at least one collection created under the scope. The default scope is exceptional in that it will always exists even there are no collections under it.
CBLScope is ref-counted. Same as the CBLCollection, the CBLScope objects retrieved from the database must be released after you are done using them. When the database is closed or released, the scope objects will become invalid, most operations on the invalid CBLCollection object will fail with kCBLErrorNotOpen error result.
| CBLCollection *_cbl_nullable CBLScope_Collection | ( | const CBLScope * | scope, |
| FLString | collectionName, | ||
| CBLError *_cbl_nullable | outError ) |
Returns an existing collection in the scope with the given name.
| Scope | The scope. |
| collectionName | The name of the collection. |
| outError | On failure, the error will be written here. |
| FLMutableArray _cbl_nullable CBLScope_CollectionNames | ( | const CBLScope * | scope, |
| CBLError *_cbl_nullable | outError ) |
Returns the names of all collections in the scope.
| Scope | The scope. |
| outError | On failure, the error will be written here. |
| CBLDatabase * CBLScope_Database | ( | const CBLScope * | scope | ) |
Returns the scope's database.
| Scope | The scope. |
|
inlinestatic |
|
inlinestatic |
|
extern |
The default scope's name.