couchbase 4.2.10 → 4.2.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/deps/couchbase-cxx-client/CMakeLists.txt +1 -0
- package/deps/couchbase-cxx-client/cmake/ThirdPartyDependencies.cmake +2 -0
- package/deps/couchbase-cxx-client/core/bucket.cxx +25 -10
- package/deps/couchbase-cxx-client/core/bucket.hxx +1 -0
- package/deps/couchbase-cxx-client/core/cluster.cxx +29 -3
- package/deps/couchbase-cxx-client/core/impl/collection.cxx +2 -2
- package/deps/couchbase-cxx-client/core/impl/query_index_manager.cxx +6 -6
- package/deps/couchbase-cxx-client/core/io/http_session_manager.hxx +7 -1
- package/deps/couchbase-cxx-client/core/io/mcbp_command.hxx +10 -0
- package/deps/couchbase-cxx-client/core/io/mcbp_session.cxx +35 -1
- package/deps/couchbase-cxx-client/core/io/mcbp_session.hxx +2 -0
- package/deps/couchbase-cxx-client/core/management/design_document.hxx +1 -1
- package/deps/couchbase-cxx-client/core/meta/features.hxx +16 -1
- package/deps/couchbase-cxx-client/core/operations/document_lookup_in_all_replicas.hxx +1 -1
- package/deps/couchbase-cxx-client/core/operations/document_lookup_in_any_replica.hxx +1 -1
- package/deps/couchbase-cxx-client/core/operations/document_query.cxx +2 -2
- package/deps/couchbase-cxx-client/core/operations/document_search.cxx +10 -10
- package/deps/couchbase-cxx-client/core/operations/document_view.cxx +3 -0
- package/deps/couchbase-cxx-client/core/operations/document_view.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/query_index_create.cxx +24 -13
- package/deps/couchbase-cxx-client/core/operations/management/query_index_create.hxx +1 -1
- package/deps/couchbase-cxx-client/core/origin.cxx +14 -0
- package/deps/couchbase-cxx-client/core/origin.hxx +6 -0
- package/deps/couchbase-cxx-client/core/protocol/status.cxx +2 -0
- package/deps/couchbase-cxx-client/core/protocol/status.hxx +1 -0
- package/deps/couchbase-cxx-client/core/range_scan_load_balancer.cxx +141 -0
- package/deps/couchbase-cxx-client/core/range_scan_load_balancer.hxx +64 -0
- package/deps/couchbase-cxx-client/core/range_scan_orchestrator.cxx +224 -336
- package/deps/couchbase-cxx-client/core/range_scan_orchestrator.hxx +5 -6
- package/deps/couchbase-cxx-client/core/range_scan_orchestrator_options.hxx +6 -4
- package/deps/couchbase-cxx-client/core/scan_result.hxx +1 -11
- package/deps/couchbase-cxx-client/core/topology/capabilities.hxx +70 -1
- package/deps/couchbase-cxx-client/core/topology/capabilities_fmt.hxx +30 -2
- package/deps/couchbase-cxx-client/core/topology/configuration.hxx +1 -34
- package/deps/couchbase-cxx-client/core/topology/configuration_fmt.hxx +2 -2
- package/deps/couchbase-cxx-client/core/topology/configuration_json.hxx +43 -20
- package/deps/couchbase-cxx-client/core/transactions/internal/exceptions_internal.hxx +5 -0
- package/deps/couchbase-cxx-client/couchbase/bucket.hxx +2 -2
- package/deps/couchbase-cxx-client/couchbase/cluster.hxx +1 -1
- package/deps/couchbase-cxx-client/couchbase/collection.hxx +1 -0
- package/deps/couchbase-cxx-client/couchbase/collection_query_index_manager.hxx +80 -11
- package/deps/couchbase-cxx-client/couchbase/error_context.hxx +1 -0
- package/deps/couchbase-cxx-client/couchbase/fmt/key_value_status_code.hxx +3 -1
- package/deps/couchbase-cxx-client/couchbase/get_links_analytics_options.hxx +2 -2
- package/deps/couchbase-cxx-client/couchbase/key_value_status_code.hxx +1 -0
- package/deps/couchbase-cxx-client/couchbase/query_index_manager.hxx +6 -8
- package/deps/couchbase-cxx-client/couchbase/scope.hxx +1 -1
- package/deps/couchbase-cxx-client/couchbase/search_options.hxx +2 -2
- package/deps/couchbase-cxx-client/couchbase/search_result.hxx +1 -1
- package/deps/couchbase-cxx-client/couchbase/subdocument_error_context.hxx +1 -0
- package/deps/couchbase-cxx-client/couchbase/transactions/transaction_options.hxx +1 -1
- package/deps/couchbase-cxx-client/couchbase-sdk-cxx-black-duck-manifest.yaml +1 -0
- package/dist/binding.d.ts +24 -2
- package/dist/bindingutilities.d.ts +11 -3
- package/dist/bindingutilities.js +33 -7
- package/dist/couchbase.d.ts +1 -0
- package/dist/couchbase.js +1 -0
- package/dist/queryindexmanager.d.ts +4 -4
- package/dist/queryindexmanager.js +7 -7
- package/dist/scope.d.ts +21 -0
- package/dist/scope.js +34 -0
- package/dist/scopesearchindexmanager.d.ts +116 -0
- package/dist/scopesearchindexmanager.js +406 -0
- package/dist/sdspecs.js +10 -9
- package/dist/sdutils.d.ts +1 -0
- package/dist/sdutils.js +4 -0
- package/dist/searchexecutor.d.ts +3 -1
- package/dist/searchexecutor.js +9 -2
- package/dist/searchindexmanager.d.ts +58 -3
- package/dist/searchindexmanager.js +188 -104
- package/dist/viewexecutor.js +13 -9
- package/dist/viewindexmanager.d.ts +70 -7
- package/dist/viewindexmanager.js +236 -103
- package/dist/viewtypes.d.ts +26 -0
- package/dist/viewtypes.js +17 -1
- package/package.json +7 -7
- package/src/constants.cpp +1 -0
- package/src/jstocbpp_autogen.hpp +89 -7
- package/deps/couchbase-cxx-client/core/scan_options.hxx +0 -44
|
@@ -51,7 +51,6 @@ class query_index_manager
|
|
|
51
51
|
/**
|
|
52
52
|
* Get all indexes within a bucket.
|
|
53
53
|
*
|
|
54
|
-
*
|
|
55
54
|
* @param bucket_name specifies the bucket in which we look for the indexes
|
|
56
55
|
* @param options optional parameters
|
|
57
56
|
* @param handler the handler that implements @ref get_all_query_indexes_handler
|
|
@@ -66,7 +65,6 @@ class query_index_manager
|
|
|
66
65
|
/**
|
|
67
66
|
* Get all indexes within a bucket.
|
|
68
67
|
*
|
|
69
|
-
*
|
|
70
68
|
* @param bucket_name specifies the bucket in which we look for the indexes
|
|
71
69
|
* @param options optional parameters
|
|
72
70
|
* @return future object that carries result of the operation
|
|
@@ -82,7 +80,7 @@ class query_index_manager
|
|
|
82
80
|
*
|
|
83
81
|
* @param bucket_name specifies the bucket in which to create the index
|
|
84
82
|
* @param index_name name of the index
|
|
85
|
-
* @param
|
|
83
|
+
* @param keys the keys to create the index over
|
|
86
84
|
* @param options optional parameters
|
|
87
85
|
* @param handler the handler that implements @ref create_query_index_handler
|
|
88
86
|
*
|
|
@@ -91,7 +89,7 @@ class query_index_manager
|
|
|
91
89
|
*/
|
|
92
90
|
void create_index(std::string bucket_name,
|
|
93
91
|
std::string index_name,
|
|
94
|
-
std::vector<std::string>
|
|
92
|
+
std::vector<std::string> keys,
|
|
95
93
|
const create_query_index_options& options,
|
|
96
94
|
create_query_index_handler&& handler) const;
|
|
97
95
|
|
|
@@ -100,7 +98,7 @@ class query_index_manager
|
|
|
100
98
|
*
|
|
101
99
|
* @param bucket_name specifies the bucket in which to create the index
|
|
102
100
|
* @param index_name name of the index
|
|
103
|
-
* @param
|
|
101
|
+
* @param keys the keys to create the index over
|
|
104
102
|
* @param options optional parameters
|
|
105
103
|
* @return future object that carries result of the operation
|
|
106
104
|
*
|
|
@@ -109,7 +107,7 @@ class query_index_manager
|
|
|
109
107
|
*/
|
|
110
108
|
[[nodiscard]] auto create_index(std::string bucket_name,
|
|
111
109
|
std::string index_name,
|
|
112
|
-
std::vector<std::string>
|
|
110
|
+
std::vector<std::string> keys,
|
|
113
111
|
const create_query_index_options& options) const -> std::future<manager_error_context>;
|
|
114
112
|
|
|
115
113
|
/**
|
|
@@ -202,7 +200,7 @@ class query_index_manager
|
|
|
202
200
|
* By default, this method will build the indexes on the bucket.
|
|
203
201
|
*
|
|
204
202
|
* @param bucket_name name of the bucket
|
|
205
|
-
* @param options
|
|
203
|
+
* @param options optional parameters
|
|
206
204
|
* @param handler the handler that implements @ref build_deferred_query_indexes_handler
|
|
207
205
|
*
|
|
208
206
|
* @since 1.0.0
|
|
@@ -218,7 +216,7 @@ class query_index_manager
|
|
|
218
216
|
* By default, this method will build the indexes on the bucket.
|
|
219
217
|
*
|
|
220
218
|
* @param bucket_name name of the bucket
|
|
221
|
-
* @param options
|
|
219
|
+
* @param options optional parameters
|
|
222
220
|
* @return future object that carries result of the operation
|
|
223
221
|
*
|
|
224
222
|
* @since 1.0.0
|
|
@@ -151,7 +151,7 @@ class scope
|
|
|
151
151
|
* @since 1.0.0
|
|
152
152
|
* @volatile
|
|
153
153
|
*/
|
|
154
|
-
[[nodiscard]] auto search(std::string index_name, search_request request, const search_options& = {}) const
|
|
154
|
+
[[nodiscard]] auto search(std::string index_name, search_request request, const search_options& options = {}) const
|
|
155
155
|
-> std::future<std::pair<search_error_context, search_result>>;
|
|
156
156
|
|
|
157
157
|
/**
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
namespace couchbase
|
|
36
36
|
{
|
|
37
37
|
/**
|
|
38
|
-
* Options for cluster#search_query() and scope#
|
|
38
|
+
* Options for @ref cluster#search_query(), @ref cluster#search() and @ref scope#search().
|
|
39
39
|
*
|
|
40
40
|
* @since 1.0.0
|
|
41
41
|
* @committed
|
|
@@ -500,7 +500,7 @@ struct search_options : public common_options<search_options> {
|
|
|
500
500
|
};
|
|
501
501
|
|
|
502
502
|
/**
|
|
503
|
-
* The signature for the handler of the @ref cluster#search_query() and @ref scope#
|
|
503
|
+
* The signature for the handler of the @ref cluster#search_query(), @ref cluster#search() and @ref scope#search() operations
|
|
504
504
|
*
|
|
505
505
|
* @since 1.0.0
|
|
506
506
|
* @uncommitted
|
|
@@ -35,7 +35,7 @@ class internal_search_result;
|
|
|
35
35
|
#endif
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
|
-
* Represents result of @ref cluster#search_query() and @ref scope#
|
|
38
|
+
* Represents result of @ref cluster#search_query(), @ref cluster#search() and @ref scope#search() calls.
|
|
39
39
|
*
|
|
40
40
|
* @since 1.0.0
|
|
41
41
|
* @committed
|
|
@@ -78,7 +78,7 @@ class transaction_options
|
|
|
78
78
|
/**
|
|
79
79
|
* Set the timeout for this transaction.
|
|
80
80
|
*
|
|
81
|
-
* @tparam T timeout type, e.g.
|
|
81
|
+
* @tparam T timeout type, e.g. std::chrono::milliseconds, or similar
|
|
82
82
|
* @param timeout Desired timeout
|
|
83
83
|
* @return reference to this object, convenient for chaining operations.
|
|
84
84
|
*/
|
package/dist/binding.d.ts
CHANGED
|
@@ -208,7 +208,7 @@ export interface CppManagementClusterBucketSettingsNode {
|
|
|
208
208
|
};
|
|
209
209
|
}
|
|
210
210
|
export interface CppManagementViewsDesignDocument {
|
|
211
|
-
rev
|
|
211
|
+
rev?: string;
|
|
212
212
|
name: string;
|
|
213
213
|
ns: CppDesignDocumentNamespace;
|
|
214
214
|
views: {
|
|
@@ -860,6 +860,8 @@ export interface CppSearchResponseSearchFacetNumericRangeFacet {
|
|
|
860
860
|
export interface CppSearchRequest {
|
|
861
861
|
index_name: string;
|
|
862
862
|
query: CppJsonString;
|
|
863
|
+
bucket_name?: string;
|
|
864
|
+
scope_name?: string;
|
|
863
865
|
show_request?: boolean;
|
|
864
866
|
vector_search?: CppJsonString;
|
|
865
867
|
vector_query_combination?: CppVectorQueryCombination;
|
|
@@ -957,6 +959,7 @@ export interface CppDocumentViewRequest {
|
|
|
957
959
|
raw: {
|
|
958
960
|
[key: string]: string;
|
|
959
961
|
};
|
|
962
|
+
full_set?: boolean;
|
|
960
963
|
order?: CppViewSortOrder;
|
|
961
964
|
on_error?: CppViewOnError;
|
|
962
965
|
query_string: string[];
|
|
@@ -1201,6 +1204,8 @@ export interface CppManagementSearchIndexGetAllResponse {
|
|
|
1201
1204
|
indexes: CppManagementSearchIndex[];
|
|
1202
1205
|
}
|
|
1203
1206
|
export interface CppManagementSearchIndexGetAllRequest {
|
|
1207
|
+
bucket_name?: string;
|
|
1208
|
+
scope_name?: string;
|
|
1204
1209
|
client_context_id?: string;
|
|
1205
1210
|
timeout?: CppMilliseconds;
|
|
1206
1211
|
}
|
|
@@ -1212,6 +1217,8 @@ export interface CppManagementSearchIndexAnalyzeDocumentResponse {
|
|
|
1212
1217
|
export interface CppManagementSearchIndexAnalyzeDocumentRequest {
|
|
1213
1218
|
index_name: string;
|
|
1214
1219
|
encoded_document: string;
|
|
1220
|
+
bucket_name?: string;
|
|
1221
|
+
scope_name?: string;
|
|
1215
1222
|
client_context_id?: string;
|
|
1216
1223
|
timeout?: CppMilliseconds;
|
|
1217
1224
|
}
|
|
@@ -1279,7 +1286,7 @@ export interface CppManagementQueryIndexCreateRequest {
|
|
|
1279
1286
|
scope_name: string;
|
|
1280
1287
|
collection_name: string;
|
|
1281
1288
|
index_name: string;
|
|
1282
|
-
|
|
1289
|
+
keys: string[];
|
|
1283
1290
|
query_ctx: CppQueryContext;
|
|
1284
1291
|
is_primary: boolean;
|
|
1285
1292
|
ignore_if_exists: boolean;
|
|
@@ -1297,6 +1304,8 @@ export interface CppManagementSearchIndexUpsertResponse {
|
|
|
1297
1304
|
}
|
|
1298
1305
|
export interface CppManagementSearchIndexUpsertRequest {
|
|
1299
1306
|
index: CppManagementSearchIndex;
|
|
1307
|
+
bucket_name?: string;
|
|
1308
|
+
scope_name?: string;
|
|
1300
1309
|
client_context_id?: string;
|
|
1301
1310
|
timeout?: CppMilliseconds;
|
|
1302
1311
|
}
|
|
@@ -1619,6 +1628,8 @@ export interface CppManagementSearchIndexDropResponse {
|
|
|
1619
1628
|
}
|
|
1620
1629
|
export interface CppManagementSearchIndexDropRequest {
|
|
1621
1630
|
index_name: string;
|
|
1631
|
+
bucket_name?: string;
|
|
1632
|
+
scope_name?: string;
|
|
1622
1633
|
client_context_id?: string;
|
|
1623
1634
|
timeout?: CppMilliseconds;
|
|
1624
1635
|
}
|
|
@@ -1629,6 +1640,8 @@ export interface CppManagementSearchIndexControlPlanFreezeResponse {
|
|
|
1629
1640
|
export interface CppManagementSearchIndexControlPlanFreezeRequest {
|
|
1630
1641
|
index_name: string;
|
|
1631
1642
|
freeze: boolean;
|
|
1643
|
+
bucket_name?: string;
|
|
1644
|
+
scope_name?: string;
|
|
1632
1645
|
client_context_id?: string;
|
|
1633
1646
|
timeout?: CppMilliseconds;
|
|
1634
1647
|
}
|
|
@@ -1664,6 +1677,8 @@ export interface CppManagementSearchIndexControlQueryResponse {
|
|
|
1664
1677
|
export interface CppManagementSearchIndexControlQueryRequest {
|
|
1665
1678
|
index_name: string;
|
|
1666
1679
|
allow: boolean;
|
|
1680
|
+
bucket_name?: string;
|
|
1681
|
+
scope_name?: string;
|
|
1667
1682
|
client_context_id?: string;
|
|
1668
1683
|
timeout?: CppMilliseconds;
|
|
1669
1684
|
}
|
|
@@ -1718,6 +1733,8 @@ export interface CppManagementSearchIndexControlIngestResponse {
|
|
|
1718
1733
|
export interface CppManagementSearchIndexControlIngestRequest {
|
|
1719
1734
|
index_name: string;
|
|
1720
1735
|
pause: boolean;
|
|
1736
|
+
bucket_name?: string;
|
|
1737
|
+
scope_name?: string;
|
|
1721
1738
|
client_context_id?: string;
|
|
1722
1739
|
timeout?: CppMilliseconds;
|
|
1723
1740
|
}
|
|
@@ -1780,6 +1797,8 @@ export interface CppManagementSearchIndexGetResponse {
|
|
|
1780
1797
|
}
|
|
1781
1798
|
export interface CppManagementSearchIndexGetRequest {
|
|
1782
1799
|
index_name: string;
|
|
1800
|
+
bucket_name?: string;
|
|
1801
|
+
scope_name?: string;
|
|
1783
1802
|
client_context_id?: string;
|
|
1784
1803
|
timeout?: CppMilliseconds;
|
|
1785
1804
|
}
|
|
@@ -1827,6 +1846,8 @@ export interface CppManagementSearchIndexGetDocumentsCountResponse {
|
|
|
1827
1846
|
}
|
|
1828
1847
|
export interface CppManagementSearchIndexGetDocumentsCountRequest {
|
|
1829
1848
|
index_name: string;
|
|
1849
|
+
bucket_name?: string;
|
|
1850
|
+
scope_name?: string;
|
|
1830
1851
|
client_context_id?: string;
|
|
1831
1852
|
timeout?: CppMilliseconds;
|
|
1832
1853
|
}
|
|
@@ -2367,6 +2388,7 @@ export interface CppBindingAutogen {
|
|
|
2367
2388
|
opaque_no_match: CppKeyValueStatusCode;
|
|
2368
2389
|
locked: CppKeyValueStatusCode;
|
|
2369
2390
|
not_locked: CppKeyValueStatusCode;
|
|
2391
|
+
config_only: CppKeyValueStatusCode;
|
|
2370
2392
|
auth_stale: CppKeyValueStatusCode;
|
|
2371
2393
|
auth_error: CppKeyValueStatusCode;
|
|
2372
2394
|
auth_continue: CppKeyValueStatusCode;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AnalyticsScanConsistency, AnalyticsStatus } from './analyticstypes';
|
|
2
|
-
import { CppAnalyticsResponseAnalyticsStatus, CppAnalyticsScanConsistency, CppDiagEndpointState, CppDiagPingState, CppDurabilityLevel, CppError, CppManagementClusterBucketCompression, CppManagementClusterBucketConflictResolution, CppManagementClusterBucketEvictionPolicy, CppManagementClusterBucketStorageBackend, CppManagementClusterBucketType, CppMutationState, CppPersistTo, CppPrefixScan, CppQueryProfile, CppQueryScanConsistency, CppRangeScan, CppReplicateTo, CppSamplingScan, CppSearchHighlightStyle, CppSearchScanConsistency, CppServiceType, CppStoreSemantics, CppTxnExternalException, CppTxnOpException, CppVectorQueryCombination, CppViewScanConsistency, CppViewSortOrder } from './binding';
|
|
2
|
+
import { CppAnalyticsResponseAnalyticsStatus, CppAnalyticsScanConsistency, CppDesignDocumentNamespace, CppDiagEndpointState, CppDiagPingState, CppDurabilityLevel, CppError, CppManagementClusterBucketCompression, CppManagementClusterBucketConflictResolution, CppManagementClusterBucketEvictionPolicy, CppManagementClusterBucketStorageBackend, CppManagementClusterBucketType, CppMutationState, CppPersistTo, CppPrefixScan, CppQueryProfile, CppQueryScanConsistency, CppRangeScan, CppReplicateTo, CppSamplingScan, CppSearchHighlightStyle, CppSearchScanConsistency, CppServiceType, CppStoreSemantics, CppTxnExternalException, CppTxnOpException, CppVectorQueryCombination, CppViewScanConsistency, CppViewSortOrder } from './binding';
|
|
3
3
|
import { BucketType, CompressionMode, ConflictResolutionType, EvictionPolicy, StorageBackend } from './bucketmanager';
|
|
4
4
|
import { EndpointState, PingState } from './diagnosticstypes';
|
|
5
5
|
import { ErrorContext } from './errorcontexts';
|
|
@@ -9,7 +9,7 @@ import { QueryProfileMode, QueryScanConsistency } from './querytypes';
|
|
|
9
9
|
import { PrefixScan, RangeScan, SamplingScan } from './rangeScan';
|
|
10
10
|
import { HighlightStyle, SearchScanConsistency } from './searchtypes';
|
|
11
11
|
import { VectorQueryCombination } from './vectorsearch';
|
|
12
|
-
import { ViewOrdering, ViewScanConsistency } from './viewtypes';
|
|
12
|
+
import { DesignDocumentNamespace, ViewOrdering, ViewScanConsistency } from './viewtypes';
|
|
13
13
|
/**
|
|
14
14
|
* @internal
|
|
15
15
|
*/
|
|
@@ -37,7 +37,7 @@ export declare function viewScanConsistencyToCpp(mode: ViewScanConsistency | und
|
|
|
37
37
|
/**
|
|
38
38
|
* @internal
|
|
39
39
|
*/
|
|
40
|
-
export declare function viewOrderingToCpp(
|
|
40
|
+
export declare function viewOrderingToCpp(ordering: ViewOrdering | undefined): CppViewSortOrder | undefined;
|
|
41
41
|
/**
|
|
42
42
|
* @internal
|
|
43
43
|
*/
|
|
@@ -146,3 +146,11 @@ export declare function bucketConflictResolutionTypeFromCpp(type: CppManagementC
|
|
|
146
146
|
* @internal
|
|
147
147
|
*/
|
|
148
148
|
export declare function vectorQueryCombinationToCpp(combination: VectorQueryCombination | undefined): CppVectorQueryCombination;
|
|
149
|
+
/**
|
|
150
|
+
* @internal
|
|
151
|
+
*/
|
|
152
|
+
export declare function designDocumentNamespaceFromCpp(namespace: CppDesignDocumentNamespace): DesignDocumentNamespace;
|
|
153
|
+
/**
|
|
154
|
+
* @internal
|
|
155
|
+
*/
|
|
156
|
+
export declare function designDocumentNamespaceToCpp(namespace: DesignDocumentNamespace): CppDesignDocumentNamespace;
|
package/dist/bindingutilities.js
CHANGED
|
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.vectorQueryCombinationToCpp = exports.bucketConflictResolutionTypeFromCpp = exports.bucketConflictResolutionTypeToCpp = exports.bucketStorageBackendFromCpp = exports.bucketStorageBackendToCpp = exports.bucketEvictionPolicyFromCpp = exports.bucketEvictionPolicyToCpp = exports.bucketCompressionModeFromCpp = exports.bucketCompressionModeToCpp = exports.bucketTypeFromCpp = exports.bucketTypeToCpp = exports.scanTypeToCpp = exports.errorFromCpp = exports.contextFromCpp = exports.pingStateFromCpp = exports.txnOpExeptionFromCpp = exports.txnExternalExceptionStringFromCpp = exports.endpointStateFromCpp = exports.serviceTypeFromCpp = exports.serviceTypeToCpp = exports.mutationStateToCpp = exports.searchHighlightStyleToCpp = exports.searchScanConsistencyToCpp = exports.analyticsStatusFromCpp = exports.analyticsScanConsistencyToCpp = exports.queryProfileToCpp = exports.queryScanConsistencyToCpp = exports.viewOrderingToCpp = exports.viewScanConsistencyToCpp = exports.storeSemanticToCpp = exports.replicateToToCpp = exports.persistToToCpp = exports.durabilityFromCpp = exports.durabilityToCpp = void 0;
|
|
29
|
+
exports.designDocumentNamespaceToCpp = exports.designDocumentNamespaceFromCpp = exports.vectorQueryCombinationToCpp = exports.bucketConflictResolutionTypeFromCpp = exports.bucketConflictResolutionTypeToCpp = exports.bucketStorageBackendFromCpp = exports.bucketStorageBackendToCpp = exports.bucketEvictionPolicyFromCpp = exports.bucketEvictionPolicyToCpp = exports.bucketCompressionModeFromCpp = exports.bucketCompressionModeToCpp = exports.bucketTypeFromCpp = exports.bucketTypeToCpp = exports.scanTypeToCpp = exports.errorFromCpp = exports.contextFromCpp = exports.pingStateFromCpp = exports.txnOpExeptionFromCpp = exports.txnExternalExceptionStringFromCpp = exports.endpointStateFromCpp = exports.serviceTypeFromCpp = exports.serviceTypeToCpp = exports.mutationStateToCpp = exports.searchHighlightStyleToCpp = exports.searchScanConsistencyToCpp = exports.analyticsStatusFromCpp = exports.analyticsScanConsistencyToCpp = exports.queryProfileToCpp = exports.queryScanConsistencyToCpp = exports.viewOrderingToCpp = exports.viewScanConsistencyToCpp = exports.storeSemanticToCpp = exports.replicateToToCpp = exports.persistToToCpp = exports.durabilityFromCpp = exports.durabilityToCpp = void 0;
|
|
30
30
|
const analyticstypes_1 = require("./analyticstypes");
|
|
31
31
|
const binding_1 = __importDefault(require("./binding"));
|
|
32
32
|
const bucketmanager_1 = require("./bucketmanager");
|
|
@@ -182,18 +182,18 @@ exports.viewScanConsistencyToCpp = viewScanConsistencyToCpp;
|
|
|
182
182
|
/**
|
|
183
183
|
* @internal
|
|
184
184
|
*/
|
|
185
|
-
function viewOrderingToCpp(
|
|
186
|
-
// Unspecified is allowed, and means
|
|
187
|
-
if (
|
|
185
|
+
function viewOrderingToCpp(ordering) {
|
|
186
|
+
// Unspecified is allowed, and means default ordering.
|
|
187
|
+
if (ordering === null || ordering === undefined) {
|
|
188
188
|
return undefined;
|
|
189
189
|
}
|
|
190
|
-
if (
|
|
190
|
+
if (ordering === viewtypes_1.ViewOrdering.Ascending) {
|
|
191
191
|
return binding_1.default.view_sort_order.ascending;
|
|
192
192
|
}
|
|
193
|
-
else if (
|
|
193
|
+
else if (ordering === viewtypes_1.ViewOrdering.Descending) {
|
|
194
194
|
return binding_1.default.view_sort_order.descending;
|
|
195
195
|
}
|
|
196
|
-
throw new errs.InvalidArgumentError();
|
|
196
|
+
throw new errs.InvalidArgumentError(new Error('Unrecognized view ordering.'));
|
|
197
197
|
}
|
|
198
198
|
exports.viewOrderingToCpp = viewOrderingToCpp;
|
|
199
199
|
/**
|
|
@@ -1025,3 +1025,29 @@ function vectorQueryCombinationToCpp(combination) {
|
|
|
1025
1025
|
throw new errs.InvalidArgumentError(new Error('Unrecognized VectorQueryCombination.'));
|
|
1026
1026
|
}
|
|
1027
1027
|
exports.vectorQueryCombinationToCpp = vectorQueryCombinationToCpp;
|
|
1028
|
+
/**
|
|
1029
|
+
* @internal
|
|
1030
|
+
*/
|
|
1031
|
+
function designDocumentNamespaceFromCpp(namespace) {
|
|
1032
|
+
if (namespace === binding_1.default.design_document_namespace.production) {
|
|
1033
|
+
return viewtypes_1.DesignDocumentNamespace.Production;
|
|
1034
|
+
}
|
|
1035
|
+
else if (namespace === binding_1.default.design_document_namespace.development) {
|
|
1036
|
+
return viewtypes_1.DesignDocumentNamespace.Development;
|
|
1037
|
+
}
|
|
1038
|
+
throw new errs.InvalidArgumentError(new Error('Unrecognized DesignDocumentNamespace.'));
|
|
1039
|
+
}
|
|
1040
|
+
exports.designDocumentNamespaceFromCpp = designDocumentNamespaceFromCpp;
|
|
1041
|
+
/**
|
|
1042
|
+
* @internal
|
|
1043
|
+
*/
|
|
1044
|
+
function designDocumentNamespaceToCpp(namespace) {
|
|
1045
|
+
if (namespace === viewtypes_1.DesignDocumentNamespace.Production) {
|
|
1046
|
+
return binding_1.default.design_document_namespace.production;
|
|
1047
|
+
}
|
|
1048
|
+
else if (namespace === viewtypes_1.DesignDocumentNamespace.Development) {
|
|
1049
|
+
return binding_1.default.design_document_namespace.development;
|
|
1050
|
+
}
|
|
1051
|
+
throw new errs.InvalidArgumentError(new Error('Unrecognized DesignDocumentNamespace.'));
|
|
1052
|
+
}
|
|
1053
|
+
exports.designDocumentNamespaceToCpp = designDocumentNamespaceToCpp;
|
package/dist/couchbase.d.ts
CHANGED
|
@@ -60,6 +60,7 @@ export * from './mutationstate';
|
|
|
60
60
|
export * from './queryindexmanager';
|
|
61
61
|
export * from './querytypes';
|
|
62
62
|
export * from './scope';
|
|
63
|
+
export * from './scopesearchindexmanager';
|
|
63
64
|
export * from './sdspecs';
|
|
64
65
|
export * from './searchfacet';
|
|
65
66
|
export * from './searchindexmanager';
|
package/dist/couchbase.js
CHANGED
|
@@ -89,6 +89,7 @@ __exportStar(require("./mutationstate"), exports);
|
|
|
89
89
|
__exportStar(require("./queryindexmanager"), exports);
|
|
90
90
|
__exportStar(require("./querytypes"), exports);
|
|
91
91
|
__exportStar(require("./scope"), exports);
|
|
92
|
+
__exportStar(require("./scopesearchindexmanager"), exports);
|
|
92
93
|
__exportStar(require("./sdspecs"), exports);
|
|
93
94
|
__exportStar(require("./searchfacet"), exports);
|
|
94
95
|
__exportStar(require("./searchindexmanager"), exports);
|
|
@@ -264,11 +264,11 @@ export declare class CollectionQueryIndexManager {
|
|
|
264
264
|
* Creates a new query index.
|
|
265
265
|
*
|
|
266
266
|
* @param indexName The name of the new index.
|
|
267
|
-
* @param
|
|
267
|
+
* @param keys The keys which this index should cover.
|
|
268
268
|
* @param options Optional parameters for this operation.
|
|
269
269
|
* @param callback A node-style callback to be invoked after execution.
|
|
270
270
|
*/
|
|
271
|
-
createIndex(indexName: string,
|
|
271
|
+
createIndex(indexName: string, keys: string[], options?: CreateQueryIndexOptions, callback?: NodeCallback<void>): Promise<void>;
|
|
272
272
|
/**
|
|
273
273
|
* Creates a new primary query index.
|
|
274
274
|
*
|
|
@@ -332,11 +332,11 @@ export declare class QueryIndexManager {
|
|
|
332
332
|
*
|
|
333
333
|
* @param bucketName The name of the bucket this index is for.
|
|
334
334
|
* @param indexName The name of the new index.
|
|
335
|
-
* @param
|
|
335
|
+
* @param keys The keys which this index should cover.
|
|
336
336
|
* @param options Optional parameters for this operation.
|
|
337
337
|
* @param callback A node-style callback to be invoked after execution.
|
|
338
338
|
*/
|
|
339
|
-
createIndex(bucketName: string, indexName: string,
|
|
339
|
+
createIndex(bucketName: string, indexName: string, keys: string[], options?: CreateQueryIndexOptions, callback?: NodeCallback<void>): Promise<void>;
|
|
340
340
|
/**
|
|
341
341
|
* Creates a new primary query index.
|
|
342
342
|
*
|
|
@@ -52,7 +52,7 @@ class InternalQueryIndexManager {
|
|
|
52
52
|
scope_name: options.scopeName || '',
|
|
53
53
|
collection_name: options.collectionName || '',
|
|
54
54
|
index_name: options.name || '',
|
|
55
|
-
|
|
55
|
+
keys: options.keys || [],
|
|
56
56
|
query_ctx: options.queryContext || this._queryContext,
|
|
57
57
|
is_primary: isPrimary,
|
|
58
58
|
ignore_if_exists: options.ignoreIfExists || false,
|
|
@@ -217,11 +217,11 @@ class CollectionQueryIndexManager {
|
|
|
217
217
|
* Creates a new query index.
|
|
218
218
|
*
|
|
219
219
|
* @param indexName The name of the new index.
|
|
220
|
-
* @param
|
|
220
|
+
* @param keys The keys which this index should cover.
|
|
221
221
|
* @param options Optional parameters for this operation.
|
|
222
222
|
* @param callback A node-style callback to be invoked after execution.
|
|
223
223
|
*/
|
|
224
|
-
async createIndex(indexName,
|
|
224
|
+
async createIndex(indexName, keys, options, callback) {
|
|
225
225
|
if (options instanceof Function) {
|
|
226
226
|
callback = arguments[2];
|
|
227
227
|
options = undefined;
|
|
@@ -233,7 +233,7 @@ class CollectionQueryIndexManager {
|
|
|
233
233
|
collectionName: this._collectionName,
|
|
234
234
|
scopeName: this._scopeName,
|
|
235
235
|
name: indexName,
|
|
236
|
-
|
|
236
|
+
keys: keys,
|
|
237
237
|
ignoreIfExists: options.ignoreIfExists,
|
|
238
238
|
numReplicas: options.numReplicas,
|
|
239
239
|
deferred: options.deferred,
|
|
@@ -390,11 +390,11 @@ class QueryIndexManager {
|
|
|
390
390
|
*
|
|
391
391
|
* @param bucketName The name of the bucket this index is for.
|
|
392
392
|
* @param indexName The name of the new index.
|
|
393
|
-
* @param
|
|
393
|
+
* @param keys The keys which this index should cover.
|
|
394
394
|
* @param options Optional parameters for this operation.
|
|
395
395
|
* @param callback A node-style callback to be invoked after execution.
|
|
396
396
|
*/
|
|
397
|
-
async createIndex(bucketName, indexName,
|
|
397
|
+
async createIndex(bucketName, indexName, keys, options, callback) {
|
|
398
398
|
if (options instanceof Function) {
|
|
399
399
|
callback = arguments[3];
|
|
400
400
|
options = undefined;
|
|
@@ -406,7 +406,7 @@ class QueryIndexManager {
|
|
|
406
406
|
collectionName: options.collectionName,
|
|
407
407
|
scopeName: options.scopeName,
|
|
408
408
|
name: indexName,
|
|
409
|
-
|
|
409
|
+
keys: keys,
|
|
410
410
|
ignoreIfExists: options.ignoreIfExists,
|
|
411
411
|
numReplicas: options.numReplicas,
|
|
412
412
|
deferred: options.deferred,
|
package/dist/scope.d.ts
CHANGED
|
@@ -4,6 +4,8 @@ import { Bucket } from './bucket';
|
|
|
4
4
|
import { Cluster } from './cluster';
|
|
5
5
|
import { Collection } from './collection';
|
|
6
6
|
import { QueryMetaData, QueryOptions, QueryResult } from './querytypes';
|
|
7
|
+
import { ScopeSearchIndexManager } from './scopesearchindexmanager';
|
|
8
|
+
import { SearchMetaData, SearchQueryOptions, SearchRequest, SearchResult, SearchRow } from './searchtypes';
|
|
7
9
|
import { StreamableRowPromise } from './streamablepromises';
|
|
8
10
|
import { Transcoder } from './transcoders';
|
|
9
11
|
import { NodeCallback } from './utilities';
|
|
@@ -51,6 +53,14 @@ export declare class Scope {
|
|
|
51
53
|
* @param collectionName The name of the collection to reference.
|
|
52
54
|
*/
|
|
53
55
|
collection(collectionName: string): Collection;
|
|
56
|
+
/**
|
|
57
|
+
* Returns a SearchIndexManager which can be used to manage the search
|
|
58
|
+
* indexes of this scope.
|
|
59
|
+
*
|
|
60
|
+
* Volatile: This API is subject to change at any time.
|
|
61
|
+
*
|
|
62
|
+
*/
|
|
63
|
+
searchIndexes(): ScopeSearchIndexManager;
|
|
54
64
|
/**
|
|
55
65
|
* Executes a N1QL query against the cluster scoped to this scope.
|
|
56
66
|
*
|
|
@@ -67,4 +77,15 @@ export declare class Scope {
|
|
|
67
77
|
* @param callback A node-style callback to be invoked after execution.
|
|
68
78
|
*/
|
|
69
79
|
analyticsQuery<TRow = any>(statement: string, options?: AnalyticsQueryOptions, callback?: NodeCallback<AnalyticsResult<TRow>>): StreamableRowPromise<AnalyticsResult<TRow>, TRow, AnalyticsMetaData>;
|
|
80
|
+
/**
|
|
81
|
+
* Executes a search query against the scope.
|
|
82
|
+
*
|
|
83
|
+
* Volatile: This API is subject to change at any time.
|
|
84
|
+
*
|
|
85
|
+
* @param indexName The name of the index to query.
|
|
86
|
+
* @param request The SearchRequest describing the search to execute.
|
|
87
|
+
* @param options Optional parameters for this operation.
|
|
88
|
+
* @param callback A node-style callback to be invoked after execution.
|
|
89
|
+
*/
|
|
90
|
+
search(indexName: string, request: SearchRequest, options?: SearchQueryOptions, callback?: NodeCallback<SearchResult>): StreamableRowPromise<SearchResult, SearchRow, SearchMetaData>;
|
|
70
91
|
}
|
package/dist/scope.js
CHANGED
|
@@ -4,6 +4,8 @@ exports.Scope = void 0;
|
|
|
4
4
|
const analyticsexecutor_1 = require("./analyticsexecutor");
|
|
5
5
|
const collection_1 = require("./collection");
|
|
6
6
|
const queryexecutor_1 = require("./queryexecutor");
|
|
7
|
+
const searchexecutor_1 = require("./searchexecutor");
|
|
8
|
+
const scopesearchindexmanager_1 = require("./scopesearchindexmanager");
|
|
7
9
|
const utilities_1 = require("./utilities");
|
|
8
10
|
/**
|
|
9
11
|
* Exposes the operations which are available to be performed against a scope.
|
|
@@ -64,6 +66,16 @@ class Scope {
|
|
|
64
66
|
collection(collectionName) {
|
|
65
67
|
return new collection_1.Collection(this, collectionName);
|
|
66
68
|
}
|
|
69
|
+
/**
|
|
70
|
+
* Returns a SearchIndexManager which can be used to manage the search
|
|
71
|
+
* indexes of this scope.
|
|
72
|
+
*
|
|
73
|
+
* Volatile: This API is subject to change at any time.
|
|
74
|
+
*
|
|
75
|
+
*/
|
|
76
|
+
searchIndexes() {
|
|
77
|
+
return new scopesearchindexmanager_1.ScopeSearchIndexManager(this.cluster, this.bucket.name, this._name);
|
|
78
|
+
}
|
|
67
79
|
/**
|
|
68
80
|
* Executes a N1QL query against the cluster scoped to this scope.
|
|
69
81
|
*
|
|
@@ -110,5 +122,27 @@ class Scope {
|
|
|
110
122
|
queryContext: `${bucket.name}.${this.name}`,
|
|
111
123
|
}), callback);
|
|
112
124
|
}
|
|
125
|
+
/**
|
|
126
|
+
* Executes a search query against the scope.
|
|
127
|
+
*
|
|
128
|
+
* Volatile: This API is subject to change at any time.
|
|
129
|
+
*
|
|
130
|
+
* @param indexName The name of the index to query.
|
|
131
|
+
* @param request The SearchRequest describing the search to execute.
|
|
132
|
+
* @param options Optional parameters for this operation.
|
|
133
|
+
* @param callback A node-style callback to be invoked after execution.
|
|
134
|
+
*/
|
|
135
|
+
search(indexName, request, options, callback) {
|
|
136
|
+
if (options instanceof Function) {
|
|
137
|
+
callback = arguments[2];
|
|
138
|
+
options = undefined;
|
|
139
|
+
}
|
|
140
|
+
if (!options) {
|
|
141
|
+
options = {};
|
|
142
|
+
}
|
|
143
|
+
const exec = new searchexecutor_1.SearchExecutor(this.cluster, this._bucket.name, this._name);
|
|
144
|
+
const options_ = options;
|
|
145
|
+
return utilities_1.PromiseHelper.wrapAsync(() => exec.query(indexName, request, options_), callback);
|
|
146
|
+
}
|
|
113
147
|
}
|
|
114
148
|
exports.Scope = Scope;
|