UNPKG

4.73 kBJavaScriptView Raw
1"use strict";
2var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3 if (k2 === undefined) k2 = k;
4 var desc = Object.getOwnPropertyDescriptor(m, k);
5 if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6 desc = { enumerable: true, get: function() { return m[k]; } };
7 }
8 Object.defineProperty(o, k2, desc);
9}) : (function(o, m, k, k2) {
10 if (k2 === undefined) k2 = k;
11 o[k2] = m[k];
12}));
13var __exportStar = (this && this.__exportStar) || function(m, exports) {
14 for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15};
16var __importDefault = (this && this.__importDefault) || function (mod) {
17 return (mod && mod.__esModule) ? mod : { "default": mod };
18};
19Object.defineProperty(exports, "__esModule", { value: true });
20exports.shutdownLogger = exports.enableProtocolLoggerToSaveNetworkTrafficToFile = exports.cbppMetadata = exports.cbppVersion = exports.lcbVersion = exports.connect = void 0;
21const binding_1 = __importDefault(require("./binding"));
22const cluster_1 = require("./cluster");
23/**
24 * Acts as the entrypoint into the rest of the library. Connecting to the cluster
25 * and exposing the various services and features.
26 *
27 * @param connStr The connection string to use to connect to the cluster.
28 * @param options Optional parameters for this operation.
29 * @param callback A node-style callback to be invoked after execution.
30 * @category Core
31 */
32async function connect(connStr, options, callback) {
33 return cluster_1.Cluster.connect(connStr, options, callback);
34}
35exports.connect = connect;
36/**
37 * Exposes the underlying couchbase++ library version that is being used by the
38 * SDK to perform I/O with the cluster.
39 *
40 * @deprecated Use {@link cbppVersion} instead.
41 */
42exports.lcbVersion = binding_1.default.cbppVersion;
43/**
44 * Exposes the underlying couchbase++ library version that is being used by the
45 * SDK to perform I/O with the cluster.
46 */
47exports.cbppVersion = binding_1.default.cbppVersion;
48exports.cbppMetadata = binding_1.default.cbppMetadata;
49/**
50 * Volatile: This API is subject to change at any time.
51 *
52 * Exposes the underlying couchbase++ library protocol logger. This method is for
53 * logging/debugging purposes and must be used with caution as network details will
54 * be logged to the provided file.
55 *
56 * @param filename Name of file protocol logger will save logging details.
57 */
58function enableProtocolLoggerToSaveNetworkTrafficToFile(filename) {
59 binding_1.default.enableProtocolLogger(filename);
60}
61exports.enableProtocolLoggerToSaveNetworkTrafficToFile = enableProtocolLoggerToSaveNetworkTrafficToFile;
62/**
63 * Volatile: This API is subject to change at any time.
64 *
65 * Shutdowns the underlying couchbase++ logger.
66 *
67 */
68function shutdownLogger() {
69 binding_1.default.shutdownLogger();
70}
71exports.shutdownLogger = shutdownLogger;
72__exportStar(require("./analyticsindexmanager"), exports);
73__exportStar(require("./analyticstypes"), exports);
74__exportStar(require("./authenticators"), exports);
75__exportStar(require("./binarycollection"), exports);
76__exportStar(require("./bucket"), exports);
77__exportStar(require("./bucketmanager"), exports);
78__exportStar(require("./cluster"), exports);
79__exportStar(require("./collection"), exports);
80__exportStar(require("./collectionmanager"), exports);
81__exportStar(require("./crudoptypes"), exports);
82__exportStar(require("./datastructures"), exports);
83__exportStar(require("./diagnosticstypes"), exports);
84__exportStar(require("./errorcontexts"), exports);
85__exportStar(require("./errors"), exports);
86__exportStar(require("./eventingfunctionmanager"), exports);
87__exportStar(require("./generaltypes"), exports);
88__exportStar(require("./mutationstate"), exports);
89__exportStar(require("./queryindexmanager"), exports);
90__exportStar(require("./querytypes"), exports);
91__exportStar(require("./scope"), exports);
92__exportStar(require("./scopesearchindexmanager"), exports);
93__exportStar(require("./sdspecs"), exports);
94__exportStar(require("./searchfacet"), exports);
95__exportStar(require("./searchindexmanager"), exports);
96__exportStar(require("./searchquery"), exports);
97__exportStar(require("./searchsort"), exports);
98__exportStar(require("./searchtypes"), exports);
99__exportStar(require("./streamablepromises"), exports);
100__exportStar(require("./transactions"), exports);
101__exportStar(require("./transcoders"), exports);
102__exportStar(require("./usermanager"), exports);
103__exportStar(require("./vectorsearch"), exports);
104__exportStar(require("./viewexecutor"), exports);
105__exportStar(require("./viewindexmanager"), exports);
106__exportStar(require("./viewtypes"), exports);