path增加了desc属性
This commit is contained in:
parent
2d6c938f04
commit
09fe64e422
|
|
@ -12,6 +12,7 @@ export type OpSchema = EntityShape & {
|
|||
value: String<256>;
|
||||
recursive: Boolean;
|
||||
sourceEntity: String<32>;
|
||||
desc?: String<256> | null;
|
||||
};
|
||||
export type OpAttr = keyof OpSchema;
|
||||
export type Schema = EntityShape & {
|
||||
|
|
@ -19,6 +20,7 @@ export type Schema = EntityShape & {
|
|||
value: String<256>;
|
||||
recursive: Boolean;
|
||||
sourceEntity: String<32>;
|
||||
desc?: String<256> | null;
|
||||
actionAuth$path?: Array<ActionAuth.Schema>;
|
||||
actionAuth$path$$aggr?: AggregationResult<ActionAuth.Schema>;
|
||||
relationAuth$path?: Array<RelationAuth.Schema>;
|
||||
|
|
@ -39,6 +41,7 @@ type AttrFilter = {
|
|||
value: Q_StringValue;
|
||||
recursive: Q_BooleanValue;
|
||||
sourceEntity: Q_StringValue;
|
||||
desc: Q_StringValue;
|
||||
actionAuth$path: ActionAuth.Filter & SubQueryPredicateMetadata;
|
||||
relationAuth$path: RelationAuth.Filter & SubQueryPredicateMetadata;
|
||||
modiEntity$entity: ModiEntity.Filter & SubQueryPredicateMetadata;
|
||||
|
|
@ -56,6 +59,7 @@ export type Projection = {
|
|||
value?: number;
|
||||
recursive?: number;
|
||||
sourceEntity?: number;
|
||||
desc?: number;
|
||||
actionAuth$path?: ActionAuth.Selection & {
|
||||
$entity: "actionAuth";
|
||||
};
|
||||
|
|
@ -100,6 +104,8 @@ export type SortAttr = {
|
|||
recursive: number;
|
||||
} | {
|
||||
sourceEntity: number;
|
||||
} | {
|
||||
desc: number;
|
||||
} | {
|
||||
[k: string]: any;
|
||||
} | OneOf<ExprOp<OpAttr | string>>;
|
||||
|
|
|
|||
|
|
@ -28,6 +28,12 @@ exports.desc = {
|
|||
params: {
|
||||
length: 32
|
||||
}
|
||||
},
|
||||
desc: {
|
||||
type: "varchar",
|
||||
params: {
|
||||
length: 256
|
||||
}
|
||||
}
|
||||
},
|
||||
static: true,
|
||||
|
|
|
|||
|
|
@ -5,4 +5,5 @@ export interface Schema extends EntityShape {
|
|||
value: String<256>;
|
||||
recursive: Boolean;
|
||||
sourceEntity: String<32>;
|
||||
desc?: String<256>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,9 +26,10 @@ const entityDesc = {
|
|||
name: '关系路径',
|
||||
attr: {
|
||||
sourceEntity: '源对象',
|
||||
value: '路径(从dest到source)',
|
||||
value: '路径',
|
||||
destEntity: '目标对象',
|
||||
recursive: '是否递归(目标对象)',
|
||||
recursive: '是否递归',
|
||||
desc: '描述',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ function createUniqueCheckers(schema) {
|
|||
entity,
|
||||
action: 'create',
|
||||
type: 'logicalData',
|
||||
priority: types_1.CHECKER_MAX_PRIORITY, // 优先级要放在最低,所有前置的checker/trigger将数据完整之后再在这里检测
|
||||
priority: types_1.CHECKER_MAX_PRIORITY,
|
||||
checker: (operation, context) => {
|
||||
const { data } = operation;
|
||||
if (data instanceof Array) {
|
||||
|
|
@ -95,9 +95,9 @@ function createUniqueCheckers(schema) {
|
|||
}
|
||||
}, {
|
||||
entity,
|
||||
action: 'update', // 只检查update,其它状态转换的action应该不会涉及unique约束的属性
|
||||
action: 'update',
|
||||
type: 'logicalData',
|
||||
priority: types_1.CHECKER_MAX_PRIORITY, // 优先级要放在最低,所有前置的checker/trigger将数据完整之后再在这里检测
|
||||
priority: types_1.CHECKER_MAX_PRIORITY,
|
||||
checker: (operation, context) => {
|
||||
const { data, filter: operationFilter } = operation;
|
||||
if (data) {
|
||||
|
|
@ -227,7 +227,7 @@ function createActionTransformerCheckers(actionDefDict) {
|
|||
action: 'create',
|
||||
type: 'logical',
|
||||
entity,
|
||||
priority: 10, // 优先级要高,先于真正的data检查进行
|
||||
priority: 10,
|
||||
checker: (operation) => {
|
||||
const { data } = operation;
|
||||
if (data instanceof Array) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="node" />
|
||||
/**
|
||||
* 防止assert打包体积过大,从这里引用
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ function destructRelationPath(schema, entity, path, relationFilter, recursive) {
|
|||
},
|
||||
filter: relationFilter,
|
||||
} // as ED['userRelation']['Selection']
|
||||
}, // as ED[keyof ED]['Selection']['data'],
|
||||
},
|
||||
getData: (d) => {
|
||||
return d.userRelation$entity;
|
||||
},
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ export interface Schema extends EntityShape {
|
|||
value: String<256>;
|
||||
recursive: Boolean;
|
||||
sourceEntity: String<32>;
|
||||
desc?: String<256>;
|
||||
};
|
||||
|
||||
const entityDesc: EntityDesc<Schema> = {
|
||||
|
|
@ -34,9 +35,10 @@ const entityDesc: EntityDesc<Schema> = {
|
|||
name: '关系路径',
|
||||
attr: {
|
||||
sourceEntity: '源对象',
|
||||
value: '路径(从dest到source)',
|
||||
value: '路径',
|
||||
destEntity: '目标对象',
|
||||
recursive: '是否递归(目标对象)',
|
||||
recursive: '是否递归',
|
||||
desc: '描述',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue