From f30a39118643e7a8cda134bac2e9dff1a1570b8c Mon Sep 17 00:00:00 2001 From: "Xc@centOs" Date: Sat, 22 Jul 2023 18:32:35 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E7=94=A8cascadeStore=E7=9A=84?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=94=B9=E4=B8=BAoperateAsync/selectAsync?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/store.js | 8 ++++---- src/store.ts | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/store.js b/lib/store.js index 3097e4f..530bbfb 100644 --- a/lib/store.js +++ b/lib/store.js @@ -1129,13 +1129,13 @@ var TreeStore = /** @class */ (function (_super) { }; TreeStore.prototype.operateSync = function (entity, operation, context, option) { (0, assert_1.assert)(context.getCurrentTxnId()); - return this.cascadeUpdate(entity, operation, context, option); + return _super.prototype.operateSync.call(this, entity, operation, context, option); }; TreeStore.prototype.operateAsync = function (entity, operation, context, option) { return tslib_1.__awaiter(this, void 0, void 0, function () { return tslib_1.__generator(this, function (_a) { (0, assert_1.assert)(context.getCurrentTxnId()); - return [2 /*return*/, this.cascadeUpdateAsync(entity, operation, context, option)]; + return [2 /*return*/, _super.prototype.operateAsync.call(this, entity, operation, context, option)]; }); }); }; @@ -1542,7 +1542,7 @@ var TreeStore = /** @class */ (function (_super) { TreeStore.prototype.selectSync = function (entity, selection, context, option) { var _this = this; (0, assert_1.assert)(context.getCurrentTxnId()); - var result = this.cascadeSelect(entity, selection, context, option); + var result = _super.prototype.selectSync.call(this, entity, selection, context, option); // 在这里再计算所有的表达式 result.forEach(function (ele) { return _this.formExprInResult(entity, selection.data, ele, {}, context); }); return result; @@ -1555,7 +1555,7 @@ var TreeStore = /** @class */ (function (_super) { switch (_a.label) { case 0: (0, assert_1.assert)(context.getCurrentTxnId()); - return [4 /*yield*/, this.cascadeSelectAsync(entity, selection, context, option)]; + return [4 /*yield*/, _super.prototype.selectAsync.call(this, entity, selection, context, option)]; case 1: result = _a.sent(); // 在这里再计算所有的表达式 diff --git a/src/store.ts b/src/store.ts index 82d698e..f348bed 100644 --- a/src/store.ts +++ b/src/store.ts @@ -1195,12 +1195,12 @@ export default class TreeStore extends C protected operateSync>(entity: T, operation: ED[T]['Operation'], context: Cxt, option: OP): OperationResult { assert(context.getCurrentTxnId()); - return this.cascadeUpdate(entity, operation, context, option); + return super.operateSync(entity, operation, context, option); } protected async operateAsync>(entity: T, operation: ED[T]['Operation'], context: Cxt, option: OP) { assert(context.getCurrentTxnId()); - return this.cascadeUpdateAsync(entity, operation, context, option); + return super.operateAsync(entity, operation, context, option); } /** @@ -1594,7 +1594,7 @@ export default class TreeStore extends C context: Cxt, option: OP): Partial[] { assert(context.getCurrentTxnId()); - const result = this.cascadeSelect(entity, selection, context, option); + const result = super.selectSync(entity, selection, context, option); // 在这里再计算所有的表达式 result.forEach( (ele) => this.formExprInResult(entity, selection.data, ele, {}, context) @@ -1608,7 +1608,7 @@ export default class TreeStore extends C context: Cxt, option: OP) { assert(context.getCurrentTxnId()); - const result = await this.cascadeSelectAsync(entity, selection, context, option); + const result = await super.selectAsync(entity, selection, context, option); // 在这里再计算所有的表达式 result.forEach( (ele) => this.formExprInResult(entity, selection.data, ele, {}, context)