Merge branch 'dev' into release
This commit is contained in:
commit
ae9cc50975
21
es/store.js
21
es/store.js
|
|
@ -1922,17 +1922,6 @@ export default class TreeStore extends CascadeStore {
|
|||
}
|
||||
break;
|
||||
}
|
||||
case 'u': {
|
||||
const { e, d, f } = record;
|
||||
this.updateAbjointRow(e, {
|
||||
id: 'dummy',
|
||||
action: 'update',
|
||||
data: d,
|
||||
filter: f,
|
||||
}, context, option2);
|
||||
this.addToOperationResult(result, e, 'update');
|
||||
break;
|
||||
}
|
||||
case 'r': {
|
||||
const { e, f } = record;
|
||||
this.updateAbjointRow(e, {
|
||||
|
|
@ -1972,7 +1961,15 @@ export default class TreeStore extends CascadeStore {
|
|||
break;
|
||||
}
|
||||
default: {
|
||||
assert(false);
|
||||
const { e, d, f } = record;
|
||||
this.updateAbjointRow(e, {
|
||||
id: 'dummy',
|
||||
action: 'update',
|
||||
data: d,
|
||||
filter: f,
|
||||
}, context, option2);
|
||||
this.addToOperationResult(result, e, 'update');
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
21
lib/store.js
21
lib/store.js
|
|
@ -1924,17 +1924,6 @@ class TreeStore extends CascadeStore_1.CascadeStore {
|
|||
}
|
||||
break;
|
||||
}
|
||||
case 'u': {
|
||||
const { e, d, f } = record;
|
||||
this.updateAbjointRow(e, {
|
||||
id: 'dummy',
|
||||
action: 'update',
|
||||
data: d,
|
||||
filter: f,
|
||||
}, context, option2);
|
||||
this.addToOperationResult(result, e, 'update');
|
||||
break;
|
||||
}
|
||||
case 'r': {
|
||||
const { e, f } = record;
|
||||
this.updateAbjointRow(e, {
|
||||
|
|
@ -1974,7 +1963,15 @@ class TreeStore extends CascadeStore_1.CascadeStore {
|
|||
break;
|
||||
}
|
||||
default: {
|
||||
(0, assert_1.assert)(false);
|
||||
const { e, d, f } = record;
|
||||
this.updateAbjointRow(e, {
|
||||
id: 'dummy',
|
||||
action: 'update',
|
||||
data: d,
|
||||
filter: f,
|
||||
}, context, option2);
|
||||
this.addToOperationResult(result, e, 'update');
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "oak-memory-tree-store",
|
||||
"version": "3.3.0",
|
||||
"version": "3.3.1",
|
||||
"description": "oak框架中内存级store的实现",
|
||||
"author": {
|
||||
"name": "XuChang"
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
"es/**/*"
|
||||
],
|
||||
"dependencies": {
|
||||
"oak-domain": "^5.0.0",
|
||||
"oak-domain": "~5.0.6",
|
||||
"uuid": "^8.3.2"
|
||||
},
|
||||
"scripts": {
|
||||
|
|
|
|||
25
src/store.ts
25
src/store.ts
|
|
@ -19,7 +19,7 @@ import { execOp, Expression, ExpressionConstant, isExpression, opMultipleParams
|
|||
import { SyncContext } from 'oak-domain/lib/store/SyncRowStore';
|
||||
import { AsyncContext } from 'oak-domain/lib/store/AsyncRowStore';
|
||||
import { CascadeStore } from 'oak-domain/lib/store/CascadeStore';
|
||||
import { Context } from 'oak-domain/lib/types';
|
||||
import { Context, CreateOpResult } from 'oak-domain/lib/types';
|
||||
import { getRelevantIds } from 'oak-domain/lib/store/filter';
|
||||
|
||||
|
||||
|
|
@ -2246,7 +2246,7 @@ export default class TreeStore<ED extends EntityDict & BaseEntityDict> extends C
|
|||
for (const record of opRecords) {
|
||||
switch (record.a) {
|
||||
case 'c': {
|
||||
const { e, d } = record;
|
||||
const { e, d } = record as CreateOpResult<ED, keyof ED>;
|
||||
if (d instanceof Array) {
|
||||
for (const dd of d) {
|
||||
if (this.store[e] && this.store[e]![dd.id]) {
|
||||
|
|
@ -2293,17 +2293,6 @@ export default class TreeStore<ED extends EntityDict & BaseEntityDict> extends C
|
|||
}
|
||||
break;
|
||||
}
|
||||
case 'u': {
|
||||
const { e, d, f } = record as UpdateOpResult<ED, keyof ED>;
|
||||
this.updateAbjointRow(e, {
|
||||
id: 'dummy',
|
||||
action: 'update',
|
||||
data: d,
|
||||
filter: f,
|
||||
}, context, option2);
|
||||
this.addToOperationResult(result, e, 'update');
|
||||
break;
|
||||
}
|
||||
case 'r': {
|
||||
const { e, f } = record as RemoveOpResult<ED, keyof ED>;
|
||||
this.updateAbjointRow(e, {
|
||||
|
|
@ -2343,7 +2332,15 @@ export default class TreeStore<ED extends EntityDict & BaseEntityDict> extends C
|
|||
break;
|
||||
}
|
||||
default: {
|
||||
assert(false);
|
||||
const { e, d, f } = record as UpdateOpResult<ED, keyof ED>;
|
||||
this.updateAbjointRow(e, {
|
||||
id: 'dummy',
|
||||
action: 'update',
|
||||
data: d,
|
||||
filter: f,
|
||||
}, context, option2);
|
||||
this.addToOperationResult(result, e, 'update');
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue