couchbase 4.2.6 → 4.2.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. package/deps/couchbase-cxx-client/.github/workflows/windows.yml +0 -3
  2. package/deps/couchbase-cxx-client/CMakeLists.txt +4 -0
  3. package/deps/couchbase-cxx-client/bin/build-tests.rb +1 -1
  4. package/deps/couchbase-cxx-client/core/impl/lookup_in.cxx +1 -0
  5. package/deps/couchbase-cxx-client/core/impl/lookup_in_all_replicas.cxx +176 -0
  6. package/deps/couchbase-cxx-client/core/impl/lookup_in_all_replicas.hxx +80 -0
  7. package/deps/couchbase-cxx-client/core/impl/lookup_in_any_replica.cxx +167 -0
  8. package/deps/couchbase-cxx-client/core/impl/lookup_in_any_replica.hxx +75 -0
  9. package/deps/couchbase-cxx-client/core/impl/lookup_in_replica.cxx +97 -0
  10. package/deps/couchbase-cxx-client/core/impl/lookup_in_replica.hxx +67 -0
  11. package/deps/couchbase-cxx-client/core/meta/features.hxx +13 -0
  12. package/deps/couchbase-cxx-client/core/operations/document_lookup_in_all_replicas.hxx +192 -0
  13. package/deps/couchbase-cxx-client/core/operations/document_lookup_in_any_replica.hxx +188 -0
  14. package/deps/couchbase-cxx-client/core/operations.hxx +2 -0
  15. package/deps/couchbase-cxx-client/core/protocol/cmd_hello.hxx +1 -0
  16. package/deps/couchbase-cxx-client/core/protocol/cmd_lookup_in_replica.cxx +107 -0
  17. package/deps/couchbase-cxx-client/core/protocol/cmd_lookup_in_replica.hxx +137 -0
  18. package/deps/couchbase-cxx-client/core/protocol/hello_feature.hxx +6 -0
  19. package/deps/couchbase-cxx-client/core/protocol/hello_feature_fmt.hxx +3 -0
  20. package/deps/couchbase-cxx-client/core/topology/capabilities.hxx +1 -0
  21. package/deps/couchbase-cxx-client/core/topology/capabilities_fmt.hxx +3 -0
  22. package/deps/couchbase-cxx-client/core/topology/configuration.hxx +5 -0
  23. package/deps/couchbase-cxx-client/core/topology/configuration_json.hxx +2 -1
  24. package/deps/couchbase-cxx-client/couchbase/collection.hxx +111 -0
  25. package/deps/couchbase-cxx-client/couchbase/get_and_lock_options.hxx +2 -2
  26. package/deps/couchbase-cxx-client/couchbase/get_and_touch_options.hxx +2 -2
  27. package/deps/couchbase-cxx-client/couchbase/get_options.hxx +2 -2
  28. package/deps/couchbase-cxx-client/couchbase/insert_options.hxx +3 -3
  29. package/deps/couchbase-cxx-client/couchbase/lookup_in_all_replicas_options.hxx +109 -0
  30. package/deps/couchbase-cxx-client/couchbase/lookup_in_any_replica_options.hxx +101 -0
  31. package/deps/couchbase-cxx-client/couchbase/lookup_in_options.hxx +2 -2
  32. package/deps/couchbase-cxx-client/couchbase/lookup_in_replica_result.hxx +74 -0
  33. package/deps/couchbase-cxx-client/couchbase/lookup_in_result.hxx +26 -0
  34. package/deps/couchbase-cxx-client/couchbase/mutate_in_options.hxx +2 -2
  35. package/deps/couchbase-cxx-client/couchbase/remove_options.hxx +2 -2
  36. package/deps/couchbase-cxx-client/couchbase/replace_options.hxx +3 -3
  37. package/deps/couchbase-cxx-client/couchbase/touch_options.hxx +2 -2
  38. package/deps/couchbase-cxx-client/couchbase/unlock_options.hxx +2 -2
  39. package/deps/couchbase-cxx-client/couchbase/upsert_options.hxx +3 -3
  40. package/deps/couchbase-cxx-client/test/test_integration_subdoc.cxx +655 -0
  41. package/dist/binding.d.ts +45 -0
  42. package/dist/collection.d.ts +53 -1
  43. package/dist/collection.js +139 -1
  44. package/dist/crudoptypes.d.ts +24 -0
  45. package/dist/crudoptypes.js +14 -1
  46. package/package.json +13 -13
  47. package/src/connection.cpp +4 -0
  48. package/src/connection.hpp +2 -0
  49. package/src/connection_autogen.cpp +28 -0
  50. package/src/jstocbpp_autogen.hpp +262 -0
