oak-domain 1.0.0 → 1.1.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.
- package/lib/OakError.js +2 -16
- package/lib/actions/action.d.ts +9 -1
- package/lib/actions/action.js +6 -2
- package/lib/base-app-domain/ActionDefDict.d.ts +5 -0
- package/lib/base-app-domain/ActionDefDict.js +7 -0
- package/lib/base-app-domain/EntityDict.d.ts +12 -0
- package/lib/base-app-domain/EntityDict.js +2 -0
- package/lib/base-app-domain/Modi/Action.d.ts +10 -0
- package/lib/base-app-domain/Modi/Action.js +14 -0
- package/lib/base-app-domain/Modi/Schema.d.ts +161 -0
- package/lib/base-app-domain/Modi/Schema.js +2 -0
- package/lib/base-app-domain/Modi/Storage.d.ts +3 -0
- package/lib/base-app-domain/Modi/Storage.js +60 -0
- package/lib/base-app-domain/ModiEntity/Schema.d.ts +179 -0
- package/lib/base-app-domain/ModiEntity/Schema.js +2 -0
- package/lib/base-app-domain/ModiEntity/Storage.d.ts +3 -0
- package/lib/base-app-domain/ModiEntity/Storage.js +26 -0
- package/lib/base-app-domain/Oper/Schema.d.ts +158 -0
- package/lib/base-app-domain/Oper/Schema.js +2 -0
- package/lib/base-app-domain/Oper/Storage.d.ts +3 -0
- package/lib/base-app-domain/Oper/Storage.js +29 -0
- package/lib/base-app-domain/OperEntity/Schema.d.ts +196 -0
- package/lib/base-app-domain/OperEntity/Schema.js +2 -0
- package/lib/base-app-domain/OperEntity/Storage.d.ts +3 -0
- package/lib/base-app-domain/OperEntity/Storage.js +26 -0
- package/lib/base-app-domain/Storage.d.ts +3 -0
- package/lib/base-app-domain/Storage.js +15 -0
- package/lib/base-app-domain/User/Schema.d.ts +140 -0
- package/lib/base-app-domain/User/Schema.js +2 -0
- package/lib/base-app-domain/User/Storage.d.ts +3 -0
- package/lib/base-app-domain/User/Storage.js +25 -0
- package/lib/base-app-domain/_SubQuery.d.ts +36 -0
- package/lib/base-app-domain/_SubQuery.js +2 -0
- package/lib/base-app-domain/index.d.ts +3 -0
- package/lib/base-app-domain/index.js +6 -0
- package/lib/checkers/index.d.ts +3 -0
- package/lib/checkers/index.js +8 -0
- package/lib/compiler/env.d.ts +4 -3
- package/lib/compiler/env.js +22 -9
- package/lib/compiler/schemalBuilder.js +689 -355
- package/lib/entities/Action.d.ts +12 -0
- package/lib/entities/Action.js +17 -0
- package/lib/entities/Modi.d.ts +11 -0
- package/lib/entities/Modi.js +46 -0
- package/lib/entities/ModiEntity.d.ts +8 -0
- package/lib/entities/ModiEntity.js +15 -0
- package/lib/entities/Ooperation.d.ts +12 -0
- package/lib/entities/Ooperation.js +17 -0
- package/lib/entities/Oper.d.ts +10 -0
- package/lib/entities/Oper.js +17 -0
- package/lib/entities/OperEntity.d.ts +8 -0
- package/lib/entities/OperEntity.js +15 -0
- package/lib/entities/Update.d.ts +9 -0
- package/lib/entities/Update.js +44 -0
- package/lib/entities/User.d.ts +7 -0
- package/lib/entities/User.js +12 -0
- package/lib/entities/Uupdate.d.ts +9 -0
- package/lib/entities/Uupdate.js +44 -0
- package/lib/store/CascadeStore.d.ts +31 -6
- package/lib/store/CascadeStore.js +957 -230
- package/lib/store/TriggerExecutor.d.ts +4 -3
- package/lib/store/TriggerExecutor.js +30 -102
- package/lib/store/UniversalContext.d.ts +1 -0
- package/lib/store/UniversalContext.js +10 -59
- package/lib/store/action.d.ts +6 -0
- package/lib/store/action.js +14 -0
- package/lib/store/actionDef.js +14 -47
- package/lib/store/filter.d.ts +6 -0
- package/lib/store/filter.js +60 -29
- package/lib/store/modi.d.ts +11 -0
- package/lib/store/modi.js +143 -0
- package/lib/store/projection.d.ts +7 -0
- package/lib/store/projection.js +211 -0
- package/lib/store/relation.js +6 -6
- package/lib/store/selection.d.ts +7 -0
- package/lib/store/selection.js +227 -0
- package/lib/triggers/index.d.ts +2 -0
- package/lib/triggers/index.js +5 -0
- package/lib/triggers/modi.d.ts +5 -0
- package/lib/triggers/modi.js +72 -0
- package/lib/types/Context.d.ts +1 -0
- package/lib/types/DataType.d.ts +1 -1
- package/lib/types/Entity.d.ts +29 -16
- package/lib/types/Exception.d.ts +28 -0
- package/lib/types/Exception.js +75 -23
- package/lib/types/Expression.d.ts +9 -0
- package/lib/types/Expression.js +47 -38
- package/lib/types/RowStore.d.ts +3 -3
- package/lib/types/Storage.d.ts +6 -0
- package/lib/types/Trigger.d.ts +5 -5
- package/lib/types/index.js +19 -28
- package/lib/utils/SimpleConnector.js +5 -58
- package/lib/utils/assert.js +2 -4
- package/lib/utils/concurrent.js +5 -54
- package/lib/utils/lodash.d.ts +4 -1
- package/lib/utils/lodash.js +19 -15
- package/package.json +10 -5
- package/src/entities/Modi.ts +68 -0
- package/src/entities/ModiEntity.ts +24 -0
- package/src/entities/Oper.ts +28 -0
- package/src/entities/OperEntity.ts +24 -0
- package/src/entities/User.ts +20 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { String } from '../types/DataType';
|
|
2
|
+
import { EntityShape, Configuration } from '../types/Entity';
|
|
3
|
+
import { LocaleDef } from '../types/Locale';
|
|
4
|
+
import { Schema as Oper } from './Oper';
|
|
5
|
+
|
|
6
|
+
export interface Schema extends EntityShape {
|
|
7
|
+
oper: Oper,
|
|
8
|
+
entity: String<32>;
|
|
9
|
+
entityId: String<64>;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const config: Configuration = {
|
|
13
|
+
actionType: 'appendOnly',
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const locale: LocaleDef<Schema, '', '', {}> = {
|
|
17
|
+
zh_CN: {
|
|
18
|
+
attr: {
|
|
19
|
+
oper: '操作',
|
|
20
|
+
entity: '关联对象',
|
|
21
|
+
entityId: '关联对象id',
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { String, Int, Text, Image, Datetime } from '../types/DataType';
|
|
2
|
+
import { LocaleDef } from '../types/Locale';
|
|
3
|
+
import { EntityShape } from '../types/Entity';
|
|
4
|
+
|
|
5
|
+
export interface Schema extends EntityShape {
|
|
6
|
+
name?: String<16>;
|
|
7
|
+
nickname?: String<64>;
|
|
8
|
+
password?: Text;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
const locale: LocaleDef<Schema, '', '', {}> = {
|
|
13
|
+
zh_CN: {
|
|
14
|
+
attr: {
|
|
15
|
+
name: '姓名',
|
|
16
|
+
nickname: '昵称',
|
|
17
|
+
password: '密码',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
};
|