mythix-orm 1.11.6 → 1.12.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/README.md +100 -9
- package/lib/connection/connection-base.js +173 -39
- package/lib/connection/literals/average-literal.js +67 -0
- package/lib/connection/literals/count-literal.js +80 -0
- package/lib/connection/literals/distinct-literal.js +71 -0
- package/lib/connection/literals/field-literal.js +54 -0
- package/lib/connection/literals/literal-base.d.ts +1 -0
- package/lib/connection/literals/literal-base.js +137 -2
- package/lib/connection/literals/literal-field-base.js +50 -0
- package/lib/connection/literals/literal.js +15 -0
- package/lib/connection/literals/max-literal.js +67 -0
- package/lib/connection/literals/min-literal.js +67 -0
- package/lib/connection/literals/sum-literal.js +67 -0
- package/lib/connection/query-generator-base.js +273 -0
- package/lib/field.js +1 -1
- package/lib/model.js +54 -2
- package/lib/proxy-class/proxy-class.js +156 -21
- package/lib/query-engine/field-scope.js +401 -9
- package/lib/query-engine/model-scope.js +572 -13
- package/lib/query-engine/query-engine-base.js +590 -30
- package/lib/query-engine/query-engine.d.ts +13 -2
- package/lib/query-engine/query-engine.js +525 -18
- package/lib/types/helpers/default-helpers.js +124 -0
- package/lib/types/type.js +297 -3
- package/lib/utils/async-store.js +80 -3
- package/package.json +1 -2
|
@@ -16,12 +16,24 @@ export declare interface CallableInterface {
|
|
|
16
16
|
[key: string]: QueryEngine;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
export declare interface QueryInfo {
|
|
20
|
+
hasDistinct: boolean;
|
|
21
|
+
hasOrder: boolean;
|
|
22
|
+
hasProjection: boolean;
|
|
23
|
+
hasGroupBy: boolean;
|
|
24
|
+
hasHaving: boolean;
|
|
25
|
+
hasCondition: boolean;
|
|
26
|
+
hasTableJoins: boolean;
|
|
27
|
+
hasField: boolean;
|
|
28
|
+
hasModel: boolean;
|
|
29
|
+
}
|
|
30
|
+
|
|
19
31
|
export declare class QueryEngine<T = ConnectionBase> {
|
|
20
32
|
// QueryEngineBase
|
|
21
33
|
static generateID(): number;
|
|
22
34
|
static isQueryOperationContext(value: any): boolean;
|
|
23
35
|
static isQuery(value: any): boolean;
|
|
24
|
-
static
|
|
36
|
+
static getQueryOperationInfo(query: QueryEngine): QueryInfo;
|
|
25
37
|
|
|
26
38
|
public getModelScopeClass(): QueryEngine;
|
|
27
39
|
public getFieldScopeClass(): QueryEngine;
|
|
@@ -75,7 +87,6 @@ export declare class QueryEngine<T = ConnectionBase> {
|
|
|
75
87
|
|
|
76
88
|
// ModelScope
|
|
77
89
|
public _getField(fieldName: string): Field | undefined;
|
|
78
|
-
public _getQueryEngineClass(): QueryEngineClass;
|
|
79
90
|
public Field(fieldName: string): QueryEngine;
|
|
80
91
|
public LIMIT(value: number): QueryEngine;
|
|
81
92
|
public OFFSET(value: number): QueryEngine;
|