couchbase 3.2.5 → 3.2.7
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/lcb/CMakeLists.txt +28 -6
- package/deps/lcb/README.markdown +5 -9
- package/deps/lcb/RELEASE_NOTES.markdown +80 -12
- package/deps/lcb/cmake/Modules/GetVersionInfo.cmake +1 -1
- package/deps/lcb/doc/Doxyfile +1 -1
- package/deps/lcb/doc/cbc.markdown +10 -0
- package/deps/lcb/gyp_config/common/libcouchbase/configuration.h +3 -3
- package/deps/lcb/include/libcouchbase/error.h +1 -1
- package/deps/lcb/packaging/rpm/libcouchbase.spec.in +1 -1
- package/deps/lcb/plugins/io/iocp/iocp_iops.h +1 -1
- package/deps/lcb/plugins/io/iocp/iocp_loop.c +3 -3
- package/deps/lcb/plugins/io/iocp/iocp_util.c +2 -2
- package/deps/lcb/src/bucketconfig/bc_file.cc +29 -15
- package/deps/lcb/src/capi/collection_qualifier.hh +0 -3
- package/deps/lcb/src/instance.cc +19 -0
- package/deps/lcb/src/mcserver/mcserver.cc +5 -0
- package/deps/lcb/src/operations/ping.cc +2 -2
- package/deps/lcb/src/settings.cc +1 -0
- package/deps/lcb/src/ssl/ssl_common.c +111 -22
- package/deps/lcb/src/vbucket/vbucket.c +16 -7
- package/deps/lcb/tests/CMakeLists.txt +1 -1
- package/deps/lcb/tests/ioserver/ssl_connection.cc +8 -5
- package/deps/lcb/tests/iotests/mock-environment.cc +3 -0
- package/deps/lcb/tests/iotests/mock-environment.h +1 -0
- package/deps/lcb/tests/iotests/t_ratelimit.cc +11 -1
- package/deps/lcb/tools/CMakeLists.txt +1 -1
- package/deps/lcb/tools/cbc-handlers.h +39 -0
- package/deps/lcb/tools/cbc-n1qlback.cc +1 -0
- package/deps/lcb/tools/cbc-pillowfight.cc +45 -35
- package/deps/lcb/tools/cbc.cc +31 -0
- package/deps/lcb/tools/docgen/docgen.h +11 -10
- package/dist/authenticators.d.ts +1 -1
- package/dist/binding.d.ts +5 -5
- package/dist/cluster.js +6 -6
- package/dist/collection.js +6 -6
- package/dist/connection.d.ts +2 -2
- package/dist/httpexecutor.d.ts +1 -0
- package/dist/scope.js +6 -6
- package/dist/sdspecs.js +11 -11
- package/dist/searchquery.d.ts +1 -1
- package/dist/streamablepromises.d.ts +1 -1
- package/dist/usermanager.js +9 -9
- package/dist/utilities.d.ts +1 -1
- package/dist/viewindexmanager.js +8 -8
- package/package.json +1 -1
@@ -104,7 +104,7 @@ class Configuration
|
|
104
104
|
o_startAt("start-at"), o_rateLimit("rate-limit"), o_userdocs("docs"), o_writeJson("json"),
|
105
105
|
o_templatePairs("template"), o_subdoc("subdoc"), o_noop("noop"), o_sdPathCount("pathcount"),
|
106
106
|
o_populateOnly("populate-only"), o_exptime("expiry"), o_collection("collection"), o_durability("durability"),
|
107
|
-
o_persist("persist-to"), o_replicate("replicate-to"), o_lock("lock")
|
107
|
+
o_persist("persist-to"), o_replicate("replicate-to"), o_lock("lock"), o_randSpace("rand-space-per-thread")
|
108
108
|
{
|
109
109
|
o_multiSize.setDefault(100).abbrev('B').description("Number of operations to batch");
|
110
110
|
o_numItems.setDefault(1000).abbrev('I').description("Number of items to operate on");
|
@@ -138,6 +138,8 @@ class Configuration
|
|
138
138
|
o_replicate.description("Wait until item is replicated to this number of nodes (-1 for all replicas)")
|
139
139
|
.setDefault(0);
|
140
140
|
o_lock.description("Lock keys for updates for given time (will not lock when set to zero)").setDefault(0);
|
141
|
+
o_randSpace.description("When set and --sequential is not set, threads will perform operations on different key"
|
142
|
+
" spaces").setDefault(false);
|
141
143
|
params.getTimings().description("Enable command timings (second time to dump timings automatically)");
|
142
144
|
}
|
143
145
|
|
@@ -218,25 +220,25 @@ class Configuration
|
|
218
220
|
|
219
221
|
if (specs.empty()) {
|
220
222
|
if (o_writeJson.result()) {
|
221
|
-
docgen
|
223
|
+
docgen.reset(new JsonDocGenerator(o_minSize.result(), o_maxSize.result(), o_randomBody.numSpecified()));
|
222
224
|
} else if (!userdocs.empty()) {
|
223
|
-
docgen
|
225
|
+
docgen.reset(new PresetDocGenerator(userdocs));
|
224
226
|
} else {
|
225
|
-
docgen
|
227
|
+
docgen.reset(new RawDocGenerator(o_minSize.result(), o_maxSize.result(), o_randomBody.numSpecified()));
|
226
228
|
}
|
227
229
|
} else {
|
228
230
|
if (o_writeJson.result()) {
|
229
231
|
if (userdocs.empty()) {
|
230
|
-
docgen
|
231
|
-
o_randomBody.numSpecified());
|
232
|
+
docgen.reset(new PlaceholderJsonGenerator(o_minSize.result(), o_maxSize.result(), specs,
|
233
|
+
o_randomBody.numSpecified()));
|
232
234
|
} else {
|
233
|
-
docgen
|
235
|
+
docgen.reset(new PlaceholderJsonGenerator(userdocs, specs));
|
234
236
|
}
|
235
237
|
} else {
|
236
238
|
if (userdocs.empty()) {
|
237
239
|
throw std::runtime_error("Must provide documents with placeholders!");
|
238
240
|
}
|
239
|
-
docgen
|
241
|
+
docgen.reset(new PlaceholderDocGenerator(userdocs, specs));
|
240
242
|
}
|
241
243
|
}
|
242
244
|
|
@@ -279,6 +281,7 @@ class Configuration
|
|
279
281
|
parser.addOption(o_persist);
|
280
282
|
parser.addOption(o_replicate);
|
281
283
|
parser.addOption(o_lock);
|
284
|
+
parser.addOption(o_randSpace);
|
282
285
|
params.addToParser(parser);
|
283
286
|
depr.addOptions(parser);
|
284
287
|
}
|
@@ -357,6 +360,10 @@ class Configuration
|
|
357
360
|
{
|
358
361
|
return o_exptime;
|
359
362
|
}
|
363
|
+
bool useRandSpacePerThread()
|
364
|
+
{
|
365
|
+
return o_randSpace;
|
366
|
+
}
|
360
367
|
|
361
368
|
uint32_t opsPerCycle{};
|
362
369
|
uint32_t sdOpsPerCmd{};
|
@@ -365,7 +372,7 @@ class Configuration
|
|
365
372
|
volatile int maxCycles{};
|
366
373
|
bool shouldPopulate{};
|
367
374
|
ConnParams params;
|
368
|
-
|
375
|
+
std::unique_ptr<DocGeneratorBase> docgen;
|
369
376
|
vector<string> collections{};
|
370
377
|
lcb_DURABILITY_LEVEL durabilityLevel{LCB_DURABILITYLEVEL_NONE};
|
371
378
|
int replicateTo{};
|
@@ -411,6 +418,7 @@ class Configuration
|
|
411
418
|
IntOption o_replicate;
|
412
419
|
|
413
420
|
IntOption o_lock;
|
421
|
+
BoolOption o_randSpace;
|
414
422
|
DeprecatedOptions depr;
|
415
423
|
} config;
|
416
424
|
|
@@ -569,12 +577,14 @@ class KeyGenerator : public OpGenerator
|
|
569
577
|
explicit KeyGenerator(int ix)
|
570
578
|
: OpGenerator(ix), m_gencount(0), m_force_sequential(false), m_in_population(config.shouldPopulate)
|
571
579
|
{
|
572
|
-
|
580
|
+
if(!config.useRandSpacePerThread()) {
|
581
|
+
srand(config.getRandomSeed());
|
582
|
+
}
|
573
583
|
|
574
|
-
m_genrandom
|
584
|
+
m_genrandom.reset(new SeqGenerator(config.firstKeyOffset(), config.getNumItems() + config.firstKeyOffset()));
|
575
585
|
|
576
|
-
m_gensequence
|
577
|
-
config.getNumThreads(), ix);
|
586
|
+
m_gensequence.reset(new SeqGenerator(config.firstKeyOffset(), config.getNumItems() + config.firstKeyOffset(),
|
587
|
+
config.getNumThreads(), ix));
|
578
588
|
|
579
589
|
if (m_in_population) {
|
580
590
|
m_force_sequential = true;
|
@@ -701,16 +711,16 @@ class KeyGenerator : public OpGenerator
|
|
701
711
|
}
|
702
712
|
}
|
703
713
|
|
704
|
-
SeqGenerator
|
705
|
-
SeqGenerator
|
714
|
+
std::unique_ptr<SeqGenerator> m_genrandom;
|
715
|
+
std::unique_ptr<SeqGenerator> m_gensequence;
|
706
716
|
size_t m_gencount;
|
707
717
|
|
708
718
|
bool m_force_sequential;
|
709
719
|
bool m_in_population;
|
710
720
|
NextOp::Mode m_mode_read;
|
711
721
|
NextOp::Mode m_mode_write;
|
712
|
-
GeneratorState
|
713
|
-
SubdocGeneratorState
|
722
|
+
std::unique_ptr<GeneratorState> m_local_genstate;
|
723
|
+
std::unique_ptr<SubdocGeneratorState> m_sdgenstate;
|
714
724
|
};
|
715
725
|
|
716
726
|
#define OPFLAGS_LOCKED 0x01
|
@@ -721,16 +731,15 @@ class ThreadContext
|
|
721
731
|
ThreadContext(lcb_INSTANCE *handle, int ix) : niter(0), instance(handle)
|
722
732
|
{
|
723
733
|
if (config.isNoop()) {
|
724
|
-
gen
|
734
|
+
gen.reset(new NoopGenerator(ix));
|
725
735
|
} else {
|
726
|
-
gen
|
736
|
+
gen.reset(new KeyGenerator(ix));
|
727
737
|
}
|
728
738
|
}
|
729
739
|
|
730
740
|
~ThreadContext()
|
731
741
|
{
|
732
|
-
|
733
|
-
gen = nullptr;
|
742
|
+
lcb_destroy(instance);
|
734
743
|
}
|
735
744
|
|
736
745
|
bool inPopulation()
|
@@ -993,7 +1002,7 @@ class ThreadContext
|
|
993
1002
|
previous_time = now;
|
994
1003
|
}
|
995
1004
|
|
996
|
-
OpGenerator
|
1005
|
+
std::unique_ptr<OpGenerator> gen;
|
997
1006
|
size_t niter;
|
998
1007
|
lcb_STATUS error{LCB_SUCCESS};
|
999
1008
|
lcb_INSTANCE *instance{nullptr};
|
@@ -1197,7 +1206,8 @@ static void storeCallback(lcb_INSTANCE *instance, int, const lcb_RESPSTORE *resp
|
|
1197
1206
|
updateOpsPerSecDisplay();
|
1198
1207
|
}
|
1199
1208
|
|
1200
|
-
std::list<
|
1209
|
+
std::list<InstanceCookie> cookies;
|
1210
|
+
std::list<ThreadContext> contexts;
|
1201
1211
|
|
1202
1212
|
extern "C" {
|
1203
1213
|
typedef void (*handler_t)(int);
|
@@ -1205,8 +1215,8 @@ typedef void (*handler_t)(int);
|
|
1205
1215
|
static void dump_metrics()
|
1206
1216
|
{
|
1207
1217
|
std::list<ThreadContext *>::iterator it;
|
1208
|
-
for (
|
1209
|
-
lcb_INSTANCE *instance =
|
1218
|
+
for (auto& context : contexts) {
|
1219
|
+
lcb_INSTANCE *instance = context.getInstance();
|
1210
1220
|
lcb_CMDDIAG *req;
|
1211
1221
|
lcb_cmddiag_create(&req);
|
1212
1222
|
lcb_cmddiag_prettify(req, true);
|
@@ -1284,10 +1294,6 @@ static void sigint_handler(int)
|
|
1284
1294
|
return;
|
1285
1295
|
}
|
1286
1296
|
|
1287
|
-
std::list<ThreadContext *>::iterator it;
|
1288
|
-
for (it = contexts.begin(); it != contexts.end(); ++it) {
|
1289
|
-
delete *it;
|
1290
|
-
}
|
1291
1297
|
contexts.clear();
|
1292
1298
|
exit(EXIT_FAILURE);
|
1293
1299
|
}
|
@@ -1315,10 +1321,10 @@ static void start_worker(ThreadContext *ctx)
|
|
1315
1321
|
exit(EXIT_FAILURE);
|
1316
1322
|
}
|
1317
1323
|
}
|
1318
|
-
static void join_worker(ThreadContext
|
1324
|
+
static void join_worker(ThreadContext& ctx)
|
1319
1325
|
{
|
1320
1326
|
void *arg = nullptr;
|
1321
|
-
int rc = pthread_join(ctx
|
1327
|
+
int rc = pthread_join(ctx.thr, &arg);
|
1322
1328
|
if (rc != 0) {
|
1323
1329
|
log("Couldn't join thread (%d)", errno);
|
1324
1330
|
exit(EXIT_FAILURE);
|
@@ -1332,7 +1338,7 @@ static void start_worker(ThreadContext *ctx)
|
|
1332
1338
|
{
|
1333
1339
|
ctx->run();
|
1334
1340
|
}
|
1335
|
-
static void join_worker(ThreadContext
|
1341
|
+
static void join_worker(ThreadContext& ctx)
|
1336
1342
|
{
|
1337
1343
|
(void)ctx;
|
1338
1344
|
}
|
@@ -1373,6 +1379,9 @@ int main(int argc, char **argv)
|
|
1373
1379
|
nthreads = 1;
|
1374
1380
|
}
|
1375
1381
|
#endif
|
1382
|
+
if(config.useRandSpacePerThread()) {
|
1383
|
+
srand(config.getRandomSeed());
|
1384
|
+
}
|
1376
1385
|
|
1377
1386
|
lcb_CREATEOPTS *options = nullptr;
|
1378
1387
|
ConnParams &cp = config.params;
|
@@ -1406,7 +1415,8 @@ int main(int argc, char **argv)
|
|
1406
1415
|
lcb_cntl(instance, LCB_CNTL_SET, LCB_CNTL_ENABLE_COLLECTIONS, &use);
|
1407
1416
|
}
|
1408
1417
|
|
1409
|
-
|
1418
|
+
cookies.emplace_back(instance);
|
1419
|
+
auto* cookie = &cookies.back();
|
1410
1420
|
|
1411
1421
|
lcb_connect(instance);
|
1412
1422
|
lcb_wait(instance, LCB_WAIT_DEFAULT);
|
@@ -1418,9 +1428,9 @@ int main(int argc, char **argv)
|
|
1418
1428
|
exit(EXIT_FAILURE);
|
1419
1429
|
}
|
1420
1430
|
|
1421
|
-
|
1431
|
+
contexts.emplace_back(instance, ii);
|
1432
|
+
auto* ctx = &contexts.back();
|
1422
1433
|
cookie->setContext(ctx);
|
1423
|
-
contexts.push_back(ctx);
|
1424
1434
|
start_worker(ctx);
|
1425
1435
|
}
|
1426
1436
|
|
package/deps/lcb/tools/cbc.cc
CHANGED
@@ -2023,6 +2023,35 @@ void AdminHandler::run()
|
|
2023
2023
|
printf("%s\n", resbuf.c_str());
|
2024
2024
|
}
|
2025
2025
|
|
2026
|
+
void BucketListHandler::run()
|
2027
|
+
{
|
2028
|
+
fprintf(stderr, "Requesting %s\n", getURI().c_str());
|
2029
|
+
HttpBaseHandler::run();
|
2030
|
+
if (o_raw.result()) {
|
2031
|
+
printf("%s\n", resbuf.c_str());
|
2032
|
+
} else {
|
2033
|
+
format();
|
2034
|
+
}
|
2035
|
+
}
|
2036
|
+
|
2037
|
+
void BucketListHandler::format()
|
2038
|
+
{
|
2039
|
+
Json::Value json;
|
2040
|
+
if (!Json::Reader().parse(resbuf, json)) {
|
2041
|
+
fprintf(stderr, "Failed to parse response as JSON, falling back to raw mode\n");
|
2042
|
+
printf("%s\n", resbuf.c_str());
|
2043
|
+
}
|
2044
|
+
|
2045
|
+
printf("%-20s%-10s%s\n", "Name", "Type", "Items");
|
2046
|
+
|
2047
|
+
for (Json::Value::ArrayIndex i = 0; i < json.size(); ++i) {
|
2048
|
+
const char *name = json[i]["name"].asString().c_str();
|
2049
|
+
const char *bucketType = json[i]["bucketType"].asString().c_str();
|
2050
|
+
const int itemCount = json[i]["basicStats"]["itemCount"].asInt();
|
2051
|
+
printf("%-20s%-10s%i\n", name, bucketType, itemCount);
|
2052
|
+
}
|
2053
|
+
}
|
2054
|
+
|
2026
2055
|
void BucketCreateHandler::run()
|
2027
2056
|
{
|
2028
2057
|
const string &name = getRequiredArg();
|
@@ -2278,6 +2307,7 @@ static const char *optionsOrder[] = {"help",
|
|
2278
2307
|
"analytics",
|
2279
2308
|
"search",
|
2280
2309
|
"admin",
|
2310
|
+
"bucket-list",
|
2281
2311
|
"bucket-create",
|
2282
2312
|
"bucket-delete",
|
2283
2313
|
"bucket-flush",
|
@@ -2369,6 +2399,7 @@ static void setupHandlers()
|
|
2369
2399
|
handlers_s["incr"] = new IncrHandler();
|
2370
2400
|
handlers_s["decr"] = new DecrHandler();
|
2371
2401
|
handlers_s["admin"] = new AdminHandler();
|
2402
|
+
handlers_s["bucket-list"] = new BucketListHandler();
|
2372
2403
|
handlers_s["bucket-create"] = new BucketCreateHandler();
|
2373
2404
|
handlers_s["bucket-delete"] = new BucketDeleteHandler();
|
2374
2405
|
handlers_s["bucket-flush"] = new BucketFlushHandler();
|
@@ -18,6 +18,7 @@
|
|
18
18
|
#include "contrib/lcb-jsoncpp/lcb-jsoncpp.h"
|
19
19
|
#include "placeholders.h"
|
20
20
|
#include <algorithm>
|
21
|
+
#include <memory>
|
21
22
|
#include <stdexcept>
|
22
23
|
|
23
24
|
namespace Pillowfight
|
@@ -78,8 +79,8 @@ class DocGeneratorBase
|
|
78
79
|
* @param cur_gen The index of the current generator thread
|
79
80
|
* @return An opaque state object. This should be deleted by the caller
|
80
81
|
*/
|
81
|
-
virtual GeneratorState
|
82
|
-
virtual SubdocGeneratorState
|
82
|
+
virtual std::unique_ptr<GeneratorState> createState(int total_gens, int cur_gen) const = 0;
|
83
|
+
virtual std::unique_ptr<SubdocGeneratorState> createSubdocState(int, int) const
|
83
84
|
{
|
84
85
|
return NULL;
|
85
86
|
}
|
@@ -164,9 +165,9 @@ class RawDocGenerator : public DocGeneratorBase
|
|
164
165
|
}
|
165
166
|
};
|
166
167
|
|
167
|
-
GeneratorState
|
168
|
+
std::unique_ptr<GeneratorState> createState(int, int) const
|
168
169
|
{
|
169
|
-
return new MyState(this);
|
170
|
+
return std::unique_ptr<GeneratorState>(new MyState(this));
|
170
171
|
}
|
171
172
|
|
172
173
|
private:
|
@@ -207,9 +208,9 @@ class PresetDocGenerator : public DocGeneratorBase
|
|
207
208
|
const PresetDocGenerator *m_parent;
|
208
209
|
};
|
209
210
|
|
210
|
-
GeneratorState
|
211
|
+
std::unique_ptr<GeneratorState> createState(int, int) const
|
211
212
|
{
|
212
|
-
return new MyState(this);
|
213
|
+
return std::unique_ptr<GeneratorState>(new MyState(this));
|
213
214
|
}
|
214
215
|
|
215
216
|
protected:
|
@@ -371,9 +372,9 @@ class JsonDocGenerator : public PresetDocGenerator
|
|
371
372
|
};
|
372
373
|
|
373
374
|
public:
|
374
|
-
virtual SubdocGeneratorState
|
375
|
+
virtual std::unique_ptr<SubdocGeneratorState> createSubdocState(int, int) const
|
375
376
|
{
|
376
|
-
return new SDGenstate(m_docs);
|
377
|
+
return std::unique_ptr<SubdocGeneratorState>(new SDGenstate(m_docs));
|
377
378
|
}
|
378
379
|
};
|
379
380
|
|
@@ -424,9 +425,9 @@ class PlaceholderDocGenerator : public DocGeneratorBase
|
|
424
425
|
}
|
425
426
|
|
426
427
|
public:
|
427
|
-
GeneratorState
|
428
|
+
std::unique_ptr<GeneratorState> createState(int total, int cur) const
|
428
429
|
{
|
429
|
-
return new MyState(this, total, cur);
|
430
|
+
return std::unique_ptr<GeneratorState>(new MyState(this, total, cur));
|
430
431
|
}
|
431
432
|
|
432
433
|
private:
|
package/dist/authenticators.d.ts
CHANGED
@@ -79,4 +79,4 @@ export declare class CertificateAuthenticator implements ICertificateAuthenticat
|
|
79
79
|
*
|
80
80
|
* @category Authentication
|
81
81
|
*/
|
82
|
-
export
|
82
|
+
export type Authenticator = IPasswordAuthenticator | ICertificateAuthenticator;
|
package/dist/binding.d.ts
CHANGED
@@ -64,10 +64,10 @@ export interface CppRequestSpan {
|
|
64
64
|
export interface CppTracer {
|
65
65
|
requestSpan(name: string, parent: CppRequestSpan | undefined): CppRequestSpan;
|
66
66
|
}
|
67
|
-
export
|
68
|
-
export
|
69
|
-
export
|
70
|
-
export
|
67
|
+
export type CppBytes = string | Buffer;
|
68
|
+
export type CppTranscoder = any;
|
69
|
+
export type CppCas = any;
|
70
|
+
export type CppMutationToken = any;
|
71
71
|
export interface CppErrorBase extends Error {
|
72
72
|
code: number;
|
73
73
|
}
|
@@ -125,7 +125,7 @@ export interface CppAnalyticsError extends CppErrorBase {
|
|
125
125
|
http_response_code: number;
|
126
126
|
http_response_body: string;
|
127
127
|
}
|
128
|
-
export
|
128
|
+
export type CppError = CppGenericError | CppKeyValueError | CppViewError | CppQueryError | CppSearchError | CppAnalyticsError;
|
129
129
|
export interface CppConnection {
|
130
130
|
new (connType: CppConnType, connStr: string, username: string | undefined, password: string | undefined, logFn: CppLogFunc, tracer: CppTracer | undefined, meter: CppMeter | undefined): any;
|
131
131
|
connect(callback: (err: CppError | null) => void): void;
|
package/dist/cluster.js
CHANGED
@@ -28,6 +28,12 @@ const utilities_1 = require("./utilities");
|
|
28
28
|
* @category Core
|
29
29
|
*/
|
30
30
|
class Cluster {
|
31
|
+
/**
|
32
|
+
@internal
|
33
|
+
*/
|
34
|
+
get transcoder() {
|
35
|
+
return this._transcoder;
|
36
|
+
}
|
31
37
|
/**
|
32
38
|
@internal
|
33
39
|
@deprecated Use the static sdk-level {@link connect} method instead.
|
@@ -94,12 +100,6 @@ class Cluster {
|
|
94
100
|
/**
|
95
101
|
@internal
|
96
102
|
*/
|
97
|
-
get transcoder() {
|
98
|
-
return this._transcoder;
|
99
|
-
}
|
100
|
-
/**
|
101
|
-
@internal
|
102
|
-
*/
|
103
103
|
static async connect(connStr, options, callback) {
|
104
104
|
return utilities_1.PromiseHelper.wrapAsync(async () => {
|
105
105
|
const cluster = new Cluster(connStr, options);
|
package/dist/collection.js
CHANGED
@@ -22,6 +22,12 @@ const utilities_1 = require("./utilities");
|
|
22
22
|
* @category Core
|
23
23
|
*/
|
24
24
|
class Collection {
|
25
|
+
/**
|
26
|
+
* @internal
|
27
|
+
*/
|
28
|
+
static get DEFAULT_NAME() {
|
29
|
+
return '_default';
|
30
|
+
}
|
25
31
|
/**
|
26
32
|
@internal
|
27
33
|
*/
|
@@ -30,12 +36,6 @@ class Collection {
|
|
30
36
|
this._name = collectionName;
|
31
37
|
this._conn = scope.conn;
|
32
38
|
}
|
33
|
-
/**
|
34
|
-
* @internal
|
35
|
-
*/
|
36
|
-
static get DEFAULT_NAME() {
|
37
|
-
return '_default';
|
38
|
-
}
|
39
39
|
/**
|
40
40
|
@internal
|
41
41
|
*/
|
package/dist/connection.d.ts
CHANGED
@@ -22,8 +22,8 @@ export interface ConnectionOptions {
|
|
22
22
|
meter?: Meter;
|
23
23
|
logFunc?: LogFunc;
|
24
24
|
}
|
25
|
-
|
26
|
-
|
25
|
+
type MergeArgs<A, B> = A extends [...infer Params] ? [...Params, ...(B extends [...infer Params2] ? Params2 : [])] : never;
|
26
|
+
type CppCbToNew<T extends (...fargs: any[]) => void> = T extends (...fargs: [
|
27
27
|
...infer FArgs,
|
28
28
|
(err: CppError | null, ...cbArgs: infer CbArgs) => void
|
29
29
|
]) => void ? [
|
package/dist/httpexecutor.d.ts
CHANGED
package/dist/scope.js
CHANGED
@@ -12,6 +12,12 @@ const utilities_1 = require("./utilities");
|
|
12
12
|
* @category Core
|
13
13
|
*/
|
14
14
|
class Scope {
|
15
|
+
/**
|
16
|
+
* @internal
|
17
|
+
*/
|
18
|
+
static get DEFAULT_NAME() {
|
19
|
+
return '_default';
|
20
|
+
}
|
15
21
|
/**
|
16
22
|
@internal
|
17
23
|
*/
|
@@ -20,12 +26,6 @@ class Scope {
|
|
20
26
|
this._name = scopeName;
|
21
27
|
this._conn = bucket.conn;
|
22
28
|
}
|
23
|
-
/**
|
24
|
-
* @internal
|
25
|
-
*/
|
26
|
-
static get DEFAULT_NAME() {
|
27
|
-
return '_default';
|
28
|
-
}
|
29
29
|
/**
|
30
30
|
@internal
|
31
31
|
*/
|
package/dist/sdspecs.js
CHANGED
@@ -103,11 +103,6 @@ exports.MutateInMacro = MutateInMacro;
|
|
103
103
|
* @category Key-Value
|
104
104
|
*/
|
105
105
|
class LookupInSpec {
|
106
|
-
constructor(op, path, flags) {
|
107
|
-
this._op = op;
|
108
|
-
this._path = path;
|
109
|
-
this._flags = flags;
|
110
|
-
}
|
111
106
|
/**
|
112
107
|
* BUG(JSCBC-756): Previously provided access to the expiry macro for a
|
113
108
|
* lookup-in operation.
|
@@ -117,6 +112,11 @@ class LookupInSpec {
|
|
117
112
|
static get Expiry() {
|
118
113
|
return LookupInMacro.Expiry;
|
119
114
|
}
|
115
|
+
constructor(op, path, flags) {
|
116
|
+
this._op = op;
|
117
|
+
this._path = path;
|
118
|
+
this._flags = flags;
|
119
|
+
}
|
120
120
|
static _create(op, path, options) {
|
121
121
|
if (!options) {
|
122
122
|
options = {};
|
@@ -175,12 +175,6 @@ exports.LookupInSpec = LookupInSpec;
|
|
175
175
|
* @category Key-Value
|
176
176
|
*/
|
177
177
|
class MutateInSpec {
|
178
|
-
constructor(op, path, flags, data) {
|
179
|
-
this._op = op;
|
180
|
-
this._path = path;
|
181
|
-
this._flags = flags;
|
182
|
-
this._data = data;
|
183
|
-
}
|
184
178
|
/**
|
185
179
|
* BUG(JSCBC-756): Previously provided access to the document cas mutate
|
186
180
|
* macro.
|
@@ -190,6 +184,12 @@ class MutateInSpec {
|
|
190
184
|
static get CasPlaceholder() {
|
191
185
|
return MutateInMacro.Cas;
|
192
186
|
}
|
187
|
+
constructor(op, path, flags, data) {
|
188
|
+
this._op = op;
|
189
|
+
this._path = path;
|
190
|
+
this._flags = flags;
|
191
|
+
this._data = data;
|
192
|
+
}
|
193
193
|
static _create(op, path, value, options) {
|
194
194
|
if (!options) {
|
195
195
|
options = {};
|
package/dist/searchquery.d.ts
CHANGED
@@ -20,7 +20,7 @@ export declare enum MatchOperator {
|
|
20
20
|
*
|
21
21
|
* @category Full Text Search
|
22
22
|
*/
|
23
|
-
export
|
23
|
+
export type GeoPoint = [longitude: number, latitude: number] | {
|
24
24
|
lon: number;
|
25
25
|
lat: number;
|
26
26
|
} | {
|
@@ -3,7 +3,7 @@ import EventEmitter from 'events';
|
|
3
3
|
/**
|
4
4
|
* @internal
|
5
5
|
*/
|
6
|
-
|
6
|
+
type PromisifyFunc<T> = (emitter: StreamablePromise<T>, resolve: (result: T) => void, reject: (err: Error) => void) => void;
|
7
7
|
/**
|
8
8
|
* @internal
|
9
9
|
*/
|
package/dist/usermanager.js
CHANGED
@@ -204,6 +204,15 @@ exports.User = User;
|
|
204
204
|
* @category Management
|
205
205
|
*/
|
206
206
|
class UserAndMetadata extends User {
|
207
|
+
/**
|
208
|
+
* Same as {@link effectiveRoles}, which already contains the roles
|
209
|
+
* including their origins.
|
210
|
+
*
|
211
|
+
* @deprecated Use {@link effectiveRoles} instead.
|
212
|
+
*/
|
213
|
+
get effectiveRolesAndOrigins() {
|
214
|
+
return this.effectiveRoles;
|
215
|
+
}
|
207
216
|
/**
|
208
217
|
* @internal
|
209
218
|
*/
|
@@ -214,15 +223,6 @@ class UserAndMetadata extends User {
|
|
214
223
|
this.passwordChanged = data.passwordChanged;
|
215
224
|
this.externalGroups = data.externalGroups;
|
216
225
|
}
|
217
|
-
/**
|
218
|
-
* Same as {@link effectiveRoles}, which already contains the roles
|
219
|
-
* including their origins.
|
220
|
-
*
|
221
|
-
* @deprecated Use {@link effectiveRoles} instead.
|
222
|
-
*/
|
223
|
-
get effectiveRolesAndOrigins() {
|
224
|
-
return this.effectiveRoles;
|
225
|
-
}
|
226
226
|
/**
|
227
227
|
* @internal
|
228
228
|
*/
|
package/dist/utilities.d.ts
CHANGED
package/dist/viewindexmanager.js
CHANGED
@@ -35,6 +35,14 @@ exports.DesignDocumentView = DesignDocumentView;
|
|
35
35
|
* @category Management
|
36
36
|
*/
|
37
37
|
class DesignDocument {
|
38
|
+
/**
|
39
|
+
* Same as {@link DesignDocumentView}.
|
40
|
+
*
|
41
|
+
* @deprecated Use {@link DesignDocumentView} directly.
|
42
|
+
*/
|
43
|
+
static get View() {
|
44
|
+
return DesignDocumentView;
|
45
|
+
}
|
38
46
|
/**
|
39
47
|
* @internal
|
40
48
|
*/
|
@@ -52,14 +60,6 @@ class DesignDocument {
|
|
52
60
|
this.name = data.name;
|
53
61
|
this.views = data.views || {};
|
54
62
|
}
|
55
|
-
/**
|
56
|
-
* Same as {@link DesignDocumentView}.
|
57
|
-
*
|
58
|
-
* @deprecated Use {@link DesignDocumentView} directly.
|
59
|
-
*/
|
60
|
-
static get View() {
|
61
|
-
return DesignDocumentView;
|
62
|
-
}
|
63
63
|
/**
|
64
64
|
* @internal
|
65
65
|
*/
|
package/package.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"bugs":{"url":"http://www.couchbase.com/issues/browse/JSCBC"},"description":"The official Couchbase Node.js Client Library.","engines":{"node":">=10.0.0"},"homepage":"http://www.couchbase.com/communities/nodejs","keywords":["couchbase","libcouchbase","memcached","nosql","json","document"],"main":"dist/couchbase.js","types":"dist/couchbase.d.ts","license":"Apache-2.0","name":"couchbase","dependencies":{"bindings":"^1.5.0","debug":"^4.3.4","nan":"^2.
|
1
|
+
{"bugs":{"url":"http://www.couchbase.com/issues/browse/JSCBC"},"description":"The official Couchbase Node.js Client Library.","engines":{"node":">=10.0.0"},"homepage":"http://www.couchbase.com/communities/nodejs","keywords":["couchbase","libcouchbase","memcached","nosql","json","document"],"main":"dist/couchbase.js","types":"dist/couchbase.d.ts","license":"Apache-2.0","name":"couchbase","dependencies":{"bindings":"^1.5.0","debug":"^4.3.4","nan":"^2.17.0","parse-duration":"^1.0.2","prebuild-install":"^7.1.1"},"devDependencies":{"@trivago/prettier-plugin-sort-imports":"^4.0.0","@tsconfig/node10":"^1.0.9","@types/bindings":"^1.5.1","@types/debug":"^4.1.7","@types/node":"^18.11.9","@typescript-eslint/eslint-plugin":"^5.42.0","@typescript-eslint/parser":"^5.42.0","chai":"^4.3.6","eslint":"^8.26.0","eslint-config-prettier":"^8.5.0","eslint-plugin-jsdoc":"^39.6.2","eslint-plugin-mocha":"^10.1.0","eslint-plugin-node":"^11.1.0","expose-gc":"^1.0.0","mocha":"^10.1.0","npm-check-updates":"^16.3.16","nyc":"^15.1.0","prebuild":"^11.0.4","prettier":"^2.7.1","segfault-handler":"^1.3.0","semver":"^7.3.8","ts-mocha":"^10.0.0","ts-node":"^10.9.1","typedoc":"^0.23.20","typescript":"^4.8.4","uuid":"^9.0.0"},"repository":{"type":"git","url":"http://github.com/couchbase/couchnode.git"},"version":"3.2.7","config":{"native":false},"scripts":{"install":"prebuild-install || node-gyp rebuild","build":"node-gyp build && tsc","rebuild":"node-gyp rebuild && tsc","prebuild":"prebuild --verbose --strip","prepare":"tsc","build-docs":"typedoc","test":"ts-mocha test/*.test.*","test-fast":"ts-mocha test/*.test.* -ig '(slow)'","cover":"nyc ts-mocha test/*.test.*","cover-fast":"nyc ts-mocha test/*.test.* -ig '(slow)'","lint":"eslint ./lib/ ./test/","check-deps":"ncu"}}
|