Skip to content

Commit f78b0e2

Browse files
committed
iOS
1 parent 8a81078 commit f78b0e2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+1635
-475
lines changed

libcblite-3.0.3/lib/.DS_Store

0 Bytes
Binary file not shown.

libcblite-3.0.3/lib/ios/CouchbaseLite.xcframework/Info.plist

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,32 +8,32 @@
88
<key>DebugSymbolsPath</key>
99
<string>dSYMs</string>
1010
<key>LibraryIdentifier</key>
11-
<string>ios-arm64_x86_64-simulator</string>
11+
<string>ios-arm64</string>
1212
<key>LibraryPath</key>
1313
<string>CouchbaseLite.framework</string>
1414
<key>SupportedArchitectures</key>
1515
<array>
1616
<string>arm64</string>
17-
<string>x86_64</string>
1817
</array>
1918
<key>SupportedPlatform</key>
2019
<string>ios</string>
21-
<key>SupportedPlatformVariant</key>
22-
<string>simulator</string>
2320
</dict>
2421
<dict>
2522
<key>DebugSymbolsPath</key>
2623
<string>dSYMs</string>
2724
<key>LibraryIdentifier</key>
28-
<string>ios-arm64</string>
25+
<string>ios-arm64_x86_64-simulator</string>
2926
<key>LibraryPath</key>
3027
<string>CouchbaseLite.framework</string>
3128
<key>SupportedArchitectures</key>
3229
<array>
3330
<string>arm64</string>
31+
<string>x86_64</string>
3432
</array>
3533
<key>SupportedPlatform</key>
3634
<string>ios</string>
35+
<key>SupportedPlatformVariant</key>
36+
<string>simulator</string>
3737
</dict>
3838
</array>
3939
<key>CFBundlePackageType</key>

libcblite-3.0.3/lib/ios/CouchbaseLite.xcframework/ios-arm64/CouchbaseLite.framework/Headers/CBLBase.h

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ typedef struct CBLDocument CBLDocument;
209209
typedef struct CBLBlob CBLBlob;
210210
/** @} */
211211

212-
/** \defgroup queries Queries
212+
/** \defgroup query Query
213213
@{ */
214214
/** A compiled database query. */
215215
typedef struct CBLQuery CBLQuery;
@@ -218,6 +218,16 @@ typedef struct CBLQuery CBLQuery;
218218
typedef struct CBLResultSet CBLResultSet;
219219
/** @} */
220220

221+
/** \defgroup index Index
222+
@{ */
223+
/** A query index. */
224+
typedef struct CBLQueryIndex CBLQueryIndex;
225+
226+
#ifdef COUCHBASE_ENTERPRISE
227+
typedef struct CBLIndexUpdater CBLIndexUpdater;
228+
#endif
229+
/** @} */
230+
221231
/** \defgroup replication Replication
222232
@{ */
223233
/** A background task that syncs a \ref CBLDatabase with a remote server or peer. */

libcblite-3.0.3/lib/ios/CouchbaseLite.xcframework/ios-arm64/CouchbaseLite.framework/Headers/CBLCollection.h

Lines changed: 55 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
#pragma once
2020
#include <CouchbaseLite/CBLBase.h>
2121
#include <CouchbaseLite/CBLDocument.h>
22-
#include <CouchbaseLite/CBLQuery.h>
22+
#include <CouchbaseLite/CBLQueryIndexTypes.h>
23+
#include <CouchbaseLite/CBLQueryTypes.h>
2324

2425
CBL_CAPI_BEGIN
2526

@@ -154,12 +155,10 @@ CBLScope* CBLDatabase_DefaultScope(const CBLDatabase* db,
154155
CBLError* _cbl_nullable outError) CBLAPI;
155156

156157
/** Returns the default collection.
157-
@note The default collection may not exist if it was deleted.
158-
Also, the default collection cannot be recreated after being deleted.
159158
@note You are responsible for releasing the returned collection.
160159
@param db The database.
161160
@param outError On failure, the error will be written here.
162-
@return A \ref CBLCollection instance, or NULL if the default collection doesn't exist or an error occurred. */
161+
@return A \ref CBLCollection instance, or NULL if an error occurred. */
163162
CBLCollection* _cbl_nullable CBLDatabase_DefaultCollection(const CBLDatabase* db,
164163
CBLError* _cbl_nullable outError) CBLAPI;
165164

