couchbase 4.2.11-rc.1 → 4.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (83) hide show
  1. package/deps/couchbase-cxx-cache/mozilla-ca-bundle.crt +49 -2
  2. package/deps/couchbase-cxx-cache/mozilla-ca-bundle.sha256 +1 -1
  3. package/deps/couchbase-cxx-client/CMakeLists.txt +1 -0
  4. package/deps/couchbase-cxx-client/cmake/ThirdPartyDependencies.cmake +2 -0
  5. package/deps/couchbase-cxx-client/core/bucket.cxx +2 -2
  6. package/deps/couchbase-cxx-client/core/impl/cluster.cxx +51 -5
  7. package/deps/couchbase-cxx-client/core/impl/collection.cxx +224 -209
  8. package/deps/couchbase-cxx-client/core/impl/query_error_context.cxx +2 -2
  9. package/deps/couchbase-cxx-client/core/impl/query_index_manager.cxx +1 -0
  10. package/deps/couchbase-cxx-client/core/io/dns_client.cxx +4 -0
  11. package/deps/couchbase-cxx-client/core/io/dns_config.cxx +15 -4
  12. package/deps/couchbase-cxx-client/core/io/dns_config.hxx +1 -1
  13. package/deps/couchbase-cxx-client/core/io/mcbp_session.cxx +95 -53
  14. package/deps/couchbase-cxx-client/core/io/mcbp_session.hxx +1 -0
  15. package/deps/couchbase-cxx-client/core/mcbp/operation_queue.cxx +1 -0
  16. package/deps/couchbase-cxx-client/core/meta/features.hxx +5 -0
  17. package/deps/couchbase-cxx-client/core/operations/document_lookup_in_all_replicas.hxx +116 -105
  18. package/deps/couchbase-cxx-client/core/operations/document_lookup_in_any_replica.hxx +116 -108
  19. package/deps/couchbase-cxx-client/core/operations/document_search.cxx +97 -81
  20. package/deps/couchbase-cxx-client/core/operations/document_search.hxx +5 -0
  21. package/deps/couchbase-cxx-client/core/range_scan_load_balancer.cxx +141 -0
  22. package/deps/couchbase-cxx-client/core/range_scan_load_balancer.hxx +64 -0
  23. package/deps/couchbase-cxx-client/core/range_scan_orchestrator.cxx +224 -336
  24. package/deps/couchbase-cxx-client/core/range_scan_orchestrator.hxx +5 -6
  25. package/deps/couchbase-cxx-client/core/range_scan_orchestrator_options.hxx +8 -5
  26. package/deps/couchbase-cxx-client/core/scan_result.hxx +1 -11
  27. package/deps/couchbase-cxx-client/core/transactions/atr_cleanup_entry.cxx +16 -7
  28. package/deps/couchbase-cxx-client/core/transactions/attempt_context_impl.cxx +578 -483
  29. package/deps/couchbase-cxx-client/core/transactions/attempt_context_testing_hooks.cxx +51 -50
  30. package/deps/couchbase-cxx-client/core/transactions/attempt_context_testing_hooks.hxx +4 -2
  31. package/deps/couchbase-cxx-client/core/transactions/cleanup_testing_hooks.cxx +6 -6
  32. package/deps/couchbase-cxx-client/core/transactions/cleanup_testing_hooks.hxx +3 -2
  33. package/deps/couchbase-cxx-client/core/transactions/internal/transactions_cleanup.hxx +2 -0
  34. package/deps/couchbase-cxx-client/core/transactions/internal/utils.hxx +5 -1
  35. package/deps/couchbase-cxx-client/core/transactions/staged_mutation.cxx +222 -179
  36. package/deps/couchbase-cxx-client/core/transactions/staged_mutation.hxx +23 -12
  37. package/deps/couchbase-cxx-client/core/transactions/transactions.cxx +61 -24
  38. package/deps/couchbase-cxx-client/core/transactions/transactions_cleanup.cxx +36 -16
  39. package/deps/couchbase-cxx-client/core/transactions/utils.cxx +9 -0
  40. package/deps/couchbase-cxx-client/core/transactions.hxx +40 -7
  41. package/deps/couchbase-cxx-client/couchbase/bucket.hxx +2 -2
  42. package/deps/couchbase-cxx-client/couchbase/cluster.hxx +20 -1
  43. package/deps/couchbase-cxx-client/couchbase/collection.hxx +1 -0
  44. package/deps/couchbase-cxx-client/couchbase/collection_query_index_manager.hxx +1 -1
  45. package/deps/couchbase-cxx-client/couchbase/error_context.hxx +1 -0
  46. package/deps/couchbase-cxx-client/couchbase/fork_event.hxx +39 -0
  47. package/deps/couchbase-cxx-client/couchbase/get_links_analytics_options.hxx +2 -2
  48. package/deps/couchbase-cxx-client/couchbase/scope.hxx +1 -1
  49. package/deps/couchbase-cxx-client/couchbase/search_options.hxx +2 -2
  50. package/deps/couchbase-cxx-client/couchbase/search_result.hxx +1 -1
  51. package/deps/couchbase-cxx-client/couchbase/subdocument_error_context.hxx +1 -0
  52. package/deps/couchbase-cxx-client/couchbase/transactions/transaction_options.hxx +1 -1
  53. package/deps/couchbase-cxx-client/couchbase-sdk-cxx-black-duck-manifest.yaml +1 -0
  54. package/dist/binding.d.ts +8 -0
  55. package/dist/bindingutilities.d.ts +6 -1
  56. package/dist/bindingutilities.js +15 -1
  57. package/dist/bucketmanager.d.ts +0 -12
  58. package/dist/cluster.d.ts +0 -2
  59. package/dist/cluster.js +0 -2
  60. package/dist/collection.d.ts +3 -3
  61. package/dist/collection.js +3 -1
  62. package/dist/querytypes.d.ts +0 -2
  63. package/dist/rangeScan.d.ts +0 -8
  64. package/dist/rangeScan.js +0 -8
  65. package/dist/scope.d.ts +0 -5
  66. package/dist/scope.js +0 -5
  67. package/dist/scopesearchindexmanager.d.ts +0 -2
  68. package/dist/scopesearchindexmanager.js +0 -2
  69. package/dist/searchexecutor.js +3 -1
  70. package/dist/searchtypes.d.ts +16 -6
  71. package/dist/searchtypes.js +2 -6
  72. package/dist/transactions.d.ts +23 -0
  73. package/dist/transactions.js +16 -10
  74. package/dist/vectorsearch.d.ts +8 -8
  75. package/dist/vectorsearch.js +7 -7
  76. package/package.json +7 -7
  77. package/src/instance.cpp +11 -1
  78. package/src/instance.hpp +1 -0
  79. package/src/jstocbpp_autogen.hpp +8 -1
  80. package/src/jstocbpp_transactions.hpp +40 -3
  81. package/src/transactions.cpp +12 -1
  82. package/tools/gen-bindings-json.py +0 -1
  83. package/deps/couchbase-cxx-client/core/scan_options.hxx +0 -44
