@ruiapp/rapid-core 0.1.70 → 0.1.72
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/dist/dataAccess/dataAccessTypes.d.ts +11 -0
- package/dist/dataAccess/propertyMapper.d.ts +3 -2
- package/dist/helpers/metaHelper.d.ts +1 -0
- package/dist/index.js +276 -159
- package/dist/plugins/setting/actionHandlers/index.d.ts +2 -1
- package/dist/plugins/setting/routes/index.d.ts +12 -2
- package/dist/queryBuilder/queryBuilder.d.ts +2 -1
- package/package.json +1 -1
- package/src/dataAccess/dataAccessTypes.ts +122 -109
- package/src/dataAccess/entityManager.ts +1342 -1298
- package/src/dataAccess/propertyMapper.ts +28 -27
- package/src/helpers/metaHelper.ts +13 -0
- package/src/plugins/setting/actionHandlers/index.ts +2 -1
- package/src/plugins/setting/routes/index.ts +2 -1
- package/src/queryBuilder/queryBuilder.ts +512 -473
|
@@ -10,6 +10,7 @@ export type ColumnSelectOptions = string | ColumnNameWithTableName;
|
|
|
10
10
|
export type ColumnNameWithTableName = {
|
|
11
11
|
name: string;
|
|
12
12
|
tableName?: string;
|
|
13
|
+
schema?: string;
|
|
13
14
|
};
|
|
14
15
|
export interface FindRowOptions {
|
|
15
16
|
filters?: RowFilterOptions[];
|
|
@@ -48,8 +49,18 @@ export interface FindRowPaginationOptions {
|
|
|
48
49
|
withoutTotal?: boolean;
|
|
49
50
|
}
|
|
50
51
|
export interface FindRowOrderByOptions {
|
|
52
|
+
/**
|
|
53
|
+
* 排序字段
|
|
54
|
+
*/
|
|
51
55
|
field: ColumnSelectOptions;
|
|
56
|
+
/**
|
|
57
|
+
* 是否倒序
|
|
58
|
+
*/
|
|
52
59
|
desc?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* 关系字段
|
|
62
|
+
*/
|
|
63
|
+
relationField?: ColumnNameWithTableName;
|
|
53
64
|
}
|
|
54
65
|
export interface CountRowOptions {
|
|
55
66
|
filters?: RowFilterOptions[];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { RpdDataModel } from "../types";
|
|
2
|
-
|
|
3
|
-
export declare function
|
|
2
|
+
import { IRpdServer } from "../core/server";
|
|
3
|
+
export declare function mapPropertyNameToColumnName(server: IRpdServer, model: RpdDataModel, propertyName: string): string;
|
|
4
|
+
export declare function mapPropertyNamesToColumnNames(server: IRpdServer, model: RpdDataModel, propertyNames: string[]): string[];
|
|
@@ -7,3 +7,4 @@ export declare function getEntityProperties(server: IRpdServer, model: RpdDataMo
|
|
|
7
7
|
export declare function getEntityPropertiesIncludingBase(server: IRpdServer, model: RpdDataModel): RpdDataModelProperty[];
|
|
8
8
|
export declare function getEntityPropertyByCode(server: IRpdServer, model: RpdDataModel, propertyCode: string): RpdDataModelProperty;
|
|
9
9
|
export declare function getEntityProperty(server: IRpdServer, model: RpdDataModel, predicate: (item: RpdDataModelProperty) => boolean): RpdDataModelProperty;
|
|
10
|
+
export declare function getEntityPropertyByFieldName(server: IRpdServer, model: RpdDataModel, fieldName: string): RpdDataModelProperty;
|