@@ -170,17 +169,28 @@ CBLCollection* _cbl_nullable CBLDatabase_DefaultCollection(const CBLDatabase* db
170169
Getting information about a collection.
171170
*/
172171

173-
/** Returns the scope of the collection.
172+
/** Returns the collection's scope.
174173
@note You are responsible for releasing the returned scope.
175174
@param collection The collection.
176-
@return A \ref CBLScope instance. */
175+
@return The scope of the collection. */
177176
CBLScope* CBLCollection_Scope(const CBLCollection* collection) CBLAPI;
178177

179-
/** Returns the collection name.
178+
/** Returns the collection's name.
180179
@param collection The collection.
181180
@return The name of the collection. */
182181
FLString CBLCollection_Name(const CBLCollection* collection) CBLAPI;
183182

183+
/** Returns the collection's fully qualified name in the '<scope-name>.<collection-name>' format.
184+
@param collection The collection.
185+
@return The fully qualified name of the collection. */
186+
FLString CBLCollection_FullName(const CBLCollection* collection) CBLAPI;
187+
188+
/** Returns the collection's database.
189+
@note The database object is owned by the collection object; you do not need to release it.
190+
@param collection The collection.
191+
@return The database of the collection. */
192+
CBLDatabase* CBLCollection_Database(const CBLCollection* collection) CBLAPI;
193+
184194
/** Returns the number of documents in the collection.
185195
@param collection The collection.
186196
@return the number of documents in the collection. */
@@ -371,6 +381,33 @@ bool CBLCollection_CreateFullTextIndex(CBLCollection *collection,
371381
CBLFullTextIndexConfiguration config,
372382
CBLError* _cbl_nullable outError) CBLAPI;
373383

384+
/** Creates an array index for use with UNNEST queries in the collection.
385+
If an identical index with that name already exists, nothing happens (and no error is returned.)
386+
If a non-identical index with that name already exists, it is deleted and re-created.
387+
@param collection The collection.
388+
@param name The name of the index.
389+
@param config The index configuration.
390+
@param outError On failure, an error is written here.
391+
@return True on success, false on failure. */
392+
bool CBLCollection_CreateArrayIndex(CBLCollection *collection,
393+
FLString name,
394+
CBLArrayIndexConfiguration config,
395+
CBLError* _cbl_nullable outError) CBLAPI;
396+
397+
#ifdef COUCHBASE_ENTERPRISE
398+
/** ENTERPRISE EDITION ONLY
399+
400+
Creatres a vector index in the collection.
401+
If an identical index with that name already exists, nothing happens (and no error is returned.)
402+
If a non-identical index with that name already exists, it is deleted and re-created.
403+
*/
404+
bool CBLCollection_CreateVectorIndex(CBLCollection *collection,
405+
FLString name,
406+
CBLVectorIndexConfiguration config,
407+
CBLError* _cbl_nullable outError) CBLAPI;
408+
409+
#endif
410+
374411
/** Deletes an index in the collection by name.
375412
@param collection The collection.
376413
@param name The name of the index.
@@ -389,6 +426,17 @@ _cbl_warn_unused
389426
FLMutableArray _cbl_nullable CBLCollection_GetIndexNames(CBLCollection *collection,
390427
CBLError* _cbl_nullable outError) CBLAPI;
391428

429+
/** Returns an index object representing an existing index in the collection.
430+
@note You are responsible for releasing the returned index object.
431+
@param collection The collection.
432+
@param name The name of the index.
433+
@param outError On failure, an error is written here.
434+
@return A \ref CBLQueryIndex instance if the index exists, or NULL if the index doesn't exist or an error occurred. */
435+
_cbl_warn_unused
436+
CBLQueryIndex* _cbl_nullable CBLCollection_GetIndex(CBLCollection* collection,
437+
FLString name,
438+
CBLError* _cbl_nullable outError) CBLAPI;
439+
392440
/** @} */
393441

394442
/** \name Change Listeners

libcblite-3.0.3/lib/ios/CouchbaseLite.xcframework/ios-arm64/CouchbaseLite.framework/Headers/CBLDatabase.h

Lines changed: 70 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
#pragma once
2020
#include <CouchbaseLite/CBLBase.h>
21+
#include <CouchbaseLite/CBLQueryIndexTypes.h>
2122

2223
CBL_CAPI_BEGIN
2324

@@ -26,6 +27,29 @@ CBL_CAPI_BEGIN
2627
A \ref CBLDatabase is both a filesystem object and a container for documents.
2728
*/
2829

30+
#ifdef COUCHBASE_ENTERPRISE
31+
32+
#ifdef __APPLE__
33+
#pragma mark - Database Extension
34+
#endif
35+
36+
/** \name Database Extension
37+
@{ */
38+
39+
/** ENTERPRISE EDITION ONLY
40+
41+
Enables Vector Search extension by specifying the extension path to search for the Vector Search extension library.
42+
This function must be called before opening a database that intends to use the vector search extension.
43+
@param path The file system path of the directory that contains the Vector Search extension library.
44+
@param outError On return, will be set to the error that occurred.
45+
@return True on success, false if there was an error.
46+
@note Must be called before opening a database that intends to use the vector search extension. */
47+
bool CBL_EnableVectorSearch(FLString path, CBLError* _cbl_nullable outError) CBLAPI;
48+
49+
/** @} */
50+
51+
#endif
52+
2953
#ifdef __APPLE__
3054
#pragma mark - CONFIGURATION
3155
#endif
@@ -68,6 +92,13 @@ typedef struct {
6892
power failure will not cause the loss of any data. FULL synchronous
6993
is very safe but it is also dramatically slower. */
7094
bool fullSync;
95+
96+
/**
97+
Disable memory-mapped I/O. By default, memory-mapped I/O is enabled.
98+
Disabling it may affect database performance. Typically, there is no need to modify this setting.
99+
@note Memory-mapped I/O is always disabled on macOS to prevent database corruption,
100+
so setting mmapDisabled value has no effect on the macOS platform. */
101+
bool mmapDisabled;
71102
} CBLDatabaseConfiguration;
72103

73104
/** Returns the default database configuration. */
@@ -219,7 +250,6 @@ bool CBLDatabase_PerformMaintenance(CBLDatabase* db,
219250

220251
/** @} */
221252

222-
223253
#ifdef __APPLE__
224254
#pragma mark - ACCESSORS
225255
#endif
@@ -244,6 +274,45 @@ const CBLDatabaseConfiguration CBLDatabase_Config(const CBLDatabase*) CBLAPI;
244274

245275
/** @} */
246276

277+
/** \name Query Indexes
278+
@{
279+
Query Index Management
280+
*/
281+
282+
/** Creates a value index.
283+
Indexes are persistent.
284+
If an identical index with that name already exists, nothing happens (and no error is returned.)
285+
If a non-identical index with that name already exists, it is deleted and re-created.
286+
@warning <b>Deprecated :</b> Use CBLCollection_CreateValueIndex on the default collection instead. */
287+
bool CBLDatabase_CreateValueIndex(CBLDatabase *db,
288+
FLString name,
289+
CBLValueIndexConfiguration config,
290+
CBLError* _cbl_nullable outError) CBLAPI;
291+
292+
/** Creates a full-text index.
293+
Indexes are persistent.
294+
If an identical index with that name already exists, nothing happens (and no error is returned.)
295+
If a non-identical index with that name already exists, it is deleted and re-created.
296+
@warning <b>Deprecated :</b> Use CBLCollection_CreateFullTextIndex on the default collection instead. */
297+
bool CBLDatabase_CreateFullTextIndex(CBLDatabase *db,
298+
FLString name,
299+
CBLFullTextIndexConfiguration config,
300+
CBLError* _cbl_nullable outError) CBLAPI;
301+
302+
/** Deletes an index given its name.
303+
@warning <b>Deprecated :</b> Use CBLCollection_DeleteIndex on the default collection instead. */
304+
bool CBLDatabase_DeleteIndex(CBLDatabase *db,
305+
FLString name,
306+
CBLError* _cbl_nullable outError) CBLAPI;
307+
308+
/** Returns the names of the indexes on this database, as a Fleece array of strings.
309+
@note You are responsible for releasing the returned Fleece array.
310+
@warning <b>Deprecated :</b> Use CBLCollection_GetIndexNames on the default collection instead. */
311+
_cbl_warn_unused
312+
FLArray CBLDatabase_GetIndexNames(CBLDatabase *db) CBLAPI;
313+
314+
315+
/** @} */
247316

248317
#ifdef __APPLE__
249318
#pragma mark - LISTENERS

libcblite-3.0.3/lib/ios/CouchbaseLite.xcframework/ios-arm64/CouchbaseLite.framework/Headers/CBLDefaults.h

Lines changed: 47 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// CBLDefaults.h
33
// CouchbaseLite
44
//
5-
// Copyright (c) 2023-present Couchbase, Inc All rights reserved.
5+
// Copyright (c) 2024-present Couchbase, Inc All rights reserved.
66
//
77
// Licensed under the Apache License, Version 2.0 (the "License");
88
// you may not use this file except in compliance with the License.
@@ -24,6 +24,7 @@
2424
#pragma once
2525
#include <CouchbaseLite/CBL_Compat.h>
2626
#include <CouchbaseLite/CBLReplicator.h>
27+
#include <CouchbaseLite/CBLQueryIndexTypes.h>
2728

2829
CBL_CAPI_BEGIN
2930

@@ -33,11 +34,27 @@ CBL_CAPI_BEGIN
3334
3435
Constants for default configuration values. */
3536

37+
/** \name CBLDatabaseConfiguration
38+
@{
39+
*/
40+
41+
/** [false] Full sync is off by default because the performance hit is seldom worth the benefit */
42+
CBL_PUBLIC extern const bool kCBLDefaultDatabaseFullSync;
43+
44+
/** [false] Memory mapped database files are enabled by default */
45+
CBL_PUBLIC extern const bool kCBLDefaultDatabaseMmapDisabled;
46+
47+
/** @} */
48+
3649
/** \name CBLLogFileConfiguration
3750
@{
3851
*/
3952

4053
/** [false] Plaintext is not used, and instead binary encoding is used in log files */
54+
CBL_PUBLIC extern const bool kCBLDefaultLogFileUsePlaintext;
55+
56+
/** [false] Plaintext is not used, and instead binary encoding is used in log files
57+
@warning <b>Deprecated :</b> Use kCBLDefaultLogFileUsePlaintext instead. */
4158
CBL_PUBLIC extern const bool kCBLDefaultLogFileUsePlainText;
4259

4360
/** [524288] 512 KiB for the size of a log file */
@@ -46,7 +63,6 @@ CBL_PUBLIC extern const size_t kCBLDefaultLogFileMaxSize;
4663
/** [1] 1 rotated file present (2 total, including the currently active log file) */
4764
CBL_PUBLIC extern const uint32_t kCBLDefaultLogFileMaxRotateCount;
4865

49-
5066
/** @} */
5167

5268
/** \name CBLFullTextIndexConfiguration
@@ -56,7 +72,6 @@ CBL_PUBLIC extern const uint32_t kCBLDefaultLogFileMaxRotateCount;
5672
/** [false] Accents and ligatures are not ignored when indexing via full text search */
5773
CBL_PUBLIC extern const bool kCBLDefaultFullTextIndexIgnoreAccents;
5874

59-
6075
/** @} */
6176

6277
/** \name CBLReplicatorConfiguration
@@ -79,6 +94,10 @@ CBL_PUBLIC extern const unsigned kCBLDefaultReplicatorMaxAttemptsSingleShot;
7994
CBL_PUBLIC extern const unsigned kCBLDefaultReplicatorMaxAttemptsContinuous;
8095

8196
/** [300] Max wait time between retry attempts in seconds */
97+
CBL_PUBLIC extern const unsigned kCBLDefaultReplicatorMaxAttemptsWaitTime;
98+
99+
/** [300] Max wait time between retry attempts in seconds
100+
@warning <b>Deprecated :</b> Use kCBLDefaultReplicatorMaxAttemptsWaitTime instead. */
82101
CBL_PUBLIC extern const unsigned kCBLDefaultReplicatorMaxAttemptWaitTime;
83102

84103
/** [false] Purge documents when a user loses access */
@@ -89,6 +108,31 @@ CBL_PUBLIC extern const bool kCBLDefaultReplicatorAcceptParentCookies;
89108

90109
/** @} */
91110

111+
#ifdef COUCHBASE_ENTERPRISE
112+
113+
/** \name CBLVectorIndexConfiguration
114+
@{
115+
*/
116+
117+
/** [false] Vectors are not lazily indexed, by default */
118+
CBL_PUBLIC extern const bool kCBLDefaultVectorIndexLazy;
119+
120+
/** [kCBLDistanceMetricEuclideanSquared] By default, vectors are compared using Squared Euclidean metric. */
121+
CBL_PUBLIC extern const CBLDistanceMetric kCBLDefaultVectorIndexDistanceMetric;
122+
123+
/** [0] By default, the value will be determined based on the number of centroids, encoding types, and the encoding parameters. */
124+
CBL_PUBLIC extern const unsigned kCBLDefaultVectorIndexMinTrainingSize;
125+
126+
/** [0] By default, the value will be determined based on the number of centroids, encoding types, and the encoding parameters */
127+
CBL_PUBLIC extern const unsigned kCBLDefaultVectorIndexMaxTrainingSize;
128+
129+
/** [0] By default, the value will be determined based on the number of centroids. */
130+
CBL_PUBLIC extern const unsigned kCBLDefaultVectorIndexNumProbes;
131+
132+
/** @} */
133+
134+
#endif
135+
92136
/** @} */
93137

94138
CBL_CAPI_END

libcblite-3.0.3/lib/ios/CouchbaseLite.xcframework/ios-arm64/CouchbaseLite.framework/Headers/CBLLog.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ typedef struct {
128128
size_t maxSize;
129129

130130
/** Whether or not to log in plaintext (as opposed to binary.) Plaintext logging is slower and bigger.
131-
The default is \ref kCBLDefaultLogFileUsePlainText. */
131+
The default is \ref kCBLDefaultLogFileUsePlaintext. */
132132
bool usePlaintext;
133133
} CBLLogFileConfiguration;
134134

0 commit comments

Comments
 (0)