@@ -163,8 +163,6 @@ export interface IBucketSettings {
163
163
  */
164
164
  minimumDurabilityLevel?: DurabilityLevel | string;
165
165
  /**
166
- * Uncommitted: This API is subject to change in the future.
167
- *
168
166
  * Specifies the default history retention on all collections in this bucket.
169
167
  * Only available on Magma Buckets.
170
168
  *
@@ -172,14 +170,10 @@ export interface IBucketSettings {
172
170
  */
173
171
  historyRetentionCollectionDefault?: boolean;
174
172
  /**
175
- * Uncommitted: This API is subject to change in the future.
176
- *
177
173
  * Specifies the maximum history retention in bytes on all collections in this bucket.
178
174
  */
179
175
  historyRetentionBytes?: number;
180
176
  /**
181
- * Uncommitted: This API is subject to change in the future.
182
- *
183
177
  * Specifies the maximum duration in seconds to be covered by the change history that is written
184
178
  * to disk for all collections in this bucket.
185
179
  */
@@ -261,8 +255,6 @@ export declare class BucketSettings implements IBucketSettings {
261
255
  */
262
256
  minimumDurabilityLevel?: DurabilityLevel;
263
257
  /**
264
- * Uncommitted: This API is subject to change in the future.
265
- *
266
258
  * Specifies the default history retention on all collections in this bucket.
267
259
  * Only available on Magma Buckets.
268
260
  *
@@ -270,14 +262,10 @@ export declare class BucketSettings implements IBucketSettings {
270
262
  */
271
263
  historyRetentionCollectionDefault?: boolean;
272
264
  /**
273
- * Uncommitted: This API is subject to change in the future.
274
- *
275
265
  * Specifies the maximum history retention in bytes on all collections in this bucket.
276
266
  */
277
267
  historyRetentionBytes?: number;
278
268
  /**
279
- * Uncommitted: This API is subject to change in the future.
280
- *
281
269
  * Specifies the maximum duration in seconds to be covered by the change history that is written
282
270
  * to disk for all collections in this bucket.
283
271
  */
package/dist/cluster.d.ts CHANGED
@@ -303,8 +303,6 @@ export declare class Cluster {
303
303
  /**
304
304
  * Executes a search query against the cluster.
305
305
  *
306
- * Volatile: This API is subject to change at any time.
307
- *
308
306
  * @param indexName The name of the index to query.
309
307
  * @param request The SearchRequest describing the search to execute.
310
308
  * @param options Optional parameters for this operation.
package/dist/cluster.js CHANGED
@@ -320,8 +320,6 @@ class Cluster {
320
320
  /**
321
321
  * Executes a search query against the cluster.
322
322
  *
323
- * Volatile: This API is subject to change at any time.
324
- *
325
323
  * @param indexName The name of the index to query.
326
324
  * @param request The SearchRequest describing the search to execute.
327
325
  * @param options Optional parameters for this operation.
@@ -345,8 +345,6 @@ export interface MutateInOptions {
345
345
  upsertDocument?: boolean;
346
346
  }
347
347
  /**
348
- * Volatile: This API is subject to change at any time.
349
- *
350
348
  * @category Key-Value
351
349
  */
352
350
  export interface ScanOptions {
@@ -574,7 +572,9 @@ export declare class Collection {
574
572
  /**
575
573
  * Performs a key-value scan operation.
576
574
  *
577
- * Volatile: This API is subject to change at any time.
575
+ * Use this API for low concurrency batch queries where latency is not a critical as the system
576
+ * may have to scan a lot of documents to find the matching documents.
577
+ * For low latency range queries, it is recommended that you use SQL++ with the necessary indexes.
578
578
  *
579
579
  * @param scanType The type of scan to execute.
580
580
  * @param options Optional parameters for the scan operation.
@@ -876,7 +876,9 @@ class Collection {
876
876
  /**
877
877
  * Performs a key-value scan operation.
878
878
  *
879
- * Volatile: This API is subject to change at any time.
879
+ * Use this API for low concurrency batch queries where latency is not a critical as the system
880
+ * may have to scan a lot of documents to find the matching documents.
881
+ * For low latency range queries, it is recommended that you use SQL++ with the necessary indexes.
880
882
  *
881
883
  * @param scanType The type of scan to execute.
882
884
  * @param options Optional parameters for the scan operation.
@@ -281,8 +281,6 @@ export interface QueryOptions {
281
281
  */
282
282
  readOnly?: boolean;
283
283
  /**
284
- * Uncommitted: This API is subject to change in the future.
285
- *
286
284
  * Specifies whether the query engine should use replica nodes for kv fetches,
287
285
  * if the active node is down.
288
286
  */
@@ -1,8 +1,6 @@
1
1
  /**
2
2
  * Represents a search term for a RangeScan.
3
3
  *
4
- * Volatile: This API is subject to change at any time.
5
- *
6
4
  * @see {@link RangeScan}
7
5
  * @category Key-Value
8
6
  */
@@ -36,8 +34,6 @@ export interface ScanType {
36
34
  * A RangeScan performs a scan on a range of keys with the range specified through
37
35
  * a start and end ScanTerm.
38
36
  *
39
- * Volatile: This API is subject to change at any time.
40
- *
41
37
  * @category Key-Value
42
38
  */
43
39
  export declare class RangeScan implements ScanType {
@@ -62,8 +58,6 @@ export declare class RangeScan implements ScanType {
62
58
  * A SamplingScan performs a scan on a random sampling of keys with the sampling bounded by
63
59
  * a limit.
64
60
  *
65
- * Volatile: This API is subject to change at any time.
66
- *
67
61
  * @category Key-Value
68
62
  */
69
63
  export declare class SamplingScan implements ScanType {
@@ -87,8 +81,6 @@ export declare class SamplingScan implements ScanType {
87
81
  /**
88
82
  * A PrefixScan scan type selects every document whose ID starts with a certain prefix.
89
83
  *
90
- * Volatile: This API is subject to change at any time.
91
- *
92
84
  * @category key-value
93
85
  */
94
86
  export declare class PrefixScan implements ScanType {
package/dist/rangeScan.js CHANGED
@@ -4,8 +4,6 @@ exports.PrefixScan = exports.SamplingScan = exports.RangeScan = exports.ScanTerm
4
4
  /**
5
5
  * Represents a search term for a RangeScan.
6
6
  *
7
- * Volatile: This API is subject to change at any time.
8
- *
9
7
  * @see {@link RangeScan}
10
8
  * @category Key-Value
11
9
  */
@@ -23,8 +21,6 @@ exports.ScanTerm = ScanTerm;
23
21
  * A RangeScan performs a scan on a range of keys with the range specified through
24
22
  * a start and end ScanTerm.
25
23
  *
26
- * Volatile: This API is subject to change at any time.
27
- *
28
24
  * @category Key-Value
29
25
  */
30
26
  class RangeScan {
@@ -47,8 +43,6 @@ exports.RangeScan = RangeScan;
47
43
  * A SamplingScan performs a scan on a random sampling of keys with the sampling bounded by
48
44
  * a limit.
49
45
  *
50
- * Volatile: This API is subject to change at any time.
51
- *
52
46
  * @category Key-Value
53
47
  */
54
48
  class SamplingScan {
@@ -70,8 +64,6 @@ exports.SamplingScan = SamplingScan;
70
64
  /**
71
65
  * A PrefixScan scan type selects every document whose ID starts with a certain prefix.
72
66
  *
73
- * Volatile: This API is subject to change at any time.
74
- *
75
67
  * @category key-value
76
68
  */
77
69
  class PrefixScan {
package/dist/scope.d.ts CHANGED
@@ -56,9 +56,6 @@ export declare class Scope {
56
56
  /**
57
57
  * Returns a SearchIndexManager which can be used to manage the search
58
58
  * indexes of this scope.
59
- *
60
- * Volatile: This API is subject to change at any time.
61
- *
62
59
  */
63
60
  searchIndexes(): ScopeSearchIndexManager;
64
61
  /**
@@ -80,8 +77,6 @@ export declare class Scope {
80
77
  /**
81
78
  * Executes a search query against the scope.
82
79
  *
83
- * Volatile: This API is subject to change at any time.
84
- *
85
80
  * @param indexName The name of the index to query.
86
81
  * @param request The SearchRequest describing the search to execute.
87
82
  * @param options Optional parameters for this operation.
package/dist/scope.js CHANGED
@@ -69,9 +69,6 @@ class Scope {
69
69
  /**
70
70
  * Returns a SearchIndexManager which can be used to manage the search
71
71
  * indexes of this scope.
72
- *
73
- * Volatile: This API is subject to change at any time.
74
- *
75
72
  */
76
73
  searchIndexes() {
77
74
  return new scopesearchindexmanager_1.ScopeSearchIndexManager(this.cluster, this.bucket.name, this._name);
@@ -125,8 +122,6 @@ class Scope {
125
122
  /**
126
123
  * Executes a search query against the scope.
127
124
  *
128
- * Volatile: This API is subject to change at any time.
129
- *
130
125
  * @param indexName The name of the index to query.
131
126
  * @param request The SearchRequest describing the search to execute.
132
127
  * @param options Optional parameters for this operation.
@@ -5,8 +5,6 @@ import { GetSearchIndexOptions, GetAllSearchIndexesOptions, UpsertSearchIndexOpt
5
5
  * SearchIndexManager provides an interface for managing the
6
6
  * search indexes on the cluster.
7
7
  *
8
- * Volatile: This API is subject to change at any time.
9
- *
10
8
  * @category Management
11
9
  */
12
10
  export declare class ScopeSearchIndexManager {
@@ -8,8 +8,6 @@ const searchindexmanager_1 = require("./searchindexmanager");
8
8
  * SearchIndexManager provides an interface for managing the
9
9
  * search indexes on the cluster.
10
10
  *
11
- * Volatile: This API is subject to change at any time.
12
- *
13
11
  * @category Management
14
12
  */
15
13
  class ScopeSearchIndexManager {
@@ -67,9 +67,11 @@ class SearchExecutor {
67
67
  .map(([k, v]) => [k, JSON.stringify(v)]))
68
68
  : {},
69
69
  body_str: '',
70
+ show_request: options.showRequest || false,
71
+ log_request: options.logRequest || false,
72
+ log_response: options.logResponse || false,
70
73
  };
71
74
  if (query instanceof searchtypes_1.SearchRequest) {
72
- request.show_request = false;
73
75
  if (query.vectorSearch) {
74
76
  request.vector_search = JSON.stringify(query.vectorSearch.queries);
75
77
  if (query.vectorSearch.options &&
@@ -146,12 +146,24 @@ export interface SearchQueryOptions {
146
146
  * The timeout for this operation, represented in milliseconds.
147
147
  */
148
148
  timeout?: number;
149
+ /**
150
+ * Specifies that the search response should include the request JSON.
151
+ */
152
+ showRequest?: boolean;
153
+ /**
154
+ * Uncommitted: This API is subject to change in the future.
155
+ * Specifies that the search request should appear in the log.
156
+ */
157
+ logRequest?: boolean;
158
+ /**
159
+ * Uncommitted: This API is subject to change in the future.
160
+ * Specifies that the search response should appear in the log.
161
+ */
162
+ logResponse?: boolean;
149
163
  }
150
164
  /**
151
165
  * Represents a search query and/or vector search to execute via the Couchbase Full Text Search (FTS) service.
152
166
  *
153
- * Volatile: This API is subject to change at any time.
154
- *
155
167
  * @category Full Text Search
156
168
  */
157
169
  export declare class SearchRequest {
@@ -169,7 +181,7 @@ export declare class SearchRequest {
169
181
  /**
170
182
  * Adds a search query to the request if the request does not already have a search query.
171
183
  *
172
- * Volatile: This API is subject to change at any time.
184
+ * Uncommitted: This API is subject to change in the future.
173
185
  *
174
186
  * @param query A SearchQuery to add to the request.
175
187
  */
@@ -177,7 +189,7 @@ export declare class SearchRequest {
177
189
  /**
178
190
  * Adds a vector search to the request if the request does not already have a vector search.
179
191
  *
180
- * Volatile: This API is subject to change at any time.
192
+ * Uncommitted: This API is subject to change in the future.
181
193
  *
182
194
  * @param search A VectorSearch to add to the request.
183
195
  */
@@ -185,8 +197,6 @@ export declare class SearchRequest {
185
197
  /**
186
198
  * Creates a search request.
187
199
  *
188
- * Volatile: This API is subject to change at any time.
189
- *
190
200
  * @param query Either a SearchQuery or VectorSearch to add to the search request.
191
201
  */
192
202
  static create(query: SearchQuery | VectorSearch): SearchRequest;
@@ -73,8 +73,6 @@ var SearchScanConsistency;
73
73
  /**
74
74
  * Represents a search query and/or vector search to execute via the Couchbase Full Text Search (FTS) service.
75
75
  *
76
- * Volatile: This API is subject to change at any time.
77
- *
78
76
  * @category Full Text Search
79
77
  */
80
78
  class SearchRequest {
@@ -104,7 +102,7 @@ class SearchRequest {
104
102
  /**
105
103
  * Adds a search query to the request if the request does not already have a search query.
106
104
  *
107
- * Volatile: This API is subject to change at any time.
105
+ * Uncommitted: This API is subject to change in the future.
108
106
  *
109
107
  * @param query A SearchQuery to add to the request.
110
108
  */
@@ -121,7 +119,7 @@ class SearchRequest {
121
119
  /**
122
120
  * Adds a vector search to the request if the request does not already have a vector search.
123
121
  *
124
- * Volatile: This API is subject to change at any time.
122
+ * Uncommitted: This API is subject to change in the future.
125
123
  *
126
124
  * @param search A VectorSearch to add to the request.
127
125
  */
@@ -138,8 +136,6 @@ class SearchRequest {
138
136
  /**
139
137
  * Creates a search request.
140
138
  *
141
- * Volatile: This API is subject to change at any time.
142
- *
143
139
  * @param query Either a SearchQuery or VectorSearch to add to the search request.
144
140
  */
145
141
  static create(query) {
@@ -29,6 +29,25 @@ export declare class DocumentId {
29
29
  */
30
30
  key: string;
31
31
  }
32
+ /**
33
+ * Specifies the configuration options for a Transaction Keyspace.
34
+ *
35
+ * @category Transactions
36
+ */
37
+ export interface TransactionKeyspace {
38
+ /**
39
+ * The name of the bucket for the Keyspace.
40
+ */
41
+ bucket: string;
42
+ /**
43
+ * The name of the scope for the Keyspace.
44
+ */
45
+ scope?: string;
46
+ /**
47
+ * The name of the collection for the Keyspace.
48
+ */
49
+ collection?: string;
50
+ }
32
51
  /**
33
52
  * Specifies the configuration options for Transactions cleanup.
34
53
  *
@@ -87,6 +106,10 @@ export interface TransactionsConfig {
87
106
  * Specifies the configuration for the cleanup system.
88
107
  */
89
108
  cleanupConfig?: TransactionsCleanupConfig;
109
+ /**
110
+ * Specifies the Keyspace (bucket, scope & collection) for the transaction metadata.
111
+ */
112
+ metadataCollection?: TransactionKeyspace;
90
113
  }
91
114
  /**
92
115
  * Specifies the configuration options for a Transaction.
@@ -311,16 +311,22 @@ class Transactions {
311
311
  config.queryConfig = {};
312
312
  }
313
313
  const connImpl = cluster.conn;
314
- const txnsImpl = new binding_1.default.Transactions(connImpl, {
315
- durability_level: (0, bindingutilities_1.durabilityToCpp)(config.durabilityLevel),
316
- timeout: config.timeout,
317
- query_scan_consistency: (0, bindingutilities_1.queryScanConsistencyToCpp)(config.queryConfig.scanConsistency),
318
- cleanup_window: config.cleanupConfig.cleanupWindow,
319
- cleanup_lost_attempts: !config.cleanupConfig.disableLostAttemptCleanup,
320
- cleanup_client_attempts: !config.cleanupConfig.disableClientAttemptCleanup,
321
- });
322
- this._cluster = cluster;
323
- this._impl = txnsImpl;
314
+ try {
315
+ const txnsImpl = new binding_1.default.Transactions(connImpl, {
316
+ durability_level: (0, bindingutilities_1.durabilityToCpp)(config.durabilityLevel),
317
+ timeout: config.timeout,
318
+ query_scan_consistency: (0, bindingutilities_1.queryScanConsistencyToCpp)(config.queryConfig.scanConsistency),
319
+ cleanup_window: config.cleanupConfig.cleanupWindow,
320
+ cleanup_lost_attempts: !config.cleanupConfig.disableLostAttemptCleanup,
321
+ cleanup_client_attempts: !config.cleanupConfig.disableClientAttemptCleanup,
322
+ metadata_collection: (0, bindingutilities_1.transactionKeyspaceToCpp)(config.metadataCollection),
323
+ });
324
+ this._cluster = cluster;
325
+ this._impl = txnsImpl;
326
+ }
327
+ catch (err) {
328
+ throw (0, bindingutilities_1.errorFromCpp)(err);
329
+ }
324
330
  }
325
331
  /**
326
332
  @internal
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Specifies how multiple vector searches are combined.
3
3
  *
4
- * Volatile: This API is subject to change at any time.
4
+ * Uncommitted: This API is subject to change in the future.
5
5
  *
6
6
  * @category Full Text Search
7
7
  */
@@ -16,7 +16,7 @@ export declare enum VectorQueryCombination {
16
16
  OR = "or"
17
17
  }
18
18
  /**
19
- * Volatile: This API is subject to change at any time.
19
+ * Uncommitted: This API is subject to change in the future.
20
20
  *
21
21
  * @category Full Text Search
22
22
  */
@@ -29,7 +29,7 @@ export interface VectorSearchOptions {
29
29
  /**
30
30
  * Represents a vector query.
31
31
  *
32
- * Volatile: This API is subject to change at any time.
32
+ * Uncommitted: This API is subject to change in the future.
33
33
  *
34
34
  * @category Full Text Search
35
35
  */
@@ -46,7 +46,7 @@ export declare class VectorQuery {
46
46
  /**
47
47
  * Adds boost option to vector query.
48
48
  *
49
- * Volatile: This API is subject to change at any time.
49
+ * Uncommitted: This API is subject to change in the future.
50
50
  *
51
51
  * @param boost A floating point value.
52
52
  */
@@ -54,7 +54,7 @@ export declare class VectorQuery {
54
54
  /**
55
55
  * Adds numCandidates option to vector query. Value must be >= 1.
56
56
  *
57
- * Volatile: This API is subject to change at any time.
57
+ * Uncommitted: This API is subject to change in the future.
58
58
  *
59
59
  * @param numCandidates An integer value.
60
60
  */
@@ -62,7 +62,7 @@ export declare class VectorQuery {
62
62
  /**
63
63
  * Creates a vector query.
64
64
  *
65
- * Volatile: This API is subject to change at any time.
65
+ * Uncommitted: This API is subject to change in the future.
66
66
  *
67
67
  * @param fieldName The name of the field in the JSON document that holds the vector.
68
68
  * @param vector List of floating point values that represent the vector.
@@ -72,7 +72,7 @@ export declare class VectorQuery {
72
72
  /**
73
73
  * Represents a vector search.
74
74
  *
75
- * Volatile: This API is subject to change at any time.
75
+ * Uncommitted: This API is subject to change in the future.
76
76
  *
77
77
  * @category Full Text Search
78
78
  */
@@ -91,7 +91,7 @@ export declare class VectorSearch {
91
91
  /**
92
92
  * Creates a vector search.
93
93
  *
94
- * Volatile: This API is subject to change at any time.
94
+ * Uncommitted: This API is subject to change in the future.
95
95
  *
96
96
  * @param query A vectory query that should be a part of the vector search.
97
97
  */
@@ -5,7 +5,7 @@ const errors_1 = require("./errors");
5
5
  /**
6
6
  * Specifies how multiple vector searches are combined.
7
7
  *
8
- * Volatile: This API is subject to change at any time.
8
+ * Uncommitted: This API is subject to change in the future.
9
9
  *
10
10
  * @category Full Text Search
11
11
  */
@@ -23,7 +23,7 @@ var VectorQueryCombination;
23
23
  /**
24
24
  * Represents a vector query.
25
25
  *
26
- * Volatile: This API is subject to change at any time.
26
+ * Uncommitted: This API is subject to change in the future.
27
27
  *
28
28
  * @category Full Text Search
29
29
  */
@@ -53,7 +53,7 @@ class VectorQuery {
53
53
  /**
54
54
  * Adds boost option to vector query.
55
55
  *
56
- * Volatile: This API is subject to change at any time.
56
+ * Uncommitted: This API is subject to change in the future.
57
57
  *
58
58
  * @param boost A floating point value.
59
59
  */
@@ -64,7 +64,7 @@ class VectorQuery {
64
64
  /**
65
65
  * Adds numCandidates option to vector query. Value must be >= 1.
66
66
  *
67
- * Volatile: This API is subject to change at any time.
67
+ * Uncommitted: This API is subject to change in the future.
68
68
  *
69
69
  * @param numCandidates An integer value.
70
70
  */
@@ -78,7 +78,7 @@ class VectorQuery {
78
78
  /**
79
79
  * Creates a vector query.
80
80
  *
81
- * Volatile: This API is subject to change at any time.
81
+ * Uncommitted: This API is subject to change in the future.
82
82
  *
83
83
  * @param fieldName The name of the field in the JSON document that holds the vector.
84
84
  * @param vector List of floating point values that represent the vector.
@@ -91,7 +91,7 @@ exports.VectorQuery = VectorQuery;
91
91
  /**
92
92
  * Represents a vector search.
93
93
  *
94
- * Volatile: This API is subject to change at any time.
94
+ * Uncommitted: This API is subject to change in the future.
95
95
  *
96
96
  * @category Full Text Search
97
97
  */
@@ -121,7 +121,7 @@ class VectorSearch {
121
121
  /**
122
122
  * Creates a vector search.
123
123
  *
124
- * Volatile: This API is subject to change at any time.
124
+ * Uncommitted: This API is subject to change in the future.
125
125
  *
126
126
  * @param query A vectory query that should be a part of the vector search.
127
127
  */
package/package.json CHANGED
@@ -54,7 +54,7 @@
54
54
  "type": "git",
55
55
  "url": "http://github.com/couchbase/couchnode.git"
56
56
  },
57
- "version": "4.2.11-rc.1",
57
+ "version": "4.3.0",
58
58
  "config": {
59
59
  "native": false
60
60
  },
@@ -79,12 +79,12 @@
79
79
  ]
80
80
  },
81
81
  "optionalDependencies": {
82
- "@couchbase/couchbase-darwin-arm64-napi": "4.2.11-rc.1",
83
- "@couchbase/couchbase-darwin-x64-napi": "4.2.11-rc.1",
84
- "@couchbase/couchbase-linux-arm64-napi": "4.2.11-rc.1",
85
- "@couchbase/couchbase-linuxmusl-x64-napi": "4.2.11-rc.1",
86
- "@couchbase/couchbase-linux-x64-napi": "4.2.11-rc.1",
87
- "@couchbase/couchbase-win32-x64-napi": "4.2.11-rc.1"
82
+ "@couchbase/couchbase-darwin-arm64-napi": "4.3.0",
83
+ "@couchbase/couchbase-darwin-x64-napi": "4.3.0",
84
+ "@couchbase/couchbase-linux-arm64-napi": "4.3.0",
85
+ "@couchbase/couchbase-linuxmusl-x64-napi": "4.3.0",
86
+ "@couchbase/couchbase-linux-x64-napi": "4.3.0",
87
+ "@couchbase/couchbase-win32-x64-napi": "4.3.0"
88
88
  },
89
89
  "files": [
90
90
  "LICENSE",
package/src/instance.cpp CHANGED
@@ -6,7 +6,17 @@ namespace couchnode
6
6
  Instance::Instance()
7
7
  : _cluster(couchbase::core::cluster(_io))
8
8
  {
9
- _ioThread = std::thread([this]() { _io.run(); });
9
+ _ioThread = std::thread([this]() {
10
+ try {
11
+ _io.run();
12
+ } catch (const std::exception &e) {
13
+ CB_LOG_ERROR(e.what());
14
+ throw;
15
+ } catch (...) {
16
+ CB_LOG_ERROR("Unknown exception");
17
+ throw;
18
+ }
19
+ });
10
20
  }
11
21
 
12
22
  Instance::~Instance()
package/src/instance.hpp CHANGED
@@ -1,6 +1,7 @@
1
1
  #pragma once
2
2
  #include <asio/io_context.hpp>
3
3
  #include <core/cluster.hxx>
4
+ #include <core/logger/logger.hxx>
4
5
  #include <memory>
5
6
  #include <thread>
6
7
 
@@ -19,7 +19,6 @@
19
19
  #include <core/operations/management/user.hxx>
20
20
  #include <core/operations/management/view.hxx>
21
21
  #include <core/range_scan_orchestrator_options.hxx>
22
- #include <core/scan_options.hxx>
23
22
 
24
23
  namespace couchnode
25
24
  {
@@ -3917,6 +3916,10 @@ struct js_to_cbpp_t<couchbase::core::operations::search_request> {
3917
3916
  jsObj.Get("client_context_id"));
3918
3917
  js_to_cbpp<std::optional<std::chrono::milliseconds>>(
3919
3918
  cppObj.timeout, jsObj.Get("timeout"));
3919
+ js_to_cbpp<std::optional<bool>>(cppObj.log_request,
3920
+ jsObj.Get("log_request"));
3921
+ js_to_cbpp<std::optional<bool>>(cppObj.log_response,
3922
+ jsObj.Get("log_response"));
3920
3923
  js_to_cbpp<std::string>(cppObj.body_str, jsObj.Get("body_str"));
3921
3924
  // parent_span
3922
3925
  return cppObj;
@@ -3985,6 +3988,10 @@ struct js_to_cbpp_t<couchbase::core::operations::search_request> {
3985
3988
  resObj.Set("timeout",
3986
3989
  cbpp_to_js<std::optional<std::chrono::milliseconds>>(
3987
3990
  env, cppObj.timeout));
3991
+ resObj.Set("log_request",
3992
+ cbpp_to_js<std::optional<bool>>(env, cppObj.log_request));
3993
+ resObj.Set("log_response",
3994
+ cbpp_to_js<std::optional<bool>>(env, cppObj.log_response));
3988
3995
  resObj.Set("body_str", cbpp_to_js<std::string>(env, cppObj.body_str));
3989
3996
  // parent_span
3990
3997
  return resObj;