neo4j-driver 4.4.2 → 4.4.3
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
CHANGED
|
@@ -8168,7 +8168,7 @@ var Pool = /** @class */ (function () {
|
|
|
8168
8168
|
case 0:
|
|
8169
8169
|
key = address.asKey();
|
|
8170
8170
|
pool = this._pools[key];
|
|
8171
|
-
if (!(pool && poolState.isActive())) return [3 /*break*/, 4];
|
|
8171
|
+
if (!(pool && poolState && poolState.isActive())) return [3 /*break*/, 4];
|
|
8172
8172
|
if (!!this._validate(resource)) return [3 /*break*/, 2];
|
|
8173
8173
|
if (this._log.isDebugEnabled()) {
|
|
8174
8174
|
this._log.debug(resource + " destroyed and can't be released to the pool " + key + " because it is not functional");
|
|
@@ -13902,7 +13902,7 @@ var QueryStatistics = /** @class */ (function () {
|
|
|
13902
13902
|
indexesAdded: 0,
|
|
13903
13903
|
indexesRemoved: 0,
|
|
13904
13904
|
constraintsAdded: 0,
|
|
13905
|
-
constraintsRemoved: 0
|
|
13905
|
+
constraintsRemoved: 0,
|
|
13906
13906
|
};
|
|
13907
13907
|
this._systemUpdates = 0;
|
|
13908
13908
|
Object.keys(statistics).forEach(function (index) {
|
|
@@ -13914,6 +13914,12 @@ var QueryStatistics = /** @class */ (function () {
|
|
|
13914
13914
|
else if (camelCaseIndex === 'systemUpdates') {
|
|
13915
13915
|
_this._systemUpdates = intValue(statistics[index]);
|
|
13916
13916
|
}
|
|
13917
|
+
else if (camelCaseIndex === 'containsSystemUpdates') {
|
|
13918
|
+
_this._containsSystemUpdates = statistics[index];
|
|
13919
|
+
}
|
|
13920
|
+
else if (camelCaseIndex === 'containsUpdates') {
|
|
13921
|
+
_this._containsUpdates = statistics[index];
|
|
13922
|
+
}
|
|
13917
13923
|
});
|
|
13918
13924
|
this._stats = Object.freeze(this._stats);
|
|
13919
13925
|
}
|
|
@@ -13923,7 +13929,8 @@ var QueryStatistics = /** @class */ (function () {
|
|
|
13923
13929
|
*/
|
|
13924
13930
|
QueryStatistics.prototype.containsUpdates = function () {
|
|
13925
13931
|
var _this = this;
|
|
13926
|
-
return
|
|
13932
|
+
return this._containsUpdates !== undefined ?
|
|
13933
|
+
this._containsUpdates : (Object.keys(this._stats).reduce(function (last, current) {
|
|
13927
13934
|
return last + _this._stats[current];
|
|
13928
13935
|
}, 0) > 0);
|
|
13929
13936
|
};
|
|
@@ -13939,7 +13946,8 @@ var QueryStatistics = /** @class */ (function () {
|
|
|
13939
13946
|
* @returns {boolean} - If the system database get updated or not.
|
|
13940
13947
|
*/
|
|
13941
13948
|
QueryStatistics.prototype.containsSystemUpdates = function () {
|
|
13942
|
-
return this.
|
|
13949
|
+
return this._containsSystemUpdates !== undefined ?
|
|
13950
|
+
this._containsSystemUpdates : this._systemUpdates > 0;
|
|
13943
13951
|
};
|
|
13944
13952
|
/**
|
|
13945
13953
|
* @returns {number} - Number of system updates
|
|
@@ -15388,6 +15396,42 @@ function verifyStandardDateAndNanos(standardDate, nanosecond) {
|
|
|
15388
15396
|
|
|
15389
15397
|
},{"./error":57,"./integer":60,"./internal/temporal-util":73,"./internal/util":77}],85:[function(require,module,exports){
|
|
15390
15398
|
"use strict";
|
|
15399
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15400
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
15401
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15402
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
15403
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
15404
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
15405
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
15406
|
+
});
|
|
15407
|
+
};
|
|
15408
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
15409
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
15410
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
15411
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15412
|
+
function step(op) {
|
|
15413
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
15414
|
+
while (_) try {
|
|
15415
|
+
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;
|
|
15416
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
15417
|
+
switch (op[0]) {
|
|
15418
|
+
case 0: case 1: t = op; break;
|
|
15419
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
15420
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
15421
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
15422
|
+
default:
|
|
15423
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
15424
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
15425
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
15426
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
15427
|
+
if (t[2]) _.ops.pop();
|
|
15428
|
+
_.trys.pop(); continue;
|
|
15429
|
+
}
|
|
15430
|
+
op = body.call(thisArg, _);
|
|
15431
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
15432
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
15433
|
+
}
|
|
15434
|
+
};
|
|
15391
15435
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
15392
15436
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15393
15437
|
};
|
|
@@ -15556,6 +15600,28 @@ var Transaction = /** @class */ (function () {
|
|
|
15556
15600
|
Transaction.prototype.isOpen = function () {
|
|
15557
15601
|
return this._state === _states.ACTIVE;
|
|
15558
15602
|
};
|
|
15603
|
+
/**
|
|
15604
|
+
* Closes the transaction
|
|
15605
|
+
*
|
|
15606
|
+
* This method will roll back the transaction if it is not already committed or rolled back.
|
|
15607
|
+
*
|
|
15608
|
+
* @returns {Promise<void>} An empty promise if closed successfully or error if any error happened during
|
|
15609
|
+
*/
|
|
15610
|
+
Transaction.prototype.close = function () {
|
|
15611
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
15612
|
+
return __generator(this, function (_a) {
|
|
15613
|
+
switch (_a.label) {
|
|
15614
|
+
case 0:
|
|
15615
|
+
if (!this.isOpen()) return [3 /*break*/, 2];
|
|
15616
|
+
return [4 /*yield*/, this.rollback()];
|
|
15617
|
+
case 1:
|
|
15618
|
+
_a.sent();
|
|
15619
|
+
_a.label = 2;
|
|
15620
|
+
case 2: return [2 /*return*/];
|
|
15621
|
+
}
|
|
15622
|
+
});
|
|
15623
|
+
});
|
|
15624
|
+
};
|
|
15559
15625
|
Transaction.prototype._onErrorCallback = function (err) {
|
|
15560
15626
|
// error will be "acknowledged" by sending a RESET message
|
|
15561
15627
|
// database will then forget about this transaction and cleanup all corresponding resources
|
|
@@ -29975,6 +30041,27 @@ var RxTransaction = /*#__PURE__*/function () {
|
|
|
29975
30041
|
});
|
|
29976
30042
|
});
|
|
29977
30043
|
}
|
|
30044
|
+
/**
|
|
30045
|
+
* Closes the transaction
|
|
30046
|
+
*
|
|
30047
|
+
* This method will roll back the transaction if it is not already committed or rolled back.
|
|
30048
|
+
*
|
|
30049
|
+
* @returns {Observable} - An empty observable
|
|
30050
|
+
*/
|
|
30051
|
+
|
|
30052
|
+
}, {
|
|
30053
|
+
key: "close",
|
|
30054
|
+
value: function close() {
|
|
30055
|
+
var _this4 = this;
|
|
30056
|
+
|
|
30057
|
+
return new _rxjs.Observable(function (observer) {
|
|
30058
|
+
_this4._txc.close().then(function () {
|
|
30059
|
+
observer.complete();
|
|
30060
|
+
})["catch"](function (err) {
|
|
30061
|
+
return observer.error(err);
|
|
30062
|
+
});
|
|
30063
|
+
});
|
|
30064
|
+
}
|
|
29978
30065
|
}]);
|
|
29979
30066
|
return RxTransaction;
|
|
29980
30067
|
}();
|