oak-domain 2.6.10 → 3.0.0

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.
Files changed (122) hide show
  1. package/lib/actions/action.d.ts +1 -1
  2. package/lib/actions/action.js +2 -2
  3. package/lib/base-app-domain/ActionAuth/Schema.d.ts +25 -21
  4. package/lib/base-app-domain/ActionAuth/Storage.js +6 -13
  5. package/lib/base-app-domain/ActionDefDict.d.ts +1 -0
  6. package/lib/base-app-domain/ActionDefDict.js +3 -1
  7. package/lib/base-app-domain/EntityDict.d.ts +2 -0
  8. package/lib/base-app-domain/I18n/Schema.d.ts +129 -0
  9. package/lib/base-app-domain/I18n/Schema.js +2 -0
  10. package/lib/base-app-domain/I18n/Storage.d.ts +3 -0
  11. package/lib/base-app-domain/I18n/Storage.js +59 -0
  12. package/lib/base-app-domain/Modi/Action.d.ts +1 -1
  13. package/lib/base-app-domain/Modi/Schema.d.ts +10 -9
  14. package/lib/base-app-domain/ModiEntity/Schema.d.ts +42 -28
  15. package/lib/base-app-domain/ModiEntity/Storage.js +1 -1
  16. package/lib/base-app-domain/Oper/Schema.d.ts +15 -13
  17. package/lib/base-app-domain/OperEntity/Schema.d.ts +41 -27
  18. package/lib/base-app-domain/OperEntity/Storage.js +1 -1
  19. package/lib/base-app-domain/Relation/Schema.d.ts +50 -22
  20. package/lib/base-app-domain/Relation/Storage.js +1 -4
  21. package/lib/base-app-domain/Relation.d.ts +10 -0
  22. package/lib/base-app-domain/Relation.js +10 -0
  23. package/lib/base-app-domain/RelationAuth/Schema.d.ts +67 -43
  24. package/lib/base-app-domain/RelationAuth/Storage.js +9 -12
  25. package/lib/base-app-domain/Storage.js +20 -18
  26. package/lib/base-app-domain/User/Action.d.ts +1 -1
  27. package/lib/base-app-domain/User/Schema.d.ts +20 -14
  28. package/lib/base-app-domain/User/Storage.js +1 -2
  29. package/lib/base-app-domain/UserEntityGrant/Action.d.ts +5 -0
  30. package/lib/base-app-domain/UserEntityGrant/Action.js +5 -0
  31. package/lib/base-app-domain/UserEntityGrant/Schema.d.ts +53 -17
  32. package/lib/base-app-domain/UserEntityGrant/Storage.js +5 -7
  33. package/lib/base-app-domain/UserRelation/Schema.d.ts +35 -16
  34. package/lib/base-app-domain/UserRelation/Storage.js +21 -1
  35. package/lib/base-app-domain/_SubQuery.d.ts +40 -4
  36. package/lib/base-app-domain/index.d.ts +1 -0
  37. package/lib/base-app-domain/index.js +1 -0
  38. package/lib/checkers/index.d.ts +2 -2
  39. package/lib/checkers/index.js +2 -5
  40. package/lib/compiler/env.d.ts +3 -1
  41. package/lib/compiler/env.js +12 -2
  42. package/lib/compiler/localeBuilder.d.ts +22 -0
  43. package/lib/compiler/localeBuilder.js +169 -0
  44. package/lib/compiler/schemalBuilder.d.ts +9 -0
  45. package/lib/compiler/schemalBuilder.js +774 -362
  46. package/lib/entities/ActionAuth.d.ts +3 -2
  47. package/lib/entities/ActionAuth.js +21 -22
  48. package/lib/entities/I18n.d.ts +9 -0
  49. package/lib/entities/I18n.js +37 -0
  50. package/lib/entities/Modi.js +35 -33
  51. package/lib/entities/ModiEntity.js +12 -10
  52. package/lib/entities/Oper.js +15 -13
  53. package/lib/entities/OperEntity.js +12 -10
  54. package/lib/entities/Relation.d.ts +3 -3
  55. package/lib/entities/Relation.js +27 -25
  56. package/lib/entities/RelationAuth.d.ts +2 -5
  57. package/lib/entities/RelationAuth.js +27 -23
  58. package/lib/entities/User.js +20 -18
  59. package/lib/entities/UserEntityGrant.d.ts +2 -1
  60. package/lib/entities/UserEntityGrant.js +12 -7
  61. package/lib/entities/UserRelation.d.ts +3 -0
  62. package/lib/entities/UserRelation.js +30 -20
  63. package/lib/store/AsyncRowStore.d.ts +3 -0
  64. package/lib/store/AsyncRowStore.js +3 -0
  65. package/lib/store/CascadeStore.d.ts +9 -3
  66. package/lib/store/CascadeStore.js +247 -113
  67. package/lib/store/RelationAuth.d.ts +96 -0
  68. package/lib/store/RelationAuth.js +1307 -0
  69. package/lib/store/TriggerExecutor.d.ts +1 -2
  70. package/lib/store/TriggerExecutor.js +22 -22
  71. package/lib/store/actionAuth.d.ts +4 -0
  72. package/lib/store/actionAuth.js +40 -0
  73. package/lib/store/actionDef.d.ts +4 -3
  74. package/lib/store/actionDef.js +14 -10
  75. package/lib/store/checker.d.ts +2 -9
  76. package/lib/store/checker.js +39 -815
  77. package/lib/store/filter.d.ts +31 -18
  78. package/lib/store/filter.js +1256 -422
  79. package/lib/store/modi.d.ts +1 -1
  80. package/lib/store/modi.js +108 -9
  81. package/lib/store/relation.d.ts +3 -4
  82. package/lib/timers/oper.js +1 -1
  83. package/lib/timers/vaccum.js +2 -2
  84. package/lib/triggers/index.d.ts +2 -3
  85. package/lib/triggers/index.js +2 -5
  86. package/lib/types/Auth.d.ts +5 -0
  87. package/lib/types/DataType.d.ts +3 -0
  88. package/lib/types/Demand.d.ts +11 -0
  89. package/lib/types/Demand.js +2 -1
  90. package/lib/types/Entity.d.ts +10 -3
  91. package/lib/types/EntityDesc.d.ts +8 -0
  92. package/lib/types/EntityDesc.js +2 -0
  93. package/lib/types/Environment.d.ts +57 -0
  94. package/lib/types/Environment.js +2 -0
  95. package/lib/types/Exception.d.ts +6 -0
  96. package/lib/types/Exception.js +25 -1
  97. package/lib/types/Logger.d.ts +1 -0
  98. package/lib/types/RowStore.d.ts +6 -4
  99. package/lib/types/Style.d.ts +1 -1
  100. package/lib/types/Trigger.d.ts +4 -5
  101. package/lib/types/Trigger.js +11 -6
  102. package/lib/types/index.d.ts +2 -0
  103. package/lib/types/index.js +2 -0
  104. package/lib/utils/SimpleConnector.js +1 -1
  105. package/lib/utils/string.d.ts +6 -0
  106. package/lib/utils/string.js +13 -1
  107. package/lib/utils/uuid.d.ts +5 -0
  108. package/lib/utils/uuid.js +64 -1
  109. package/package.json +3 -3
  110. package/src/entities/ActionAuth.ts +25 -33
  111. package/src/entities/I18n.ts +46 -0
  112. package/src/entities/Modi.ts +36 -36
  113. package/src/entities/ModiEntity.ts +14 -13
  114. package/src/entities/Oper.ts +17 -16
  115. package/src/entities/OperEntity.ts +13 -11
  116. package/src/entities/Relation.ts +31 -37
  117. package/src/entities/RelationAuth.ts +31 -37
  118. package/src/entities/User.ts +24 -21
  119. package/src/entities/UserEntityGrant.ts +16 -14
  120. package/src/entities/UserRelation.ts +33 -27
  121. package/lib/triggers/modi.d.ts +0 -5
  122. package/lib/triggers/modi.js +0 -72
