@carbonorm/carbonnode 3.9.5 → 3.9.6
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/api/C6Constants.d.ts +4 -0
- package/dist/api/orm/builders/ConditionBuilder.d.ts +14 -2
- package/dist/index.cjs.js +459 -243
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +459 -243
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/__tests__/sakila-db/C6.js +1 -1
- package/src/__tests__/sakila-db/C6.ts +1 -1
- package/src/__tests__/sqlBuilders.expressions.test.ts +163 -0
- package/src/api/C6Constants.ts +2 -0
- package/src/api/orm/builders/ConditionBuilder.ts +479 -224
- package/src/api/orm/builders/JoinBuilder.ts +8 -5
|
@@ -3,6 +3,7 @@ export declare const C6Constants: {
|
|
|
3
3
|
ADDTIME: string;
|
|
4
4
|
AS: string;
|
|
5
5
|
ASC: string;
|
|
6
|
+
AND: string;
|
|
6
7
|
BETWEEN: string;
|
|
7
8
|
CONCAT: string;
|
|
8
9
|
CONVERT_TZ: string;
|
|
@@ -76,6 +77,7 @@ export declare const C6Constants: {
|
|
|
76
77
|
NOW: string;
|
|
77
78
|
NULL: string;
|
|
78
79
|
ORDER: string;
|
|
80
|
+
OR: string;
|
|
79
81
|
PAGE: string;
|
|
80
82
|
PAGINATION: string;
|
|
81
83
|
RIGHT_OUTER: string;
|
|
@@ -162,6 +164,7 @@ export declare const C6C: {
|
|
|
162
164
|
ADDTIME: string;
|
|
163
165
|
AS: string;
|
|
164
166
|
ASC: string;
|
|
167
|
+
AND: string;
|
|
165
168
|
BETWEEN: string;
|
|
166
169
|
CONCAT: string;
|
|
167
170
|
CONVERT_TZ: string;
|
|
@@ -235,6 +238,7 @@ export declare const C6C: {
|
|
|
235
238
|
NOW: string;
|
|
236
239
|
NULL: string;
|
|
237
240
|
ORDER: string;
|
|
241
|
+
OR: string;
|
|
238
242
|
PAGE: string;
|
|
239
243
|
PAGINATION: string;
|
|
240
244
|
RIGHT_OUTER: string;
|
|
@@ -11,10 +11,22 @@ export declare abstract class ConditionBuilder<G extends OrmGenerics> extends Ag
|
|
|
11
11
|
protected isColumnRef(ref: string): boolean;
|
|
12
12
|
abstract build(table: string): SqlBuilderResult;
|
|
13
13
|
execute(): Promise<DetermineResponseDataType<G['RequestMethod'], G['RestTableInterface']>>;
|
|
14
|
-
private readonly
|
|
14
|
+
private readonly BOOLEAN_OPERATORS;
|
|
15
|
+
private readonly OPERATOR_ALIASES;
|
|
15
16
|
private isTableReference;
|
|
16
|
-
private validateOperator;
|
|
17
17
|
addParam(params: any[] | Record<string, any>, column: string, value: any): string;
|
|
18
|
+
private normalizeOperatorKey;
|
|
19
|
+
private formatOperator;
|
|
20
|
+
private isOperator;
|
|
21
|
+
private looksLikeSafeFunctionExpression;
|
|
22
|
+
private ensureWrapped;
|
|
23
|
+
private joinBooleanParts;
|
|
24
|
+
private normalizeFunctionField;
|
|
25
|
+
private buildFunctionCall;
|
|
26
|
+
private serializeOperand;
|
|
27
|
+
private buildOperatorExpression;
|
|
28
|
+
private buildLegacyColumnCondition;
|
|
29
|
+
private buildBooleanExpression;
|
|
18
30
|
buildBooleanJoinedConditions(set: any, andMode?: boolean, params?: any[] | Record<string, any>): string;
|
|
19
31
|
buildWhereClause(whereArg: any, params: any[] | Record<string, any>): string;
|
|
20
32
|
}
|