package/dist/binding.d.ts CHANGED
@@ -677,6 +677,29 @@ export interface CppGetRequest {
677
677
  opaque: number;
678
678
  timeout?: CppMilliseconds;
679
679
  }
680
+ export interface CppLookupInAllReplicasResponse {
681
+ entries: CppLookupInAllReplicasResponseEntry[];
682
+ }
683
+ export interface CppLookupInAllReplicasResponseEntry {
684
+ fields: CppLookupInAllReplicasResponseEntryLookupInEntry[];
685
+ cas: CppCas;
686
+ deleted: boolean;
687
+ is_replica: boolean;
688
+ }
689
+ export interface CppLookupInAllReplicasResponseEntryLookupInEntry {
690
+ path: string;
691
+ value: Buffer;
692
+ original_index: number;
693
+ exists: boolean;
694
+ opcode: CppProtocolSubdocOpcode;
695
+ status: CppKeyValueStatusCode;
696
+ ec: CppError;
697
+ }
698
+ export interface CppLookupInAllReplicasRequest {
699
+ id: CppDocumentId;
700
+ specs: CppImplSubdocCommand[];
701
+ timeout?: CppMilliseconds;
702
+ }
680
703
  export interface CppAnalyticsResponse {
681
704
  meta: CppAnalyticsResponseAnalyticsMetaData;
682
705
  rows: string[];
@@ -970,6 +993,26 @@ export interface CppInsertWithLegacyDurabilityRequest {
970
993
  persist_to: CppPersistTo;
971
994
  replicate_to: CppReplicateTo;
972
995
  }
996
+ export interface CppLookupInAnyReplicaResponse {
997
+ cas: CppCas;
998
+ fields: CppLookupInAnyReplicaResponseEntry[];
999
+ deleted: boolean;
1000
+ is_replica: boolean;
1001
+ }
1002
+ export interface CppLookupInAnyReplicaResponseEntry {
1003
+ path: string;
1004
+ value: Buffer;
1005
+ original_index: number;
1006
+ exists: boolean;
1007
+ opcode: CppProtocolSubdocOpcode;
1008
+ status: CppKeyValueStatusCode;
1009
+ ec: CppError;
1010
+ }
1011
+ export interface CppLookupInAnyReplicaRequest {
1012
+ id: CppDocumentId;
1013
+ specs: CppImplSubdocCommand[];
1014
+ timeout?: CppMilliseconds;
1015
+ }
973
1016
  export interface CppMutateInResponse {
974
1017
  cas: CppCas;
975
1018
  token: CppMutationToken;
@@ -1884,6 +1927,7 @@ export interface CppConnectionAutogen {
1884
1927
  remove(options: CppRemoveRequest, callback: (err: CppError | null, result: CppRemoveResponse) => void): void;
1885
1928
  removeWithLegacyDurability(options: CppRemoveWithLegacyDurabilityRequest, callback: (err: CppError | null, result: CppRemoveResponse) => void): void;
1886
1929
  get(options: CppGetRequest, callback: (err: CppError | null, result: CppGetResponse) => void): void;
1930
+ lookupInAllReplicas(options: CppLookupInAllReplicasRequest, callback: (err: CppError | null, result: CppLookupInAllReplicasResponse) => void): void;
1887
1931
  analytics(options: CppAnalyticsRequest, callback: (err: CppError | null, result: CppAnalyticsResponse) => void): void;
1888
1932
  getProjected(options: CppGetProjectedRequest, callback: (err: CppError | null, result: CppGetProjectedResponse) => void): void;
1889
1933
  decrement(options: CppDecrementRequest, callback: (err: CppError | null, result: CppDecrementResponse) => void): void;
@@ -1895,6 +1939,7 @@ export interface CppConnectionAutogen {
1895
1939
  getAndLock(options: CppGetAndLockRequest, callback: (err: CppError | null, result: CppGetAndLockResponse) => void): void;
1896
1940
  insert(options: CppInsertRequest, callback: (err: CppError | null, result: CppInsertResponse) => void): void;
1897
1941
  insertWithLegacyDurability(options: CppInsertWithLegacyDurabilityRequest, callback: (err: CppError | null, result: CppInsertResponse) => void): void;
1942
+ lookupInAnyReplica(options: CppLookupInAnyReplicaRequest, callback: (err: CppError | null, result: CppLookupInAnyReplicaResponse) => void): void;
1898
1943
  mutateIn(options: CppMutateInRequest, callback: (err: CppError | null, result: CppMutateInResponse) => void): void;
1899
1944
  mutateInWithLegacyDurability(options: CppMutateInWithLegacyDurabilityRequest, callback: (err: CppError | null, result: CppMutateInResponse) => void): void;
1900
1945
  increment(options: CppIncrementRequest, callback: (err: CppError | null, result: CppIncrementResponse) => void): void;
@@ -2,7 +2,7 @@
2
2
  import { IncrementOptions, DecrementOptions, AppendOptions, PrependOptions, BinaryCollection } from './binarycollection';
3
3
  import { CppDocumentId, CppConnection, CppScanIterator, CppRangeScanOrchestratorOptions } from './binding';
4
4
  import { Cluster } from './cluster';
5
- import { CounterResult, ExistsResult, GetReplicaResult, GetResult, LookupInResult, MutateInResult, MutationResult, ScanResult } from './crudoptypes';
5
+ import { CounterResult, ExistsResult, GetReplicaResult, GetResult, LookupInResult, LookupInReplicaResult, MutateInResult, MutationResult, ScanResult } from './crudoptypes';
6
6
  import { CouchbaseList, CouchbaseMap, CouchbaseQueue, CouchbaseSet } from './datastructures';
7
7
  import { DurabilityLevel, StoreSemantics } from './generaltypes';
8
8
  import { MutationState } from './mutationstate';
@@ -270,6 +270,30 @@ export interface LookupInOptions {
270
270
  * The timeout for this operation, represented in milliseconds.
271
271
  */
272
272
  timeout?: number;
273
+ /**
274
+ * For internal use only - allows access to deleted documents that are in 'tombstone' form
275
+ *
276
+ * @internal
277
+ */
278
+ accessDeleted?: boolean;
279
+ }
280
+ /**
281
+ * @category Key-Value
282
+ */
283
+ export interface LookupInAnyReplicaOptions {
284
+ /**
285
+ * The timeout for this operation, represented in milliseconds.
286
+ */
287
+ timeout?: number;
288
+ }
289
+ /**
290
+ * @category Key-Value
291
+ */
292
+ export interface LookupInAllReplicasOptions {
293
+ /**
294
+ * The timeout for this operation, represented in milliseconds.
295
+ */
296
+ timeout?: number;
273
297
  }
274
298
  /**
275
299
  * @category Key-Value
@@ -567,6 +591,34 @@ export declare class Collection {
567
591
  * @param callback A node-style callback to be invoked after execution.
568
592
  */
569
593
  lookupIn(key: string, specs: LookupInSpec[], options?: LookupInOptions, callback?: NodeCallback<LookupInResult>): Promise<LookupInResult>;
594
+ /**
595
+ * @internal
596
+ */
597
+ _lookupInReplica(key: string, lookupInAllReplicas: boolean, specs: LookupInSpec[], options?: {
598
+ timeout?: number;
599
+ }, callback?: NodeCallback<LookupInReplicaResult[]>): StreamableReplicasPromise<LookupInReplicaResult[], LookupInReplicaResult>;
600
+ /**
601
+ * Performs a lookup-in operation against a document, fetching individual fields or
602
+ * information about specific fields inside the document value from any of the available
603
+ * replicas in the cluster.
604
+ *
605
+ * @param key The document key to look in.
606
+ * @param specs A list of specs describing the data to fetch from the document.
607
+ * @param options Optional parameters for this operation.
608
+ * @param callback A node-style callback to be invoked after execution.
609
+ */
610
+ lookupInAnyReplica(key: string, specs: LookupInSpec[], options?: LookupInOptions, callback?: NodeCallback<LookupInReplicaResult>): Promise<LookupInReplicaResult>;
611
+ /**
612
+ * Performs a lookup-in operation against a document, fetching individual fields or
613
+ * information about specific fields inside the document value from all available replicas.
614
+ * Note that as replication is asynchronous, each node may return a different value.
615
+ *
616
+ * @param key The document key to look in.
617
+ * @param specs A list of specs describing the data to fetch from the document.
618
+ * @param options Optional parameters for this operation.
619
+ * @param callback A node-style callback to be invoked after execution.
620
+ */
621
+ lookupInAllReplicas(key: string, specs: LookupInSpec[], options?: LookupInOptions, callback?: NodeCallback<LookupInReplicaResult[]>): Promise<LookupInReplicaResult[]>;
570
622
  /**
571
623
  * Performs a mutate-in operation against a document. Allowing atomic modification of
572
624
  * specific fields within a document. Also enables access to document extended-attributes.
@@ -939,6 +939,7 @@ class Collection {
939
939
  });
940
940
  }
941
941
  const timeout = options.timeout || this.cluster.kvTimeout;
942
+ const accessDeleted = options.accessDeleted || false;
942
943
  return utilities_1.PromiseHelper.wrap((wrapCallback) => {
943
944
  this._conn.lookupIn({
944
945
  id: this._cppDocId(key),
@@ -946,7 +947,7 @@ class Collection {
946
947
  timeout,
947
948
  partition: 0,
948
949
  opaque: 0,
949
- access_deleted: false,
950
+ access_deleted: accessDeleted,
950
951
  }, (cppErr, resp) => {
951
952
  const err = (0, bindingutilities_1.errorFromCpp)(cppErr);
952
953
  if (resp && resp.fields) {
@@ -978,6 +979,143 @@ class Collection {
978
979
  });
979
980
  }, callback);
980
981
  }
982
+ /**
983
+ * @internal
984
+ */
985
+ _lookupInReplica(key, lookupInAllReplicas, specs, options, callback) {
986
+ if (options instanceof Function) {
987
+ callback = arguments[3];
988
+ options = undefined;
989
+ }
990
+ if (!options) {
991
+ options = {};
992
+ }
993
+ const emitter = new streamablepromises_1.StreamableReplicasPromise((replicas) => replicas);
994
+ const cppSpecs = [];
995
+ for (let i = 0; i < specs.length; ++i) {
996
+ cppSpecs.push({
997
+ opcode_: specs[i]._op,
998
+ flags_: specs[i]._flags,
999
+ path_: specs[i]._path,
1000
+ original_index_: i,
1001
+ });
1002
+ }
1003
+ const timeout = options.timeout || this.cluster.kvTimeout;
1004
+ if (lookupInAllReplicas) {
1005
+ this._conn.lookupInAllReplicas({
1006
+ id: this._cppDocId(key),
1007
+ specs: cppSpecs,
1008
+ timeout: timeout,
1009
+ }, (cppErr, resp) => {
1010
+ const err = (0, bindingutilities_1.errorFromCpp)(cppErr);
1011
+ if (err) {
1012
+ emitter.emit('error', err);
1013
+ emitter.emit('end');
1014
+ return;
1015
+ }
1016
+ resp.entries.forEach((replica) => {
1017
+ const content = [];
1018
+ for (let i = 0; i < replica.fields.length; ++i) {
1019
+ const itemRes = replica.fields[i];
1020
+ let error = (0, bindingutilities_1.errorFromCpp)(itemRes.ec);
1021
+ let value = undefined;
1022
+ if (itemRes.value && itemRes.value.length > 0) {
1023
+ value = this._subdocDecode(itemRes.value);
1024
+ }
1025
+ // BUG(JSCBC-1016): Should remove this workaround when the underlying bug is resolved.
1026
+ if (itemRes.opcode === binding_1.default.protocol_subdoc_opcode.exists) {
1027
+ error = null;
1028
+ value = itemRes.exists;
1029
+ }
1030
+ content.push(new crudoptypes_1.LookupInResultEntry({
1031
+ error,
1032
+ value,
1033
+ }));
1034
+ }
1035
+ emitter.emit('replica', new crudoptypes_1.LookupInReplicaResult(({
1036
+ content: content,
1037
+ cas: replica.cas,
1038
+ isReplica: replica.is_replica
1039
+ })));
1040
+ });
1041
+ emitter.emit('end');
1042
+ return;
1043
+ });
1044
+ }
1045
+ else {
1046
+ this._conn.lookupInAnyReplica({
1047
+ id: this._cppDocId(key),
1048
+ specs: cppSpecs,
1049
+ timeout: timeout,
1050
+ }, (cppErr, resp) => {
1051
+ const err = (0, bindingutilities_1.errorFromCpp)(cppErr);
1052
+ if (err) {
1053
+ emitter.emit('error', err);
1054
+ emitter.emit('end');
1055
+ return;
1056
+ }
1057
+ const content = [];
1058
+ for (let i = 0; i < resp.fields.length; ++i) {
1059
+ const itemRes = resp.fields[i];
1060
+ let error = (0, bindingutilities_1.errorFromCpp)(itemRes.ec);
1061
+ let value = undefined;
1062
+ if (itemRes.value && itemRes.value.length > 0) {
1063
+ value = this._subdocDecode(itemRes.value);
1064
+ }
1065
+ // BUG(JSCBC-1016): Should remove this workaround when the underlying bug is resolved.
1066
+ if (itemRes.opcode === binding_1.default.protocol_subdoc_opcode.exists) {
1067
+ error = null;
1068
+ value = itemRes.exists;
1069
+ }
1070
+ content.push(new crudoptypes_1.LookupInResultEntry({
1071
+ error,
1072
+ value,
1073
+ }));
1074
+ }
1075
+ emitter.emit('replica', new crudoptypes_1.GetReplicaResult({
1076
+ content: content,
1077
+ cas: resp.cas,
1078
+ isReplica: resp.is_replica,
1079
+ }));
1080
+ emitter.emit('end');
1081
+ return;
1082
+ });
1083
+ }
1084
+ return utilities_1.PromiseHelper.wrapAsync(() => emitter, callback);
1085
+ }
1086
+ /**
1087
+ * Performs a lookup-in operation against a document, fetching individual fields or
1088
+ * information about specific fields inside the document value from any of the available
1089
+ * replicas in the cluster.
1090
+ *
1091
+ * @param key The document key to look in.
1092
+ * @param specs A list of specs describing the data to fetch from the document.
1093
+ * @param options Optional parameters for this operation.
1094
+ * @param callback A node-style callback to be invoked after execution.
1095
+ */
1096
+ lookupInAnyReplica(key, specs, options, callback) {
1097
+ if (options instanceof Function) {
1098
+ callback = arguments[2];
1099
+ options = undefined;
1100
+ }
1101
+ return utilities_1.PromiseHelper.wrapAsync(async () => {
1102
+ const replicas = await this._lookupInReplica(key, false, specs, options);
1103
+ return replicas[0];
1104
+ }, callback);
1105
+ }
1106
+ /**
1107
+ * Performs a lookup-in operation against a document, fetching individual fields or
1108
+ * information about specific fields inside the document value from all available replicas.
1109
+ * Note that as replication is asynchronous, each node may return a different value.
1110
+ *
1111
+ * @param key The document key to look in.
1112
+ * @param specs A list of specs describing the data to fetch from the document.
1113
+ * @param options Optional parameters for this operation.
1114
+ * @param callback A node-style callback to be invoked after execution.
1115
+ */
1116
+ lookupInAllReplicas(key, specs, options, callback) {
1117
+ return this._lookupInReplica(key, true, specs, options, callback);
1118
+ }
981
1119
  /**
982
1120
  * Performs a mutate-in operation against a document. Allowing atomic modification of
983
1121
  * specific fields within a document. Also enables access to document extended-attributes.
@@ -189,6 +189,30 @@ export declare class LookupInResult {
189
189
  get results(): LookupInResultEntry[];
190
190
  set results(v: LookupInResultEntry[]);
191
191
  }
192
+ /**
193
+ * Contains the results of a lookup-in replica operation.
194
+ *
195
+ * @category Key-Value
196
+ */
197
+ export declare class LookupInReplicaResult {
198
+ /**
199
+ * A list of result entries for each sub-operation performed.
200
+ */
201
+ content: LookupInResultEntry[];
202
+ /**
203
+ * The cas of the document.
204
+ */
205
+ cas: Cas;
206
+ /**
207
+ * Indicates whether this result came from a replica or the primary.
208
+ */
209
+ isReplica: boolean;
210
+ constructor(data: {
211
+ content: LookupInResultEntry[];
212
+ cas: Cas;
213
+ isReplica: boolean;
214
+ });
215
+ }
192
216
  /**
193
217
  * Contains the results of a specific sub-operation within a mutate-in operation.
194
218
  *
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CounterResult = exports.MutateInResult = exports.MutateInResultEntry = exports.LookupInResult = exports.LookupInResultEntry = exports.GetReplicaResult = exports.MutationResult = exports.ExistsResult = exports.ScanResult = exports.GetResult = void 0;
3
+ exports.CounterResult = exports.MutateInResult = exports.MutateInResultEntry = exports.LookupInReplicaResult = exports.LookupInResult = exports.LookupInResultEntry = exports.GetReplicaResult = exports.MutationResult = exports.ExistsResult = exports.ScanResult = exports.GetResult = void 0;
4
4
  /**
5
5
  * Contains the results of a Get operation.
6
6
  *
@@ -140,6 +140,19 @@ class LookupInResult {
140
140
  }
141
141
  }
142
142
  exports.LookupInResult = LookupInResult;
143
+ /**
144
+ * Contains the results of a lookup-in replica operation.
145
+ *
146
+ * @category Key-Value
147
+ */
148
+ class LookupInReplicaResult {
149
+ constructor(data) {
150
+ this.content = data.content;
151
+ this.cas = data.cas;
152
+ this.isReplica = data.isReplica;
153
+ }
154
+ }
155
+ exports.LookupInReplicaResult = LookupInReplicaResult;
143
156
  /**
144
157
  * Contains the results of a specific sub-operation within a mutate-in operation.
145
158
  *
package/package.json CHANGED
@@ -55,7 +55,7 @@
55
55
  "type": "git",
56
56
  "url": "http://github.com/couchbase/couchnode.git"
57
57
  },
58
- "version": "4.2.6",
58
+ "version": "4.2.7",
59
59
  "config": {
60
60
  "native": false
61
61
  },
@@ -80,17 +80,17 @@
80
80
  ]
81
81
  },
82
82
  "optionalDependencies": {
83
- "@couchbase/couchbase-darwin-arm64-openssl1": "4.2.6",
84
- "@couchbase/couchbase-darwin-arm64-openssl3": "4.2.6",
85
- "@couchbase/couchbase-darwin-x64-openssl1": "4.2.6",
86
- "@couchbase/couchbase-darwin-x64-openssl3": "4.2.6",
87
- "@couchbase/couchbase-linux-arm64-openssl1": "4.2.6",
88
- "@couchbase/couchbase-linux-arm64-openssl3": "4.2.6",
89
- "@couchbase/couchbase-linux-x64-openssl1": "4.2.6",
90
- "@couchbase/couchbase-linux-x64-openssl3": "4.2.6",
91
- "@couchbase/couchbase-linuxmusl-x64-openssl1": "4.2.6",
92
- "@couchbase/couchbase-linuxmusl-x64-openssl3": "4.2.6",
93
- "@couchbase/couchbase-win32-x64-openssl1": "4.2.6",
94
- "@couchbase/couchbase-win32-x64-openssl3": "4.2.6"
83
+ "@couchbase/couchbase-darwin-arm64-openssl1": "4.2.7",
84
+ "@couchbase/couchbase-darwin-arm64-openssl3": "4.2.7",
85
+ "@couchbase/couchbase-darwin-x64-openssl1": "4.2.7",
86
+ "@couchbase/couchbase-darwin-x64-openssl3": "4.2.7",
87
+ "@couchbase/couchbase-linux-arm64-openssl1": "4.2.7",
88
+ "@couchbase/couchbase-linux-arm64-openssl3": "4.2.7",
89
+ "@couchbase/couchbase-linux-x64-openssl1": "4.2.7",
90
+ "@couchbase/couchbase-linux-x64-openssl3": "4.2.7",
91
+ "@couchbase/couchbase-linuxmusl-x64-openssl1": "4.2.7",
92
+ "@couchbase/couchbase-linuxmusl-x64-openssl3": "4.2.7",
93
+ "@couchbase/couchbase-win32-x64-openssl1": "4.2.7",
94
+ "@couchbase/couchbase-win32-x64-openssl3": "4.2.7"
95
95
  }
96
96
  }
@@ -65,6 +65,8 @@ void Connection::Init(Napi::Env env, Napi::Object exports)
65
65
  InstanceMethod<&Connection::jsRemoveWithLegacyDurability>(
66
66
  "removeWithLegacyDurability"),
67
67
  InstanceMethod<&Connection::jsGet>("get"),
68
+ InstanceMethod<&Connection::jsLookupInAllReplicas>(
69
+ "lookupInAllReplicas"),
68
70
  InstanceMethod<&Connection::jsAnalytics>("analytics"),
69
71
  InstanceMethod<&Connection::jsGetProjected>("getProjected"),
70
72
  InstanceMethod<&Connection::jsDecrement>("decrement"),
@@ -78,6 +80,8 @@ void Connection::Init(Napi::Env env, Napi::Object exports)
78
80
  InstanceMethod<&Connection::jsInsert>("insert"),
79
81
  InstanceMethod<&Connection::jsInsertWithLegacyDurability>(
80
82
  "insertWithLegacyDurability"),
83
+ InstanceMethod<&Connection::jsLookupInAnyReplica>(
84
+ "lookupInAnyReplica"),
81
85
  InstanceMethod<&Connection::jsMutateIn>("mutateIn"),
82
86
  InstanceMethod<&Connection::jsMutateInWithLegacyDurability>(
83
87
  "mutateInWithLegacyDurability"),
@@ -91,6 +91,7 @@ public:
91
91
  Napi::Value jsRemove(const Napi::CallbackInfo &info);
92
92
  Napi::Value jsRemoveWithLegacyDurability(const Napi::CallbackInfo &info);
93
93
  Napi::Value jsGet(const Napi::CallbackInfo &info);
94
+ Napi::Value jsLookupInAllReplicas(const Napi::CallbackInfo &info);
94
95
  Napi::Value jsAnalytics(const Napi::CallbackInfo &info);
95
96
  Napi::Value jsGetProjected(const Napi::CallbackInfo &info);
96
97
  Napi::Value jsDecrement(const Napi::CallbackInfo &info);
@@ -102,6 +103,7 @@ public:
102
103
  Napi::Value jsGetAndLock(const Napi::CallbackInfo &info);
103
104
  Napi::Value jsInsert(const Napi::CallbackInfo &info);
104
105
  Napi::Value jsInsertWithLegacyDurability(const Napi::CallbackInfo &info);
106
+ Napi::Value jsLookupInAnyReplica(const Napi::CallbackInfo &info);
105
107
  Napi::Value jsMutateIn(const Napi::CallbackInfo &info);
106
108
  Napi::Value jsMutateInWithLegacyDurability(const Napi::CallbackInfo &info);
107
109
  Napi::Value jsIncrement(const Napi::CallbackInfo &info);
@@ -242,6 +242,20 @@ Napi::Value Connection::jsGet(const Napi::CallbackInfo &info)
242
242
  return info.Env().Null();
243
243
  }
244
244
 
245
+ Napi::Value Connection::jsLookupInAllReplicas(const Napi::CallbackInfo &info)
246
+ {
247
+ auto optsJsObj = info[0].As<Napi::Object>();
248
+ auto callbackJsFn = info[1].As<Napi::Function>();
249
+
250
+ executeOp(
251
+ "lookupInAllReplicas",
252
+ jsToCbpp<couchbase::core::operations::lookup_in_all_replicas_request>(
253
+ optsJsObj),
254
+ callbackJsFn);
255
+
256
+ return info.Env().Null();
257
+ }
258
+
245
259
  Napi::Value Connection::jsAnalytics(const Napi::CallbackInfo &info)
246
260
  {
247
261
  auto optsJsObj = info[0].As<Napi::Object>();
@@ -386,6 +400,20 @@ Connection::jsInsertWithLegacyDurability(const Napi::CallbackInfo &info)
386
400
  return info.Env().Null();
387
401
  }
388
402
 
403
+ Napi::Value Connection::jsLookupInAnyReplica(const Napi::CallbackInfo &info)
404
+ {
405
+ auto optsJsObj = info[0].As<Napi::Object>();
406
+ auto callbackJsFn = info[1].As<Napi::Function>();
407
+
408
+ executeOp(
409
+ "lookupInAnyReplica",
410
+ jsToCbpp<couchbase::core::operations::lookup_in_any_replica_request>(
411
+ optsJsObj),
412
+ callbackJsFn);
413
+
414
+ return info.Env().Null();
415
+ }
416
+
389
417
  Napi::Value Connection::jsMutateIn(const Napi::CallbackInfo &info)
390
418
  {
391
419
  auto optsJsObj = info[0].As<Napi::Object>();