@@ -2,9 +2,10 @@ import { String } from '../types/DataType';
2
2
  import { EntityShape } from '../types/Entity';
3
3
  import { Schema as Relation } from './Relation';
4
4
  declare type Actions = string[];
5
+ declare type Paths = string[];
5
6
  export interface Schema extends EntityShape {
6
- relation: Relation;
7
- path: String<256>;
7
+ relation?: Relation;
8
+ paths: Paths;
8
9
  destEntity: String<32>;
9
10
  deActions: Actions;
10
11
  }
@@ -1,30 +1,29 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  ;
4
- var indexes = [
5
- {
6
- name: 'index_relation_path',
7
- attributes: [
8
- {
9
- name: 'relation',
4
+ var entityDesc = {
5
+ locales: {
6
+ zh_CN: {
7
+ name: '用户授权',
8
+ attr: {
9
+ relation: '关系',
10
+ paths: '路径',
11
+ destEntity: '目标对象',
12
+ deActions: '目标对象动作',
10
13
  },
11
- {
12
- name: 'path',
13
- },
14
- ],
15
- config: {
16
- unique: true,
17
14
  },
18
15
  },
19
- ];
20
- var locale = {
21
- zh_CN: {
22
- name: '用户授权',
23
- attr: {
24
- relation: '关系',
25
- path: '路径',
26
- destEntity: '目标对象',
27
- deActions: '目标对象动作',
16
+ indexes: [
17
+ {
18
+ name: 'index_entity_relation',
19
+ attributes: [
20
+ {
21
+ name: 'destEntity',
22
+ },
23
+ {
24
+ name: 'relation',
25
+ },
26
+ ],
28
27
  },
29
- },
28
+ ],
30
29
  };
@@ -0,0 +1,9 @@
1
+ import { String } from '../types/DataType';
2
+ import { EntityShape } from '../types/Entity';
3
+ export interface Schema extends EntityShape {
4
+ module: String<64>;
5
+ position: String<188>;
6
+ namespace: String<256>;
7
+ language: String<32>;
8
+ data: Object;
9
+ }
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ ;
4
+ var entityDesc = {
5
+ locales: {
6
+ zh_CN: {
7
+ name: '用户授权',
8
+ attr: {
9
+ module: '模块',
10
+ position: '文件位置',
11
+ namespace: '命名空间',
12
+ language: '语言',
13
+ data: '数据'
14
+ },
15
+ },
16
+ },
17
+ indexes: [
18
+ {
19
+ name: 'namespace_language',
20
+ attributes: [
21
+ {
22
+ name: 'namespace',
23
+ },
24
+ {
25
+ name: 'language',
26
+ }
27
+ ],
28
+ config: {
29
+ unique: true,
30
+ },
31
+ }
32
+ ],
33
+ configuration: {
34
+ actionType: 'readOnly',
35
+ static: true,
36
+ }
37
+ };
@@ -8,40 +8,42 @@ var IActionDef = {
8
8
  },
9
9
  is: 'active',
10
10
  };
11
- var indexes = [
12
- {
13
- name: 'index_state',
14
- attributes: [
15
- {
16
- name: 'iState',
17
- direction: 'ASC',
18
- }
19
- ],
20
- },
21
- ];
22
- var locale = {
23
- zh_CN: {
24
- name: '更新',
25
- attr: {
26
- targetEntity: '目标对象',
27
- entity: '关联对象',
28
- entityId: '关联对象Id',
29
- action: '动作',
30
- data: '数据',
31
- filter: '条件',
32
- extra: '其它',
33
- iState: '状态',
34
- },
35
- action: {
36
- abandon: '放弃',
37
- apply: '应用',
38
- },
39
- v: {
40
- iState: {
41
- active: '活跃的',
42
- abandoned: '放弃的',
43
- applied: '应用的',
11
+ var entityDesc = {
12
+ locales: {
13
+ zh_CN: {
14
+ name: '更新',
15
+ attr: {
16
+ targetEntity: '目标对象',
17
+ entity: '关联对象',
18
+ entityId: '关联对象Id',
19
+ action: '动作',
20
+ data: '数据',
21
+ filter: '条件',
22
+ extra: '其它',
23
+ iState: '状态',
24
+ },
25
+ action: {
26
+ abandon: '放弃',
27
+ apply: '应用',
28
+ },
29
+ v: {
30
+ iState: {
31
+ active: '活跃的',
32
+ abandoned: '放弃的',
33
+ applied: '应用的',
34
+ },
44
35
  },
45
36
  },
46
37
  },
38
+ indexes: [
39
+ {
40
+ name: 'index_state',
41
+ attributes: [
42
+ {
43
+ name: 'iState',
44
+ direction: 'ASC',
45
+ }
46
+ ],
47
+ },
48
+ ],
47
49
  };
@@ -1,16 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  ;
4
- var config = {
5
- actionType: 'appendOnly',
6
- };
7
- var locale = {
8
- zh_CN: {
9
- name: '更新对象连接',
10
- attr: {
11
- modi: '更新',
12
- entity: '关联对象',
13
- entityId: '关联对象id',
4
+ var entityDesc = {
5
+ locales: {
6
+ zh_CN: {
7
+ name: '更新对象连接',
8
+ attr: {
9
+ modi: '更新',
10
+ entity: '关联对象',
11
+ entityId: '关联对象id',
12
+ },
14
13
  },
15
14
  },
15
+ configuration: {
16
+ actionType: 'appendOnly',
17
+ }
16
18
  };
@@ -1,19 +1,21 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  ;
4
- var configuration = {
5
- actionType: 'appendOnly',
6
- };
7
- var locale = {
8
- zh_CN: {
9
- name: '操作',
10
- attr: {
11
- action: '动作',
12
- data: '数据',
13
- filter: '选择条件',
14
- extra: '其它',
15
- operator: '操作者',
16
- targetEntity: '关联对象',
4
+ var entityDesc = {
5
+ locales: {
6
+ zh_CN: {
7
+ name: '操作',
8
+ attr: {
9
+ action: '动作',
10
+ data: '数据',
11
+ filter: '选择条件',
12
+ extra: '其它',
13
+ operator: '操作者',
14
+ targetEntity: '关联对象',
15
+ },
17
16
  },
18
17
  },
18
+ configuration: {
19
+ actionType: 'appendOnly',
20
+ }
19
21
  };
@@ -1,16 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  ;
4
- var config = {
5
- actionType: 'appendOnly',
6
- };
7
- var locale = {
8
- zh_CN: {
9
- name: '操作对象连接',
10
- attr: {
11
- oper: '操作',
12
- entity: '关联对象',
13
- entityId: '关联对象id',
4
+ var entityDesc = {
5
+ locales: {
6
+ zh_CN: {
7
+ name: '操作对象连接',
8
+ attr: {
9
+ oper: '操作',
10
+ entity: '关联对象',
11
+ entityId: '关联对象id',
12
+ },
14
13
  },
15
14
  },
15
+ configuration: {
16
+ actionType: 'appendOnly',
17
+ }
16
18
  };
@@ -2,7 +2,7 @@ import { String } from '../types/DataType';
2
2
  import { EntityShape } from '../types/Entity';
3
3
  export interface Schema extends EntityShape {
4
4
  entity: String<32>;
5
- entityId: String<64>;
6
- name: String<32>;
7
- display: String<32>;
5
+ entityId?: String<64>;
6
+ name?: String<32>;
7
+ display?: String<32>;
8
8
  }
@@ -1,33 +1,35 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  ;
4
- var indexes = [
5
- {
6
- name: 'index_entity_entityId_name',
7
- attributes: [
8
- {
9
- name: 'entity',
4
+ var entityDesc = {
5
+ locales: {
6
+ zh_CN: {
7
+ name: '用户授权',
8
+ attr: {
9
+ name: '关系',
10
+ entity: '目标对象',
11
+ entityId: '目标对象id',
12
+ display: '显示值',
10
13
  },
11
- {
12
- name: 'entityId',
13
- },
14
- {
15
- name: 'name',
16
- }
17
- ],
18
- config: {
19
- unique: true,
20
14
  },
21
15
  },
22
- ];
23
- var locale = {
24
- zh_CN: {
25
- name: '用户授权',
26
- attr: {
27
- name: '关系',
28
- entity: '目标对象',
29
- entityId: '目标对象id',
30
- display: '显示值',
16
+ indexes: [
17
+ {
18
+ name: 'index_targetEntity_entityId_name',
19
+ attributes: [
20
+ {
21
+ name: 'entity',
22
+ },
23
+ {
24
+ name: 'entityId',
25
+ },
26
+ {
27
+ name: 'name',
28
+ }
29
+ ],
30
+ config: {
31
+ unique: true,
32
+ },
31
33
  },
32
- },
34
+ ]
33
35
  };
@@ -1,11 +1,8 @@
1
1
  import { String } from '../types/DataType';
2
2
  import { EntityShape } from '../types/Entity';
3
3
  import { Schema as Relation } from './Relation';
4
- declare type Relations = string[];
5
4
  export interface Schema extends EntityShape {
6
- relation: Relation;
5
+ sourceRelation: Relation;
7
6
  path: String<256>;
8
- destEntity: String<32>;
9
- deRelations: Relations;
7
+ destRelation: Relation;
10
8
  }
11
- export {};
@@ -1,30 +1,34 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  ;
4
- var indexes = [
5
- {
6
- name: 'index_relation_path',
7
- attributes: [
8
- {
9
- name: 'relation',
4
+ var entityDesc = {
5
+ indexes: [
6
+ {
7
+ name: 'index_entity_relation_path',
8
+ attributes: [
9
+ {
10
+ name: 'sourceRelation',
11
+ },
12
+ {
13
+ name: 'path',
14
+ },
15
+ {
16
+ name: 'destRelation',
17
+ },
18
+ ],
19
+ config: {
20
+ unique: true,
10
21
  },
11
- {
12
- name: 'path',
13
- },
14
- ],
15
- config: {
16
- unique: true,
17
22
  },
18
- },
19
- ];
20
- var locale = {
21
- zh_CN: {
22
- name: '用户授权',
23
- attr: {
24
- relation: '关系',
25
- path: '路径',
26
- destEntity: '目标对象',
27
- deRelations: '目标对象关系',
23
+ ],
24
+ locales: {
25
+ zh_CN: {
26
+ name: '用户授权',
27
+ attr: {
28
+ sourceRelation: '源关系',
29
+ path: '路径',
30
+ destRelation: '目标关系',
31
+ },
28
32
  },
29
- },
33
+ }
30
34
  };
@@ -6,24 +6,26 @@ var UserActionDef = {
6
6
  mergeTo: ['normal', 'merged'],
7
7
  },
8
8
  };
9
- var locale = {
10
- zh_CN: {
11
- name: '用户',
12
- attr: {
13
- name: '姓名',
14
- nickname: '昵称',
15
- password: '密码',
16
- ref: '指向用户',
17
- userState: '状态',
18
- },
19
- action: {
20
- mergeTo: '合并',
21
- },
22
- v: {
23
- userState: {
24
- normal: '正常',
25
- merged: '已被合并',
9
+ var entityDesc = {
10
+ locales: {
11
+ zh_CN: {
12
+ name: '用户',
13
+ attr: {
14
+ name: '姓名',
15
+ nickname: '昵称',
16
+ password: '密码',
17
+ ref: '指向用户',
18
+ userState: '状态',
26
19
  },
27
- }
20
+ action: {
21
+ mergeTo: '合并',
22
+ },
23
+ v: {
24
+ userState: {
25
+ normal: '正常',
26
+ merged: '已被合并',
27
+ },
28
+ }
29
+ },
28
30
  },
29
31
  };
@@ -1,7 +1,8 @@
1
1
  import { String } from '../types/DataType';
2
2
  import { EntityShape } from '../types/Entity';
3
+ import { Schema as Relation } from './Relation';
3
4
  export interface Schema extends EntityShape {
4
5
  entity: String<32>;
5
6
  entityId: String<64>;
6
- relation: String<32>;
7
+ relation: Relation;
7
8
  }
@@ -1,13 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  ;
4
- var locale = {
5
- zh_CN: {
6
- name: '用户授权',
7
- attr: {
8
- relation: '关系',
9
- entity: '关联对象',
10
- entityId: '关联对象id',
4
+ var entityDesc = {
5
+ locales: {
6
+ zh_CN: {
7
+ name: '用户授权',
8
+ attr: {
9
+ relation: '关系',
10
+ entity: '关联对象',
11
+ entityId: '关联对象id',
12
+ },
13
+ action: {
14
+ confirm: '领取',
15
+ },
11
16
  },
12
17
  },
13
18
  };
@@ -1,7 +1,10 @@
1
+ import { String } from '../types/DataType';
1
2
  import { EntityShape } from '../types/Entity';
2
3
  import { Schema as User } from './User';
3
4
  import { Schema as Relation } from './Relation';
4
5
  export interface Schema extends EntityShape {
5
6
  user: User;
6
7
  relation: Relation;
8
+ entity: String<32>;
9
+ entityId: String<64>;
7
10
  }
@@ -1,28 +1,38 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  ;
4
- var indexes = [
5
- {
6
- name: 'index_user_relation',
7
- attributes: [
8
- {
9
- name: 'user',
4
+ var entityDesc = {
5
+ locales: {
6
+ zh_CN: {
7
+ name: '用户对象关系',
8
+ attr: {
9
+ user: '关系',
10
+ relation: '目标关系',
11
+ entity: '目标对象',
12
+ entityId: '目标对象ID',
10
13
  },
11
- {
12
- name: 'relation',
13
- },
14
- ],
15
- config: {
16
- unique: true,
17
14
  },
18
15
  },
19
- ];
20
- var locale = {
21
- zh_CN: {
22
- name: '用户对象关系',
23
- attr: {
24
- user: '关系',
25
- relation: '目标关系',
16
+ indexes: [
17
+ {
18
+ name: 'index_user_entity_entityId_relation',
19
+ attributes: [
20
+ {
21
+ name: 'user',
22
+ },
23
+ {
24
+ name: 'entity',
25
+ },
26
+ {
27
+ name: 'entityId',
28
+ },
29
+ {
30
+ name: 'relation',
31
+ },
32
+ ],
33
+ config: {
34
+ unique: true,
35
+ },
26
36
  },
27
- },
37
+ ]
28
38
  };
@@ -34,6 +34,7 @@ export declare abstract class AsyncContext<ED extends EntityDict> implements Con
34
34
  select<T extends keyof ED, OP extends SelectOption>(entity: T, selection: ED[T]['Selection'], option: OP): Promise<Partial<ED[T]["Schema"]>[]>;
35
35
  aggregate<T extends keyof ED, OP extends SelectOption>(entity: T, aggregation: ED[T]['Aggregation'], option: OP): Promise<AggregationResult<ED[T]["Schema"]>>;
36
36
  count<T extends keyof ED, OP extends SelectOption>(entity: T, selection: Pick<ED[T]['Selection'], 'filter' | 'count'>, option: OP): Promise<number>;
37
+ exec(script: string, txnId?: string): Promise<void>;
37
38
  mergeMultipleResults(toBeMerged: OperationResult<ED>[]): OperationResult<ED>;
38
39
  getCurrentTxnId(): string | undefined;
39
40
  getSchema(): import("../types").StorageSchema<ED>;
@@ -43,6 +44,7 @@ export declare abstract class AsyncContext<ED extends EntityDict> implements Con
43
44
  abstract getCurrentUserId(allowUnloggedIn?: boolean): string | undefined;
44
45
  abstract toString(): string;
45
46
  abstract allowUserUpdate(): boolean;
47
+ abstract openRootMode(): () => void;
46
48
  }
47
49
  export interface AsyncRowStore<ED extends EntityDict, Cxt extends Context> extends RowStore<ED> {
48
50
  operate<T extends keyof ED, OP extends OperateOption>(entity: T, operation: ED[T]['Operation'], context: Cxt, option: OP): Promise<OperationResult<ED>>;
@@ -52,4 +54,5 @@ export interface AsyncRowStore<ED extends EntityDict, Cxt extends Context> exten
52
54
  begin(option?: TxnOption): Promise<string>;
53
55
  commit(txnId: string): Promise<void>;
54
56
  rollback(txnId: string): Promise<void>;
57
+ exec(script: string, txnId?: string): Promise<void>;
55
58
  }
@@ -165,6 +165,9 @@ var AsyncContext = /** @class */ (function () {
165
165
  AsyncContext.prototype.count = function (entity, selection, option) {
166
166
  return this.rowStore.count(entity, selection, this, option);
167
167
  };
168
+ AsyncContext.prototype.exec = function (script, txnId) {
169
+ return this.rowStore.exec(script, txnId);
170
+ };
168
171
  AsyncContext.prototype.mergeMultipleResults = function (toBeMerged) {
169
172
  return this.rowStore.mergeMultipleResults(toBeMerged);
170
173
  };
@@ -11,10 +11,12 @@ export declare abstract class CascadeStore<ED extends EntityDict & BaseEntityDic
11
11
  protected abstract supportMultipleCreate(): boolean;
12
12
  private selectionRewriters;
13
13
  private operationRewriters;
14
- private reinforceSelection;
14
+ private reinforceSelectionAsync;
15
+ private reinforceSelectionSync;
16
+ private reinforceSelectionInner;
15
17
  private reinforceOperation;
16
- registerOperationRewriter(rewriter: OperationRewriter<ED>): void;
17
- registerSelectionRewriter(rewriter: SelectionRewriter<ED>): void;
18
+ registerOperationRewriter(rewriter: OperationRewriter<ED, AsyncContext<ED> | SyncContext<ED>>): void;
19
+ registerSelectionRewriter(rewriter: SelectionRewriter<ED, AsyncContext<ED> | SyncContext<ED>>): void;
18
20
  protected abstract selectAbjointRow<T extends keyof ED, OP extends SelectOption, Cxt extends SyncContext<ED>>(entity: T, selection: ED[T]['Selection'], context: Cxt, option: OP): Partial<ED[T]['Schema']>[];
19
21
  protected abstract updateAbjointRow<T extends keyof ED, OP extends OperateOption, Cxt extends SyncContext<ED>>(entity: T, operation: ED[T]['Operation'], context: Cxt, option: OP): number;
20
22
  protected abstract selectAbjointRowAsync<T extends keyof ED, OP extends SelectOption, Cxt extends AsyncContext<ED>>(entity: T, selection: ED[T]['Selection'], context: Cxt, option: OP): Promise<Partial<ED[T]['Schema']>[]>;
@@ -94,4 +96,8 @@ export declare abstract class CascadeStore<ED extends EntityDict & BaseEntityDic
94
96
  private addToResultSelections;
95
97
  private addSingleRowToResultSelections;
96
98
  protected cascadeSelectAsync<T extends keyof ED, OP extends SelectOption, Cxt extends AsyncContext<ED>>(entity: T, selection: ED[T]['Selection'], context: Cxt, option: OP): Promise<Partial<ED[T]['Schema']>[]>;
99
+ protected selectAsync<T extends keyof ED, OP extends SelectOption, Cxt extends AsyncContext<ED>>(entity: T, selection: ED[T]['Selection'], context: Cxt, option: OP): Promise<Partial<ED[T]['Schema']>[]>;
100
+ protected selectSync<T extends keyof ED, OP extends SelectOption, Cxt extends SyncContext<ED>>(entity: T, selection: ED[T]['Selection'], context: Cxt, option: OP): Partial<ED[T]['Schema']>[];
101
+ protected operateSync<T extends keyof ED, Cxt extends SyncContext<ED>, OP extends OperateOption>(entity: T, operation: ED[T]['Operation'], context: Cxt, option: OP): OperationResult<ED>;
102
+ protected operateAsync<T extends keyof ED, Cxt extends AsyncContext<ED>, OP extends OperateOption>(entity: T, operation: ED[T]['Operation'], context: Cxt, option: OP): Promise<OperationResult<ED>>;
97
103
  }