neo4j-driver 4.4.1 → 4.4.4
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/lib/browser/neo4j-web.js +131 -62
- package/lib/browser/neo4j-web.min.js +1 -1
- package/lib/driver.js +1 -1
- package/lib/transaction-rx.js +21 -0
- package/lib/version.js +1 -1
- package/package.json +4 -4
- package/types/session-rx.d.ts +1 -1
- package/types/transaction-rx.d.ts +2 -0
package/lib/browser/neo4j-web.js
CHANGED
|
@@ -727,25 +727,6 @@ var __assign = (this && this.__assign) || function () {
|
|
|
727
727
|
};
|
|
728
728
|
return __assign.apply(this, arguments);
|
|
729
729
|
};
|
|
730
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
731
|
-
if (k2 === undefined) k2 = k;
|
|
732
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
733
|
-
}) : (function(o, m, k, k2) {
|
|
734
|
-
if (k2 === undefined) k2 = k;
|
|
735
|
-
o[k2] = m[k];
|
|
736
|
-
}));
|
|
737
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
738
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
739
|
-
}) : function(o, v) {
|
|
740
|
-
o["default"] = v;
|
|
741
|
-
});
|
|
742
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
743
|
-
if (mod && mod.__esModule) return mod;
|
|
744
|
-
var result = {};
|
|
745
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
746
|
-
__setModuleDefault(result, mod);
|
|
747
|
-
return result;
|
|
748
|
-
};
|
|
749
730
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
750
731
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
751
732
|
};
|
|
@@ -769,11 +750,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
769
750
|
* limitations under the License.
|
|
770
751
|
*/
|
|
771
752
|
var bolt_protocol_v3_1 = __importDefault(require("./bolt-protocol-v3"));
|
|
772
|
-
var request_message_1 =
|
|
753
|
+
var request_message_1 = __importDefault(require("./request-message"));
|
|
773
754
|
var bolt_protocol_util_1 = require("./bolt-protocol-util");
|
|
774
755
|
var stream_observers_1 = require("./stream-observers");
|
|
775
756
|
var neo4j_driver_core_1 = require("neo4j-driver-core");
|
|
776
|
-
var Bookmark = neo4j_driver_core_1.internal.bookmark.Bookmark,
|
|
757
|
+
var Bookmark = neo4j_driver_core_1.internal.bookmark.Bookmark, _a = neo4j_driver_core_1.internal.constants, BOLT_PROTOCOL_V4_0 = _a.BOLT_PROTOCOL_V4_0, FETCH_ALL = _a.FETCH_ALL, TxConfig = neo4j_driver_core_1.internal.txConfig.TxConfig;
|
|
777
758
|
var CONTEXT = 'context';
|
|
778
759
|
var DATABASE = 'database';
|
|
779
760
|
var CALL_GET_ROUTING_TABLE_MULTI_DB = "CALL dbms.routing.getRoutingTable($" + CONTEXT + ", $" + DATABASE + ")";
|
|
@@ -805,7 +786,7 @@ var BoltProtocol = /** @class */ (function (_super) {
|
|
|
805
786
|
return observer;
|
|
806
787
|
};
|
|
807
788
|
BoltProtocol.prototype.run = function (query, parameters, _a) {
|
|
808
|
-
var _b = _a === void 0 ? {} : _a, bookmark = _b.bookmark, txConfig = _b.txConfig, database = _b.database, impersonatedUser = _b.impersonatedUser, mode = _b.mode, beforeKeys = _b.beforeKeys, afterKeys = _b.afterKeys, beforeError = _b.beforeError, afterError = _b.afterError, beforeComplete = _b.beforeComplete, afterComplete = _b.afterComplete, _c = _b.flush, flush = _c === void 0 ? true : _c, _d = _b.reactive, reactive = _d === void 0 ? false : _d, _e = _b.fetchSize, fetchSize = _e === void 0 ?
|
|
789
|
+
var _b = _a === void 0 ? {} : _a, bookmark = _b.bookmark, txConfig = _b.txConfig, database = _b.database, impersonatedUser = _b.impersonatedUser, mode = _b.mode, beforeKeys = _b.beforeKeys, afterKeys = _b.afterKeys, beforeError = _b.beforeError, afterError = _b.afterError, beforeComplete = _b.beforeComplete, afterComplete = _b.afterComplete, _c = _b.flush, flush = _c === void 0 ? true : _c, _d = _b.reactive, reactive = _d === void 0 ? false : _d, _e = _b.fetchSize, fetchSize = _e === void 0 ? FETCH_ALL : _e;
|
|
809
790
|
var observer = new stream_observers_1.ResultStreamObserver({
|
|
810
791
|
server: this._server,
|
|
811
792
|
reactive: reactive,
|
|
@@ -1116,25 +1097,6 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
1116
1097
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
1117
1098
|
};
|
|
1118
1099
|
})();
|
|
1119
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
1120
|
-
if (k2 === undefined) k2 = k;
|
|
1121
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
1122
|
-
}) : (function(o, m, k, k2) {
|
|
1123
|
-
if (k2 === undefined) k2 = k;
|
|
1124
|
-
o[k2] = m[k];
|
|
1125
|
-
}));
|
|
1126
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
1127
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
1128
|
-
}) : function(o, v) {
|
|
1129
|
-
o["default"] = v;
|
|
1130
|
-
});
|
|
1131
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
1132
|
-
if (mod && mod.__esModule) return mod;
|
|
1133
|
-
var result = {};
|
|
1134
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
1135
|
-
__setModuleDefault(result, mod);
|
|
1136
|
-
return result;
|
|
1137
|
-
};
|
|
1138
1100
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
1139
1101
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
1140
1102
|
};
|
|
@@ -1159,9 +1121,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
1159
1121
|
*/
|
|
1160
1122
|
var bolt_protocol_v4x3_1 = __importDefault(require("./bolt-protocol-v4x3"));
|
|
1161
1123
|
var neo4j_driver_core_1 = require("neo4j-driver-core");
|
|
1162
|
-
var request_message_1 =
|
|
1124
|
+
var request_message_1 = __importDefault(require("./request-message"));
|
|
1163
1125
|
var stream_observers_1 = require("./stream-observers");
|
|
1164
|
-
var
|
|
1126
|
+
var _a = neo4j_driver_core_1.internal.constants, BOLT_PROTOCOL_V4_4 = _a.BOLT_PROTOCOL_V4_4, FETCH_ALL = _a.FETCH_ALL, Bookmark = neo4j_driver_core_1.internal.bookmark.Bookmark;
|
|
1165
1127
|
var BoltProtocol = /** @class */ (function (_super) {
|
|
1166
1128
|
__extends(BoltProtocol, _super);
|
|
1167
1129
|
function BoltProtocol() {
|
|
@@ -1198,7 +1160,7 @@ var BoltProtocol = /** @class */ (function (_super) {
|
|
|
1198
1160
|
return observer;
|
|
1199
1161
|
};
|
|
1200
1162
|
BoltProtocol.prototype.run = function (query, parameters, _a) {
|
|
1201
|
-
var _b = _a === void 0 ? {} : _a, bookmark = _b.bookmark, txConfig = _b.txConfig, database = _b.database, mode = _b.mode, impersonatedUser = _b.impersonatedUser, beforeKeys = _b.beforeKeys, afterKeys = _b.afterKeys, beforeError = _b.beforeError, afterError = _b.afterError, beforeComplete = _b.beforeComplete, afterComplete = _b.afterComplete, _c = _b.flush, flush = _c === void 0 ? true : _c, _d = _b.reactive, reactive = _d === void 0 ? false : _d, _e = _b.fetchSize, fetchSize = _e === void 0 ?
|
|
1163
|
+
var _b = _a === void 0 ? {} : _a, bookmark = _b.bookmark, txConfig = _b.txConfig, database = _b.database, mode = _b.mode, impersonatedUser = _b.impersonatedUser, beforeKeys = _b.beforeKeys, afterKeys = _b.afterKeys, beforeError = _b.beforeError, afterError = _b.afterError, beforeComplete = _b.beforeComplete, afterComplete = _b.afterComplete, _c = _b.flush, flush = _c === void 0 ? true : _c, _d = _b.reactive, reactive = _d === void 0 ? false : _d, _e = _b.fetchSize, fetchSize = _e === void 0 ? FETCH_ALL : _e;
|
|
1202
1164
|
var observer = new stream_observers_1.ResultStreamObserver({
|
|
1203
1165
|
server: this._server,
|
|
1204
1166
|
reactive: reactive,
|
|
@@ -2205,8 +2167,8 @@ exports.ProcedureRouteObserver = exports.RouteObserver = exports.CompletedObserv
|
|
|
2205
2167
|
* limitations under the License.
|
|
2206
2168
|
*/
|
|
2207
2169
|
var neo4j_driver_core_1 = require("neo4j-driver-core");
|
|
2208
|
-
var request_message_1 = require("./request-message");
|
|
2209
2170
|
var routing_table_raw_1 = __importDefault(require("./routing-table-raw"));
|
|
2171
|
+
var FETCH_ALL = neo4j_driver_core_1.internal.constants.FETCH_ALL;
|
|
2210
2172
|
var PROTOCOL_ERROR = neo4j_driver_core_1.error.PROTOCOL_ERROR;
|
|
2211
2173
|
var StreamObserver = /** @class */ (function () {
|
|
2212
2174
|
function StreamObserver() {
|
|
@@ -2245,7 +2207,7 @@ var ResultStreamObserver = /** @class */ (function (_super) {
|
|
|
2245
2207
|
* @param {function(metadata: Object): Promise|void} param.afterComplete -
|
|
2246
2208
|
*/
|
|
2247
2209
|
function ResultStreamObserver(_a) {
|
|
2248
|
-
var _b = _a === void 0 ? {} : _a, _c = _b.reactive, reactive = _c === void 0 ? false : _c, moreFunction = _b.moreFunction, discardFunction = _b.discardFunction, _d = _b.fetchSize, fetchSize = _d === void 0 ?
|
|
2210
|
+
var _b = _a === void 0 ? {} : _a, _c = _b.reactive, reactive = _c === void 0 ? false : _c, moreFunction = _b.moreFunction, discardFunction = _b.discardFunction, _d = _b.fetchSize, fetchSize = _d === void 0 ? FETCH_ALL : _d, beforeError = _b.beforeError, afterError = _b.afterError, beforeKeys = _b.beforeKeys, afterKeys = _b.afterKeys, beforeComplete = _b.beforeComplete, afterComplete = _b.afterComplete, server = _b.server;
|
|
2249
2211
|
var _this = _super.call(this) || this;
|
|
2250
2212
|
_this._fieldKeys = null;
|
|
2251
2213
|
_this._fieldLookup = null;
|
|
@@ -2511,7 +2473,7 @@ var ResultStreamObserver = /** @class */ (function (_super) {
|
|
|
2511
2473
|
};
|
|
2512
2474
|
ResultStreamObserver.prototype._setupAuoPull = function (fetchSize) {
|
|
2513
2475
|
this._autoPull = true;
|
|
2514
|
-
if (fetchSize ===
|
|
2476
|
+
if (fetchSize === FETCH_ALL) {
|
|
2515
2477
|
this._lowRecordWatermark = Number.MAX_VALUE; // we shall always lower than this number to enable auto pull
|
|
2516
2478
|
this._highRecordWatermark = Number.MAX_VALUE; // we shall never reach this number to disable auto pull
|
|
2517
2479
|
}
|
|
@@ -2749,7 +2711,7 @@ var _states = {
|
|
|
2749
2711
|
}
|
|
2750
2712
|
};
|
|
2751
2713
|
|
|
2752
|
-
},{"./
|
|
2714
|
+
},{"./routing-table-raw":15,"neo4j-driver-core":59}],17:[function(require,module,exports){
|
|
2753
2715
|
"use strict";
|
|
2754
2716
|
/**
|
|
2755
2717
|
* Copyright (c) "Neo4j"
|
|
@@ -8013,6 +7975,7 @@ var Pool = /** @class */ (function () {
|
|
|
8013
7975
|
this._pendingCreates = {};
|
|
8014
7976
|
this._acquireRequests = {};
|
|
8015
7977
|
this._activeResourceCounts = {};
|
|
7978
|
+
this._poolState = {};
|
|
8016
7979
|
this._release = this._release.bind(this);
|
|
8017
7980
|
this._log = log;
|
|
8018
7981
|
this._closed = false;
|
|
@@ -8127,7 +8090,8 @@ var Pool = /** @class */ (function () {
|
|
|
8127
8090
|
};
|
|
8128
8091
|
Pool.prototype._acquire = function (address) {
|
|
8129
8092
|
return __awaiter(this, void 0, void 0, function () {
|
|
8130
|
-
var key, pool, resource_1, numConnections, resource;
|
|
8093
|
+
var key, pool, poolState, resource_1, numConnections, resource;
|
|
8094
|
+
var _this = this;
|
|
8131
8095
|
return __generator(this, function (_a) {
|
|
8132
8096
|
switch (_a.label) {
|
|
8133
8097
|
case 0:
|
|
@@ -8136,10 +8100,13 @@ var Pool = /** @class */ (function () {
|
|
|
8136
8100
|
}
|
|
8137
8101
|
key = address.asKey();
|
|
8138
8102
|
pool = this._pools[key];
|
|
8103
|
+
poolState = this._poolState[key];
|
|
8139
8104
|
if (!pool) {
|
|
8140
8105
|
pool = [];
|
|
8106
|
+
poolState = new PoolState();
|
|
8141
8107
|
this._pools[key] = pool;
|
|
8142
8108
|
this._pendingCreates[key] = 0;
|
|
8109
|
+
this._poolState[key] = poolState;
|
|
8143
8110
|
}
|
|
8144
8111
|
_a.label = 1;
|
|
8145
8112
|
case 1:
|
|
@@ -8175,7 +8142,7 @@ var Pool = /** @class */ (function () {
|
|
|
8175
8142
|
_a.label = 6;
|
|
8176
8143
|
case 6:
|
|
8177
8144
|
_a.trys.push([6, , 8, 9]);
|
|
8178
|
-
return [4 /*yield*/, this._create(address,
|
|
8145
|
+
return [4 /*yield*/, this._create(address, function (address, resource) { return _this._release(poolState, address, resource); })];
|
|
8179
8146
|
case 7:
|
|
8180
8147
|
// Invoke callback that creates actual connection
|
|
8181
8148
|
resource = _a.sent();
|
|
@@ -8192,7 +8159,7 @@ var Pool = /** @class */ (function () {
|
|
|
8192
8159
|
});
|
|
8193
8160
|
});
|
|
8194
8161
|
};
|
|
8195
|
-
Pool.prototype._release = function (address, resource) {
|
|
8162
|
+
Pool.prototype._release = function (poolState, address, resource) {
|
|
8196
8163
|
return __awaiter(this, void 0, void 0, function () {
|
|
8197
8164
|
var key, pool;
|
|
8198
8165
|
var _this = this;
|
|
@@ -8201,7 +8168,7 @@ var Pool = /** @class */ (function () {
|
|
|
8201
8168
|
case 0:
|
|
8202
8169
|
key = address.asKey();
|
|
8203
8170
|
pool = this._pools[key];
|
|
8204
|
-
if (!pool) return [3 /*break*/, 4];
|
|
8171
|
+
if (!(pool && poolState && poolState.isActive())) return [3 /*break*/, 4];
|
|
8205
8172
|
if (!!this._validate(resource)) return [3 /*break*/, 2];
|
|
8206
8173
|
if (this._log.isDebugEnabled()) {
|
|
8207
8174
|
this._log.debug(resource + " destroyed and can't be released to the pool " + key + " because it is not functional");
|
|
@@ -8251,11 +8218,12 @@ var Pool = /** @class */ (function () {
|
|
|
8251
8218
|
};
|
|
8252
8219
|
Pool.prototype._purgeKey = function (key) {
|
|
8253
8220
|
return __awaiter(this, void 0, void 0, function () {
|
|
8254
|
-
var pool, resource;
|
|
8221
|
+
var pool, poolState, resource;
|
|
8255
8222
|
return __generator(this, function (_a) {
|
|
8256
8223
|
switch (_a.label) {
|
|
8257
8224
|
case 0:
|
|
8258
8225
|
pool = this._pools[key] || [];
|
|
8226
|
+
poolState = this._poolState[key] || new PoolState();
|
|
8259
8227
|
_a.label = 1;
|
|
8260
8228
|
case 1:
|
|
8261
8229
|
if (!pool.length) return [3 /*break*/, 3];
|
|
@@ -8268,7 +8236,9 @@ var Pool = /** @class */ (function () {
|
|
|
8268
8236
|
_a.sent();
|
|
8269
8237
|
return [3 /*break*/, 1];
|
|
8270
8238
|
case 3:
|
|
8239
|
+
poolState.close();
|
|
8271
8240
|
delete this._pools[key];
|
|
8241
|
+
delete this._poolState[key];
|
|
8272
8242
|
return [2 /*return*/];
|
|
8273
8243
|
}
|
|
8274
8244
|
});
|
|
@@ -8278,6 +8248,7 @@ var Pool = /** @class */ (function () {
|
|
|
8278
8248
|
var _this = this;
|
|
8279
8249
|
var key = address.asKey();
|
|
8280
8250
|
var requests = this._acquireRequests[key];
|
|
8251
|
+
var poolState = this._poolState[key];
|
|
8281
8252
|
if (requests) {
|
|
8282
8253
|
var pendingRequest_1 = requests.shift(); // pop a pending acquire request
|
|
8283
8254
|
if (pendingRequest_1) {
|
|
@@ -8294,7 +8265,7 @@ var Pool = /** @class */ (function () {
|
|
|
8294
8265
|
if (pendingRequest_1.isCompleted()) {
|
|
8295
8266
|
// request has been completed, most likely failed by a timeout
|
|
8296
8267
|
// return the acquired resource back to the pool
|
|
8297
|
-
_this._release(address, resource);
|
|
8268
|
+
_this._release(poolState, address, resource);
|
|
8298
8269
|
}
|
|
8299
8270
|
else {
|
|
8300
8271
|
// request is still pending and can be resolved with the newly acquired resource
|
|
@@ -8367,6 +8338,18 @@ var PendingRequest = /** @class */ (function () {
|
|
|
8367
8338
|
};
|
|
8368
8339
|
return PendingRequest;
|
|
8369
8340
|
}());
|
|
8341
|
+
var PoolState = /** @class */ (function () {
|
|
8342
|
+
function PoolState() {
|
|
8343
|
+
this._active = true;
|
|
8344
|
+
}
|
|
8345
|
+
PoolState.prototype.isActive = function () {
|
|
8346
|
+
return this._active;
|
|
8347
|
+
};
|
|
8348
|
+
PoolState.prototype.close = function () {
|
|
8349
|
+
this._active = false;
|
|
8350
|
+
};
|
|
8351
|
+
return PoolState;
|
|
8352
|
+
}());
|
|
8370
8353
|
exports.default = Pool;
|
|
8371
8354
|
|
|
8372
8355
|
},{"./pool-config":48,"neo4j-driver-core":59}],50:[function(require,module,exports){
|
|
@@ -8926,6 +8909,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
8926
8909
|
*/
|
|
8927
8910
|
var Connection = /** @class */ (function () {
|
|
8928
8911
|
function Connection() {
|
|
8912
|
+
this.id = "";
|
|
8913
|
+
this.databaseId = "";
|
|
8929
8914
|
}
|
|
8930
8915
|
/**
|
|
8931
8916
|
* @returns {boolean} whether this connection is in a working condition
|
|
@@ -9931,9 +9916,6 @@ var INT_CACHE = new Map();
|
|
|
9931
9916
|
* @param {number} low The low (signed) 32 bits of the long
|
|
9932
9917
|
* @param {number} high The high (signed) 32 bits of the long
|
|
9933
9918
|
*
|
|
9934
|
-
* @deprecated This class will be removed or made internal in a future version of the driver.
|
|
9935
|
-
* Please configure your driver to use BigInt instead.
|
|
9936
|
-
*
|
|
9937
9919
|
* @constructor
|
|
9938
9920
|
*/
|
|
9939
9921
|
var Integer = /** @class */ (function () {
|
|
@@ -13917,7 +13899,7 @@ var QueryStatistics = /** @class */ (function () {
|
|
|
13917
13899
|
indexesAdded: 0,
|
|
13918
13900
|
indexesRemoved: 0,
|
|
13919
13901
|
constraintsAdded: 0,
|
|
13920
|
-
constraintsRemoved: 0
|
|
13902
|
+
constraintsRemoved: 0,
|
|
13921
13903
|
};
|
|
13922
13904
|
this._systemUpdates = 0;
|
|
13923
13905
|
Object.keys(statistics).forEach(function (index) {
|
|
@@ -13929,6 +13911,12 @@ var QueryStatistics = /** @class */ (function () {
|
|
|
13929
13911
|
else if (camelCaseIndex === 'systemUpdates') {
|
|
13930
13912
|
_this._systemUpdates = intValue(statistics[index]);
|
|
13931
13913
|
}
|
|
13914
|
+
else if (camelCaseIndex === 'containsSystemUpdates') {
|
|
13915
|
+
_this._containsSystemUpdates = statistics[index];
|
|
13916
|
+
}
|
|
13917
|
+
else if (camelCaseIndex === 'containsUpdates') {
|
|
13918
|
+
_this._containsUpdates = statistics[index];
|
|
13919
|
+
}
|
|
13932
13920
|
});
|
|
13933
13921
|
this._stats = Object.freeze(this._stats);
|
|
13934
13922
|
}
|
|
@@ -13938,7 +13926,8 @@ var QueryStatistics = /** @class */ (function () {
|
|
|
13938
13926
|
*/
|
|
13939
13927
|
QueryStatistics.prototype.containsUpdates = function () {
|
|
13940
13928
|
var _this = this;
|
|
13941
|
-
return
|
|
13929
|
+
return this._containsUpdates !== undefined ?
|
|
13930
|
+
this._containsUpdates : (Object.keys(this._stats).reduce(function (last, current) {
|
|
13942
13931
|
return last + _this._stats[current];
|
|
13943
13932
|
}, 0) > 0);
|
|
13944
13933
|
};
|
|
@@ -13954,7 +13943,8 @@ var QueryStatistics = /** @class */ (function () {
|
|
|
13954
13943
|
* @returns {boolean} - If the system database get updated or not.
|
|
13955
13944
|
*/
|
|
13956
13945
|
QueryStatistics.prototype.containsSystemUpdates = function () {
|
|
13957
|
-
return this.
|
|
13946
|
+
return this._containsSystemUpdates !== undefined ?
|
|
13947
|
+
this._containsSystemUpdates : this._systemUpdates > 0;
|
|
13958
13948
|
};
|
|
13959
13949
|
/**
|
|
13960
13950
|
* @returns {number} - Number of system updates
|
|
@@ -15403,6 +15393,42 @@ function verifyStandardDateAndNanos(standardDate, nanosecond) {
|
|
|
15403
15393
|
|
|
15404
15394
|
},{"./error":57,"./integer":60,"./internal/temporal-util":73,"./internal/util":77}],85:[function(require,module,exports){
|
|
15405
15395
|
"use strict";
|
|
15396
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15397
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
15398
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15399
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
15400
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
15401
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
15402
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
15403
|
+
});
|
|
15404
|
+
};
|
|
15405
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
15406
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
15407
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
15408
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15409
|
+
function step(op) {
|
|
15410
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
15411
|
+
while (_) try {
|
|
15412
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
15413
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
15414
|
+
switch (op[0]) {
|
|
15415
|
+
case 0: case 1: t = op; break;
|
|
15416
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
15417
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
15418
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
15419
|
+
default:
|
|
15420
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
15421
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
15422
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
15423
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
15424
|
+
if (t[2]) _.ops.pop();
|
|
15425
|
+
_.trys.pop(); continue;
|
|
15426
|
+
}
|
|
15427
|
+
op = body.call(thisArg, _);
|
|
15428
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
15429
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
15430
|
+
}
|
|
15431
|
+
};
|
|
15406
15432
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
15407
15433
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15408
15434
|
};
|
|
@@ -15571,6 +15597,28 @@ var Transaction = /** @class */ (function () {
|
|
|
15571
15597
|
Transaction.prototype.isOpen = function () {
|
|
15572
15598
|
return this._state === _states.ACTIVE;
|
|
15573
15599
|
};
|
|
15600
|
+
/**
|
|
15601
|
+
* Closes the transaction
|
|
15602
|
+
*
|
|
15603
|
+
* This method will roll back the transaction if it is not already committed or rolled back.
|
|
15604
|
+
*
|
|
15605
|
+
* @returns {Promise<void>} An empty promise if closed successfully or error if any error happened during
|
|
15606
|
+
*/
|
|
15607
|
+
Transaction.prototype.close = function () {
|
|
15608
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
15609
|
+
return __generator(this, function (_a) {
|
|
15610
|
+
switch (_a.label) {
|
|
15611
|
+
case 0:
|
|
15612
|
+
if (!this.isOpen()) return [3 /*break*/, 2];
|
|
15613
|
+
return [4 /*yield*/, this.rollback()];
|
|
15614
|
+
case 1:
|
|
15615
|
+
_a.sent();
|
|
15616
|
+
_a.label = 2;
|
|
15617
|
+
case 2: return [2 /*return*/];
|
|
15618
|
+
}
|
|
15619
|
+
});
|
|
15620
|
+
});
|
|
15621
|
+
};
|
|
15574
15622
|
Transaction.prototype._onErrorCallback = function (err) {
|
|
15575
15623
|
// error will be "acknowledged" by sending a RESET message
|
|
15576
15624
|
// database will then forget about this transaction and cleanup all corresponding resources
|
|
@@ -28791,7 +28839,7 @@ var Driver = /*#__PURE__*/function (_CoreDriver) {
|
|
|
28791
28839
|
return new _sessionRx["default"]({
|
|
28792
28840
|
session: this._newSession({
|
|
28793
28841
|
defaultAccessMode: defaultAccessMode,
|
|
28794
|
-
|
|
28842
|
+
bookmarkOrBookmarks: bookmarks,
|
|
28795
28843
|
database: database,
|
|
28796
28844
|
impersonatedUser: impersonatedUser,
|
|
28797
28845
|
reactive: true,
|
|
@@ -29990,6 +30038,27 @@ var RxTransaction = /*#__PURE__*/function () {
|
|
|
29990
30038
|
});
|
|
29991
30039
|
});
|
|
29992
30040
|
}
|
|
30041
|
+
/**
|
|
30042
|
+
* Closes the transaction
|
|
30043
|
+
*
|
|
30044
|
+
* This method will roll back the transaction if it is not already committed or rolled back.
|
|
30045
|
+
*
|
|
30046
|
+
* @returns {Observable} - An empty observable
|
|
30047
|
+
*/
|
|
30048
|
+
|
|
30049
|
+
}, {
|
|
30050
|
+
key: "close",
|
|
30051
|
+
value: function close() {
|
|
30052
|
+
var _this4 = this;
|
|
30053
|
+
|
|
30054
|
+
return new _rxjs.Observable(function (observer) {
|
|
30055
|
+
_this4._txc.close().then(function () {
|
|
30056
|
+
observer.complete();
|
|
30057
|
+
})["catch"](function (err) {
|
|
30058
|
+
return observer.error(err);
|
|
30059
|
+
});
|
|
30060
|
+
});
|
|
30061
|
+
}
|
|
29993
30062
|
}]);
|
|
29994
30063
|
return RxTransaction;
|
|
29995
30064
|
}();
|
|
@@ -30030,7 +30099,7 @@ exports["default"] = void 0;
|
|
|
30030
30099
|
// This is set up this way to keep the version in the code in
|
|
30031
30100
|
// sync with the npm package version, and to allow the build
|
|
30032
30101
|
// system to control version names at packaging time.
|
|
30033
|
-
var _default = '
|
|
30102
|
+
var _default = '4.4.4';
|
|
30034
30103
|
exports["default"] = _default;
|
|
30035
30104
|
|
|
30036
30105
|
},{}]},{},[302])(302)
|