@gingkoo/pandora-metabase 1.0.0-alpha.18 → 1.0.0-alpha.19
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/es/index.js +185 -23
- package/lib/es/index.js.map +1 -1
- package/lib/es/store/types.d.ts +4 -3
- package/lib/es/utils.d.ts +2 -1
- package/package.json +1 -1
package/lib/es/store/types.d.ts
CHANGED
|
@@ -17,7 +17,6 @@ interface ExpressionsType {
|
|
|
17
17
|
right_string: string;
|
|
18
18
|
right_type: 'string' | 'constant' | 'field' | '' | null;
|
|
19
19
|
right_constant: string;
|
|
20
|
-
right_isString: boolean;
|
|
21
20
|
}
|
|
22
21
|
export interface TableColumnsMapType {
|
|
23
22
|
[tableName: string]: initColumnsType[];
|
|
@@ -50,6 +49,8 @@ export interface MetaData {
|
|
|
50
49
|
type: TypeEnum.data;
|
|
51
50
|
table: MetaData_TableType;
|
|
52
51
|
columns: MetaData_ColumnsType[];
|
|
52
|
+
isSubquery?: boolean;
|
|
53
|
+
subquery?: MetaListType[];
|
|
53
54
|
}
|
|
54
55
|
export interface MetaJoin_TalbeType {
|
|
55
56
|
name: string;
|
|
@@ -76,7 +77,7 @@ export interface MetaJoin {
|
|
|
76
77
|
columns: MetaData_ColumnsType[];
|
|
77
78
|
expressions: ExpressionsType[];
|
|
78
79
|
isSubquery?: boolean;
|
|
79
|
-
subquery?:
|
|
80
|
+
subquery?: MetaListType[];
|
|
80
81
|
}
|
|
81
82
|
export interface MetaCustom_Item {
|
|
82
83
|
name: string;
|
|
@@ -117,7 +118,7 @@ export interface MetaFilter_Item {
|
|
|
117
118
|
constantName?: string;
|
|
118
119
|
table2?: MetaJoin_TalbeType | null;
|
|
119
120
|
formula?: Filter_Formula;
|
|
120
|
-
subquery?:
|
|
121
|
+
subquery?: MetaListType[];
|
|
121
122
|
type?: Filter_TypeEnum;
|
|
122
123
|
summarizeType?: MetaSummarize_Enum;
|
|
123
124
|
sql?: string;
|
package/lib/es/utils.d.ts
CHANGED
|
@@ -14,8 +14,9 @@ interface HelperResultType {
|
|
|
14
14
|
}
|
|
15
15
|
export declare const getHelper: (list: MetaListType[], item: MetaListType) => HelperResultType;
|
|
16
16
|
export declare const getSubColumns: (metaList: any) => DataType[];
|
|
17
|
-
export declare const changeTableAlias: (list: MetaListType[], curObj: MetaData_TableType) => MetaListType[];
|
|
17
|
+
export declare const changeTableAlias: (list: MetaListType[] | [], curObj: MetaData_TableType) => [] | MetaListType[];
|
|
18
18
|
export declare const changeFieldAlias: (list: MetaListType[], curObj: MetaData_ColumnsType) => MetaListType[];
|
|
19
19
|
export declare function splitByUnion(data: any): any[];
|
|
20
20
|
export declare function reassembleByUnion(target?: any[]): any[];
|
|
21
|
+
export declare const buildSqlQuery: (data?: MetaListType[]) => string;
|
|
21
22
|
export {};
|