typeorm-extensions 2.2.0-rc.7 → 2.2.0-rc.9
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 +70 -39
- package/dist/decorators/generated-column.decorator.d.ts +17 -0
- package/dist/decorators/generated-column.decorator.js +15 -0
- package/dist/decorators/index.d.ts +1 -0
- package/dist/decorators/index.js +1 -0
- package/dist/extensions/calculated-column.extension.d.ts +3 -3
- package/dist/extensions/calculated-column.extension.js +3 -16
- package/dist/extensions/cursor-pagination.extension.js +7 -13
- package/dist/extensions/get-many-with-totals.extension.js +9 -32
- package/dist/extensions/join-lateral.extension.js +4 -6
- package/dist/extensions/period-filter.extension.js +1 -11
- package/dist/extensions/typed/index.d.ts +1 -0
- package/dist/extensions/typed/index.js +1 -0
- package/dist/extensions/typed/typed-calculated/typed-calculated-column.extension.d.ts +25 -0
- package/dist/extensions/typed/typed-calculated/typed-calculated-column.extension.js +24 -0
- package/dist/extensions/typed/typed-having/typed-having.extension.js +1 -1
- package/dist/extensions/typed/typed-joins/typed-join-and-map.extension.js +11 -10
- package/dist/extensions/typed/typed-joins/typed-joins.extension.js +11 -22
- package/dist/extensions/typed/typed-order-by/typed-order-by.extension.js +11 -17
- package/dist/extensions/typed/typed-returning/typed-returning.extension.js +1 -9
- package/dist/extensions/typed/typed-select/typed-select.extension.js +2 -8
- package/dist/extensions/typed/typed-where/typed-period-filter.extension.js +1 -11
- package/dist/extensions/typed/typed-where/typed-where-array.extension.js +4 -18
- package/dist/extensions/typed/typed-where/typed-where-ilike.extension.js +1 -11
- package/dist/extensions/typed/typed-where/typed-where-is-any.extension.js +3 -22
- package/dist/extensions/typed/typed-where/typed-where-is-distinct-from.extension.js +3 -22
- package/dist/extensions/typed/typed-where/typed-where-is-in.extension.js +3 -23
- package/dist/extensions/typed/typed-where/typed-where-json.extension.js +4 -23
- package/dist/extensions/typed/typed-where/typed-where-lower.extension.js +1 -11
- package/dist/extensions/typed/typed-where/typed-where-similar.extension.js +1 -10
- package/dist/extensions/typed/typed-where/typed-where.extension.js +2 -12
- package/dist/extensions/union.extension.js +1 -1
- package/dist/extensions/where-array.extension.js +1 -11
- package/dist/extensions/where-exists.extension.js +4 -15
- package/dist/extensions/where-is-any.extension.d.ts +38 -160
- package/dist/extensions/where-is-any.extension.js +1 -11
- package/dist/extensions/where-is-distinct-from.extension.js +1 -11
- package/dist/extensions/where-is-in.extension.d.ts +35 -145
- package/dist/extensions/where-is-in.extension.js +11 -29
- package/dist/extensions/where-json.extension.js +1 -11
- package/dist/extensions/where-relation-exists.extension.js +5 -25
- package/dist/helpers.d.ts +1 -0
- package/dist/helpers.js +2 -1
- package/dist/index.d.ts +1 -6
- package/dist/index.js +1 -12
- package/dist/types/extensions/cursor-pagination.types.d.ts +5 -0
- package/dist/types/extensions/get-many-with-totals.types.d.ts +4 -0
- package/dist/utils/calculated-column.utils.d.ts +8 -0
- package/dist/utils/calculated-column.utils.js +20 -3
- package/dist/utils/common.utils.d.ts +2 -0
- package/dist/utils/common.utils.js +4 -1
- package/dist/utils/cursor.utils.js +4 -6
- package/dist/utils/json-path.utils.js +2 -2
- package/dist/utils/pagination.utils.d.ts +7 -0
- package/dist/utils/pagination.utils.js +20 -10
- package/dist/utils/parameter.utils.d.ts +10 -0
- package/dist/utils/parameter.utils.js +22 -1
- package/dist/utils/period.utils.js +2 -1
- package/dist/utils/prototype.utils.d.ts +9 -0
- package/dist/utils/prototype.utils.js +12 -2
- package/dist/utils/query-builder.utils.d.ts +30 -2
- package/dist/utils/query-builder.utils.js +82 -44
- package/dist/utils/table.utils.js +9 -11
- package/dist/utils/time-zone.utils.d.ts +8 -0
- package/dist/utils/time-zone.utils.js +15 -5
- package/dist/utils/typed-where.utils.d.ts +9 -0
- package/dist/utils/typed-where.utils.js +17 -0
- package/dist/utils/where.utils.d.ts +2 -0
- package/dist/utils/where.utils.js +12 -14
- package/package.json +1 -1
|
@@ -1,177 +1,55 @@
|
|
|
1
1
|
import { ObjectLiteral } from 'typeorm';
|
|
2
2
|
import { ArgsType } from '../types/util-types';
|
|
3
|
+
export interface WhereIsAnyMethods {
|
|
4
|
+
/**
|
|
5
|
+
* Sets WHERE `field = ANY(:array)` condition in the query builder (PostgreSQL).
|
|
6
|
+
* The array is bound as a single parameter instead of one parameter per value.
|
|
7
|
+
* `arrayType` (e.g. `'uuid[]'`) casts the parameter: `= ANY(CAST(:array AS uuid[]))`.
|
|
8
|
+
* If you had previously WHERE expression defined,
|
|
9
|
+
* calling this function will override previously set WHERE conditions.
|
|
10
|
+
*/
|
|
11
|
+
whereIsAny(field: string, array?: ArgsType, arrayType?: string): this;
|
|
12
|
+
/**
|
|
13
|
+
* Adds new AND WHERE `field = ANY(:array)` condition in the query builder (PostgreSQL).
|
|
14
|
+
*/
|
|
15
|
+
andWhereIsAny(field: string, array?: ArgsType, arrayType?: string): this;
|
|
16
|
+
/**
|
|
17
|
+
* Adds new OR WHERE `field = ANY(:array)` condition in the query builder (PostgreSQL).
|
|
18
|
+
*/
|
|
19
|
+
orWhereIsAny(field: string, array?: ArgsType, arrayType?: string): this;
|
|
20
|
+
/**
|
|
21
|
+
* Sets WHERE `field <> ALL(:array)` condition in the query builder (PostgreSQL):
|
|
22
|
+
* the field differs from every value of the array.
|
|
23
|
+
* If you had previously WHERE expression defined,
|
|
24
|
+
* calling this function will override previously set WHERE conditions.
|
|
25
|
+
*/
|
|
26
|
+
whereIsNotAny(field: string, array?: ArgsType, arrayType?: string): this;
|
|
27
|
+
/**
|
|
28
|
+
* Adds new AND WHERE `field <> ALL(:array)` condition in the query builder (PostgreSQL).
|
|
29
|
+
*/
|
|
30
|
+
andWhereIsNotAny(field: string, array?: ArgsType, arrayType?: string): this;
|
|
31
|
+
/**
|
|
32
|
+
* Adds new OR WHERE `field <> ALL(:array)` condition in the query builder (PostgreSQL).
|
|
33
|
+
*/
|
|
34
|
+
orWhereIsNotAny(field: string, array?: ArgsType, arrayType?: string): this;
|
|
35
|
+
}
|
|
3
36
|
declare module 'typeorm/query-builder/WhereExpressionBuilder' {
|
|
4
|
-
interface WhereExpressionBuilder {
|
|
5
|
-
/**
|
|
6
|
-
* Sets WHERE `field = ANY(:array)` condition in the query builder (PostgreSQL).
|
|
7
|
-
* The array is bound as a single parameter instead of one parameter per value.
|
|
8
|
-
* `arrayType` (e.g. `'uuid[]'`) casts the parameter: `= ANY(CAST(:array AS uuid[]))`.
|
|
9
|
-
* If you had previously WHERE expression defined,
|
|
10
|
-
* calling this function will override previously set WHERE conditions.
|
|
11
|
-
*/
|
|
12
|
-
whereIsAny(field: string, array?: ArgsType, arrayType?: string): this;
|
|
13
|
-
/**
|
|
14
|
-
* Adds new AND WHERE `field = ANY(:array)` condition in the query builder (PostgreSQL).
|
|
15
|
-
*/
|
|
16
|
-
andWhereIsAny(field: string, array?: ArgsType, arrayType?: string): this;
|
|
17
|
-
/**
|
|
18
|
-
* Adds new OR WHERE `field = ANY(:array)` condition in the query builder (PostgreSQL).
|
|
19
|
-
*/
|
|
20
|
-
orWhereIsAny(field: string, array?: ArgsType, arrayType?: string): this;
|
|
21
|
-
/**
|
|
22
|
-
* Sets WHERE `field <> ALL(:array)` condition in the query builder (PostgreSQL):
|
|
23
|
-
* the field differs from every value of the array.
|
|
24
|
-
* If you had previously WHERE expression defined,
|
|
25
|
-
* calling this function will override previously set WHERE conditions.
|
|
26
|
-
*/
|
|
27
|
-
whereIsNotAny(field: string, array?: ArgsType, arrayType?: string): this;
|
|
28
|
-
/**
|
|
29
|
-
* Adds new AND WHERE `field <> ALL(:array)` condition in the query builder (PostgreSQL).
|
|
30
|
-
*/
|
|
31
|
-
andWhereIsNotAny(field: string, array?: ArgsType, arrayType?: string): this;
|
|
32
|
-
/**
|
|
33
|
-
* Adds new OR WHERE `field <> ALL(:array)` condition in the query builder (PostgreSQL).
|
|
34
|
-
*/
|
|
35
|
-
orWhereIsNotAny(field: string, array?: ArgsType, arrayType?: string): this;
|
|
37
|
+
interface WhereExpressionBuilder extends WhereIsAnyMethods {
|
|
36
38
|
}
|
|
37
39
|
}
|
|
38
40
|
declare module 'typeorm/query-builder/SelectQueryBuilder' {
|
|
39
|
-
interface SelectQueryBuilder<Entity extends ObjectLiteral> {
|
|
40
|
-
/**
|
|
41
|
-
* Sets WHERE `field = ANY(:array)` condition in the query builder (PostgreSQL).
|
|
42
|
-
* The array is bound as a single parameter instead of one parameter per value.
|
|
43
|
-
* `arrayType` (e.g. `'uuid[]'`) casts the parameter: `= ANY(CAST(:array AS uuid[]))`.
|
|
44
|
-
* If you had previously WHERE expression defined,
|
|
45
|
-
* calling this function will override previously set WHERE conditions.
|
|
46
|
-
*/
|
|
47
|
-
whereIsAny(field: string, array?: ArgsType, arrayType?: string): this;
|
|
48
|
-
/**
|
|
49
|
-
* Adds new AND WHERE `field = ANY(:array)` condition in the query builder (PostgreSQL).
|
|
50
|
-
*/
|
|
51
|
-
andWhereIsAny(field: string, array?: ArgsType, arrayType?: string): this;
|
|
52
|
-
/**
|
|
53
|
-
* Adds new OR WHERE `field = ANY(:array)` condition in the query builder (PostgreSQL).
|
|
54
|
-
*/
|
|
55
|
-
orWhereIsAny(field: string, array?: ArgsType, arrayType?: string): this;
|
|
56
|
-
/**
|
|
57
|
-
* Sets WHERE `field <> ALL(:array)` condition in the query builder (PostgreSQL):
|
|
58
|
-
* the field differs from every value of the array.
|
|
59
|
-
* If you had previously WHERE expression defined,
|
|
60
|
-
* calling this function will override previously set WHERE conditions.
|
|
61
|
-
*/
|
|
62
|
-
whereIsNotAny(field: string, array?: ArgsType, arrayType?: string): this;
|
|
63
|
-
/**
|
|
64
|
-
* Adds new AND WHERE `field <> ALL(:array)` condition in the query builder (PostgreSQL).
|
|
65
|
-
*/
|
|
66
|
-
andWhereIsNotAny(field: string, array?: ArgsType, arrayType?: string): this;
|
|
67
|
-
/**
|
|
68
|
-
* Adds new OR WHERE `field <> ALL(:array)` condition in the query builder (PostgreSQL).
|
|
69
|
-
*/
|
|
70
|
-
orWhereIsNotAny(field: string, array?: ArgsType, arrayType?: string): this;
|
|
41
|
+
interface SelectQueryBuilder<Entity extends ObjectLiteral> extends WhereIsAnyMethods {
|
|
71
42
|
}
|
|
72
43
|
}
|
|
73
44
|
declare module 'typeorm/query-builder/UpdateQueryBuilder' {
|
|
74
|
-
interface UpdateQueryBuilder<Entity extends ObjectLiteral> {
|
|
75
|
-
/**
|
|
76
|
-
* Sets WHERE `field = ANY(:array)` condition in the query builder (PostgreSQL).
|
|
77
|
-
* The array is bound as a single parameter instead of one parameter per value.
|
|
78
|
-
* `arrayType` (e.g. `'uuid[]'`) casts the parameter: `= ANY(CAST(:array AS uuid[]))`.
|
|
79
|
-
* If you had previously WHERE expression defined,
|
|
80
|
-
* calling this function will override previously set WHERE conditions.
|
|
81
|
-
*/
|
|
82
|
-
whereIsAny(field: string, array?: ArgsType, arrayType?: string): UpdateQueryBuilder<Entity>;
|
|
83
|
-
/**
|
|
84
|
-
* Adds new AND WHERE `field = ANY(:array)` condition in the query builder (PostgreSQL).
|
|
85
|
-
*/
|
|
86
|
-
andWhereIsAny(field: string, array?: ArgsType, arrayType?: string): UpdateQueryBuilder<Entity>;
|
|
87
|
-
/**
|
|
88
|
-
* Adds new OR WHERE `field = ANY(:array)` condition in the query builder (PostgreSQL).
|
|
89
|
-
*/
|
|
90
|
-
orWhereIsAny(field: string, array?: ArgsType, arrayType?: string): UpdateQueryBuilder<Entity>;
|
|
91
|
-
/**
|
|
92
|
-
* Sets WHERE `field <> ALL(:array)` condition in the query builder (PostgreSQL):
|
|
93
|
-
* the field differs from every value of the array.
|
|
94
|
-
* If you had previously WHERE expression defined,
|
|
95
|
-
* calling this function will override previously set WHERE conditions.
|
|
96
|
-
*/
|
|
97
|
-
whereIsNotAny(field: string, array?: ArgsType, arrayType?: string): UpdateQueryBuilder<Entity>;
|
|
98
|
-
/**
|
|
99
|
-
* Adds new AND WHERE `field <> ALL(:array)` condition in the query builder (PostgreSQL).
|
|
100
|
-
*/
|
|
101
|
-
andWhereIsNotAny(field: string, array?: ArgsType, arrayType?: string): UpdateQueryBuilder<Entity>;
|
|
102
|
-
/**
|
|
103
|
-
* Adds new OR WHERE `field <> ALL(:array)` condition in the query builder (PostgreSQL).
|
|
104
|
-
*/
|
|
105
|
-
orWhereIsNotAny(field: string, array?: ArgsType, arrayType?: string): UpdateQueryBuilder<Entity>;
|
|
45
|
+
interface UpdateQueryBuilder<Entity extends ObjectLiteral> extends WhereIsAnyMethods {
|
|
106
46
|
}
|
|
107
47
|
}
|
|
108
48
|
declare module 'typeorm/query-builder/DeleteQueryBuilder' {
|
|
109
|
-
interface DeleteQueryBuilder<Entity extends ObjectLiteral> {
|
|
110
|
-
/**
|
|
111
|
-
* Sets WHERE `field = ANY(:array)` condition in the query builder (PostgreSQL).
|
|
112
|
-
* The array is bound as a single parameter instead of one parameter per value.
|
|
113
|
-
* `arrayType` (e.g. `'uuid[]'`) casts the parameter: `= ANY(CAST(:array AS uuid[]))`.
|
|
114
|
-
* If you had previously WHERE expression defined,
|
|
115
|
-
* calling this function will override previously set WHERE conditions.
|
|
116
|
-
*/
|
|
117
|
-
whereIsAny(field: string, array?: ArgsType, arrayType?: string): DeleteQueryBuilder<Entity>;
|
|
118
|
-
/**
|
|
119
|
-
* Adds new AND WHERE `field = ANY(:array)` condition in the query builder (PostgreSQL).
|
|
120
|
-
*/
|
|
121
|
-
andWhereIsAny(field: string, array?: ArgsType, arrayType?: string): DeleteQueryBuilder<Entity>;
|
|
122
|
-
/**
|
|
123
|
-
* Adds new OR WHERE `field = ANY(:array)` condition in the query builder (PostgreSQL).
|
|
124
|
-
*/
|
|
125
|
-
orWhereIsAny(field: string, array?: ArgsType, arrayType?: string): DeleteQueryBuilder<Entity>;
|
|
126
|
-
/**
|
|
127
|
-
* Sets WHERE `field <> ALL(:array)` condition in the query builder (PostgreSQL):
|
|
128
|
-
* the field differs from every value of the array.
|
|
129
|
-
* If you had previously WHERE expression defined,
|
|
130
|
-
* calling this function will override previously set WHERE conditions.
|
|
131
|
-
*/
|
|
132
|
-
whereIsNotAny(field: string, array?: ArgsType, arrayType?: string): DeleteQueryBuilder<Entity>;
|
|
133
|
-
/**
|
|
134
|
-
* Adds new AND WHERE `field <> ALL(:array)` condition in the query builder (PostgreSQL).
|
|
135
|
-
*/
|
|
136
|
-
andWhereIsNotAny(field: string, array?: ArgsType, arrayType?: string): DeleteQueryBuilder<Entity>;
|
|
137
|
-
/**
|
|
138
|
-
* Adds new OR WHERE `field <> ALL(:array)` condition in the query builder (PostgreSQL).
|
|
139
|
-
*/
|
|
140
|
-
orWhereIsNotAny(field: string, array?: ArgsType, arrayType?: string): DeleteQueryBuilder<Entity>;
|
|
49
|
+
interface DeleteQueryBuilder<Entity extends ObjectLiteral> extends WhereIsAnyMethods {
|
|
141
50
|
}
|
|
142
51
|
}
|
|
143
52
|
declare module 'typeorm/query-builder/SoftDeleteQueryBuilder' {
|
|
144
|
-
interface SoftDeleteQueryBuilder<Entity extends ObjectLiteral> {
|
|
145
|
-
/**
|
|
146
|
-
* Sets WHERE `field = ANY(:array)` condition in the query builder (PostgreSQL).
|
|
147
|
-
* The array is bound as a single parameter instead of one parameter per value.
|
|
148
|
-
* `arrayType` (e.g. `'uuid[]'`) casts the parameter: `= ANY(CAST(:array AS uuid[]))`.
|
|
149
|
-
* If you had previously WHERE expression defined,
|
|
150
|
-
* calling this function will override previously set WHERE conditions.
|
|
151
|
-
*/
|
|
152
|
-
whereIsAny(field: string, array?: ArgsType, arrayType?: string): SoftDeleteQueryBuilder<Entity>;
|
|
153
|
-
/**
|
|
154
|
-
* Adds new AND WHERE `field = ANY(:array)` condition in the query builder (PostgreSQL).
|
|
155
|
-
*/
|
|
156
|
-
andWhereIsAny(field: string, array?: ArgsType, arrayType?: string): SoftDeleteQueryBuilder<Entity>;
|
|
157
|
-
/**
|
|
158
|
-
* Adds new OR WHERE `field = ANY(:array)` condition in the query builder (PostgreSQL).
|
|
159
|
-
*/
|
|
160
|
-
orWhereIsAny(field: string, array?: ArgsType, arrayType?: string): SoftDeleteQueryBuilder<Entity>;
|
|
161
|
-
/**
|
|
162
|
-
* Sets WHERE `field <> ALL(:array)` condition in the query builder (PostgreSQL):
|
|
163
|
-
* the field differs from every value of the array.
|
|
164
|
-
* If you had previously WHERE expression defined,
|
|
165
|
-
* calling this function will override previously set WHERE conditions.
|
|
166
|
-
*/
|
|
167
|
-
whereIsNotAny(field: string, array?: ArgsType, arrayType?: string): SoftDeleteQueryBuilder<Entity>;
|
|
168
|
-
/**
|
|
169
|
-
* Adds new AND WHERE `field <> ALL(:array)` condition in the query builder (PostgreSQL).
|
|
170
|
-
*/
|
|
171
|
-
andWhereIsNotAny(field: string, array?: ArgsType, arrayType?: string): SoftDeleteQueryBuilder<Entity>;
|
|
172
|
-
/**
|
|
173
|
-
* Adds new OR WHERE `field <> ALL(:array)` condition in the query builder (PostgreSQL).
|
|
174
|
-
*/
|
|
175
|
-
orWhereIsNotAny(field: string, array?: ArgsType, arrayType?: string): SoftDeleteQueryBuilder<Entity>;
|
|
53
|
+
interface SoftDeleteQueryBuilder<Entity extends ObjectLiteral> extends WhereIsAnyMethods {
|
|
176
54
|
}
|
|
177
55
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const typeorm_1 = require("typeorm");
|
|
4
|
-
const SoftDeleteQueryBuilder_1 = require("typeorm/query-builder/SoftDeleteQueryBuilder");
|
|
5
3
|
const prototype_utils_1 = require("../utils/prototype.utils");
|
|
6
4
|
const query_builder_utils_1 = require("../utils/query-builder.utils");
|
|
7
5
|
const sql_utils_1 = require("../utils/sql.utils");
|
|
@@ -18,15 +16,7 @@ const extension = {
|
|
|
18
16
|
orWhereIsNotAny: createWhereIsAnyMethod('orWhere', '<> ALL'),
|
|
19
17
|
},
|
|
20
18
|
};
|
|
21
|
-
|
|
22
|
-
typeorm_1.SelectQueryBuilder,
|
|
23
|
-
typeorm_1.UpdateQueryBuilder,
|
|
24
|
-
typeorm_1.DeleteQueryBuilder,
|
|
25
|
-
SoftDeleteQueryBuilder_1.SoftDeleteQueryBuilder,
|
|
26
|
-
];
|
|
27
|
-
queryBuilders.forEach((builder) => {
|
|
28
|
-
(0, prototype_utils_1.patchPrototype)(builder, extension);
|
|
29
|
-
});
|
|
19
|
+
(0, prototype_utils_1.patchPrototypes)(prototype_utils_1.WHERE_QUERY_BUILDERS, extension);
|
|
30
20
|
// implementation
|
|
31
21
|
function attachWhereIsAny(builder, method, field, comparison, array, arrayType) {
|
|
32
22
|
if (!method || typeof field !== 'string') {
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const typeorm_1 = require("typeorm");
|
|
4
|
-
const SoftDeleteQueryBuilder_1 = require("typeorm/query-builder/SoftDeleteQueryBuilder");
|
|
5
3
|
const prototype_utils_1 = require("../utils/prototype.utils");
|
|
6
4
|
const query_builder_utils_1 = require("../utils/query-builder.utils");
|
|
7
5
|
const sql_utils_1 = require("../utils/sql.utils");
|
|
@@ -20,15 +18,7 @@ const extension = {
|
|
|
20
18
|
orWhereIsNotDistinctFrom: createWhereDistinctMethod('orWhere', false),
|
|
21
19
|
},
|
|
22
20
|
};
|
|
23
|
-
|
|
24
|
-
typeorm_1.SelectQueryBuilder,
|
|
25
|
-
typeorm_1.UpdateQueryBuilder,
|
|
26
|
-
typeorm_1.DeleteQueryBuilder,
|
|
27
|
-
SoftDeleteQueryBuilder_1.SoftDeleteQueryBuilder,
|
|
28
|
-
];
|
|
29
|
-
queryBuilders.forEach((builder) => {
|
|
30
|
-
(0, prototype_utils_1.patchPrototype)(builder, extension);
|
|
31
|
-
});
|
|
21
|
+
(0, prototype_utils_1.patchPrototypes)(prototype_utils_1.WHERE_QUERY_BUILDERS, extension);
|
|
32
22
|
// implementation
|
|
33
23
|
/** `field IS [NOT] DISTINCT FROM value` in the database's own null-safe syntax. */
|
|
34
24
|
function buildDistinctCondition(driver, field, distinct, value) {
|
|
@@ -1,162 +1,52 @@
|
|
|
1
1
|
import { ObjectLiteral } from 'typeorm';
|
|
2
2
|
import { ArgsType } from '../types/util-types';
|
|
3
|
+
export interface WhereIsInMethods {
|
|
4
|
+
/**
|
|
5
|
+
* Sets WHERE IN condition in the query builder.
|
|
6
|
+
* If you had previously WHERE expression defined,
|
|
7
|
+
* calling this function will override previously set WHERE conditions.
|
|
8
|
+
*/
|
|
9
|
+
whereIsIn(field: string, array?: ArgsType): this;
|
|
10
|
+
/**
|
|
11
|
+
* Adds new AND WHERE IN condition in the query builder.
|
|
12
|
+
*/
|
|
13
|
+
andWhereIsIn(field: string, array?: ArgsType): this;
|
|
14
|
+
/**
|
|
15
|
+
* Adds new OR WHERE IN condition in the query builder.
|
|
16
|
+
*/
|
|
17
|
+
orWhereIsIn(field: string, array?: ArgsType): this;
|
|
18
|
+
/**
|
|
19
|
+
* Sets WHERE NOT IN condition in the query builder.
|
|
20
|
+
* If you had previously WHERE expression defined,
|
|
21
|
+
* calling this function will override previously set WHERE conditions.
|
|
22
|
+
*/
|
|
23
|
+
whereIsNotIn(field: string, array?: ArgsType): this;
|
|
24
|
+
/**
|
|
25
|
+
* Adds new AND WHERE NOT IN condition in the query builder.
|
|
26
|
+
*/
|
|
27
|
+
andWhereIsNotIn(field: string, array?: ArgsType): this;
|
|
28
|
+
/**
|
|
29
|
+
* Adds new OR WHERE NOT IN condition in the query builder.
|
|
30
|
+
*/
|
|
31
|
+
orWhereIsNotIn(field: string, array?: ArgsType): this;
|
|
32
|
+
}
|
|
3
33
|
declare module 'typeorm/query-builder/WhereExpressionBuilder' {
|
|
4
|
-
interface WhereExpressionBuilder {
|
|
5
|
-
/**
|
|
6
|
-
* Sets WHERE IN condition in the query builder.
|
|
7
|
-
* If you had previously WHERE expression defined,
|
|
8
|
-
* calling this function will override previously set WHERE conditions.
|
|
9
|
-
*/
|
|
10
|
-
whereIsIn(field: string, array?: ArgsType): this;
|
|
11
|
-
/**
|
|
12
|
-
* Adds new AND WHERE IN condition in the query builder.
|
|
13
|
-
*/
|
|
14
|
-
andWhereIsIn(field: string, array?: ArgsType): this;
|
|
15
|
-
/**
|
|
16
|
-
* Adds new OR WHERE IN condition in the query builder.
|
|
17
|
-
*/
|
|
18
|
-
orWhereIsIn(field: string, array?: ArgsType): this;
|
|
19
|
-
/**
|
|
20
|
-
* Sets WHERE NOT IN condition in the query builder.
|
|
21
|
-
* If you had previously WHERE expression defined,
|
|
22
|
-
* calling this function will override previously set WHERE conditions.
|
|
23
|
-
*/
|
|
24
|
-
whereIsNotIn(field: string, array?: ArgsType): this;
|
|
25
|
-
/**
|
|
26
|
-
* Adds new AND WHERE NOT IN condition in the query builder.
|
|
27
|
-
*/
|
|
28
|
-
andWhereIsNotIn(field: string, array?: ArgsType): this;
|
|
29
|
-
/**
|
|
30
|
-
* Adds new OR WHERE NOT IN condition in the query builder.
|
|
31
|
-
*/
|
|
32
|
-
orWhereIsNotIn(field: string, array?: ArgsType): this;
|
|
34
|
+
interface WhereExpressionBuilder extends WhereIsInMethods {
|
|
33
35
|
}
|
|
34
36
|
}
|
|
35
37
|
declare module 'typeorm/query-builder/SelectQueryBuilder' {
|
|
36
|
-
interface SelectQueryBuilder<Entity extends ObjectLiteral> {
|
|
37
|
-
/**
|
|
38
|
-
* Sets WHERE IN condition in the query builder.
|
|
39
|
-
* If you had previously WHERE expression defined,
|
|
40
|
-
* calling this function will override previously set WHERE conditions.
|
|
41
|
-
*/
|
|
42
|
-
whereIsIn(field: string, array?: ArgsType): this;
|
|
43
|
-
/**
|
|
44
|
-
* Adds new AND WHERE IN condition in the query builder.
|
|
45
|
-
*/
|
|
46
|
-
andWhereIsIn(field: string, array?: ArgsType): this;
|
|
47
|
-
/**
|
|
48
|
-
* Adds new OR WHERE IN condition in the query builder.
|
|
49
|
-
*/
|
|
50
|
-
orWhereIsIn(field: string, array?: ArgsType): this;
|
|
51
|
-
/**
|
|
52
|
-
* Sets WHERE NOT IN condition in the query builder.
|
|
53
|
-
* If you had previously WHERE expression defined,
|
|
54
|
-
* calling this function will override previously set WHERE conditions.
|
|
55
|
-
*/
|
|
56
|
-
whereIsNotIn(field: string, array?: ArgsType): this;
|
|
57
|
-
/**
|
|
58
|
-
* Adds new AND WHERE NOT IN condition in the query builder.
|
|
59
|
-
*/
|
|
60
|
-
andWhereIsNotIn(field: string, array?: ArgsType): this;
|
|
61
|
-
/**
|
|
62
|
-
* Adds new OR WHERE NOT IN condition in the query builder.
|
|
63
|
-
*/
|
|
64
|
-
orWhereIsNotIn(field: string, array?: ArgsType): this;
|
|
38
|
+
interface SelectQueryBuilder<Entity extends ObjectLiteral> extends WhereIsInMethods {
|
|
65
39
|
}
|
|
66
40
|
}
|
|
67
41
|
declare module 'typeorm/query-builder/UpdateQueryBuilder' {
|
|
68
|
-
interface UpdateQueryBuilder<Entity extends ObjectLiteral> {
|
|
69
|
-
/**
|
|
70
|
-
* Sets WHERE IN condition in the query builder.
|
|
71
|
-
* If you had previously WHERE expression defined,
|
|
72
|
-
* calling this function will override previously set WHERE conditions.
|
|
73
|
-
*/
|
|
74
|
-
whereIsIn(field: string, array?: ArgsType): UpdateQueryBuilder<Entity>;
|
|
75
|
-
/**
|
|
76
|
-
* Adds new AND WHERE IN condition in the query builder.
|
|
77
|
-
*/
|
|
78
|
-
andWhereIsIn(field: string, array?: ArgsType): UpdateQueryBuilder<Entity>;
|
|
79
|
-
/**
|
|
80
|
-
* Adds new OR WHERE IN condition in the query builder.
|
|
81
|
-
*/
|
|
82
|
-
orWhereIsIn(field: string, array?: ArgsType): UpdateQueryBuilder<Entity>;
|
|
83
|
-
/**
|
|
84
|
-
* Sets WHERE NOT IN condition in the query builder.
|
|
85
|
-
* If you had previously WHERE expression defined,
|
|
86
|
-
* calling this function will override previously set WHERE conditions.
|
|
87
|
-
*/
|
|
88
|
-
whereIsNotIn(field: string, array?: ArgsType): UpdateQueryBuilder<Entity>;
|
|
89
|
-
/**
|
|
90
|
-
* Adds new AND WHERE NOT IN condition in the query builder.
|
|
91
|
-
*/
|
|
92
|
-
andWhereIsNotIn(field: string, array?: ArgsType): UpdateQueryBuilder<Entity>;
|
|
93
|
-
/**
|
|
94
|
-
* Adds new OR WHERE NOT IN condition in the query builder.
|
|
95
|
-
*/
|
|
96
|
-
orWhereIsNotIn(field: string, array?: ArgsType): UpdateQueryBuilder<Entity>;
|
|
42
|
+
interface UpdateQueryBuilder<Entity extends ObjectLiteral> extends WhereIsInMethods {
|
|
97
43
|
}
|
|
98
44
|
}
|
|
99
45
|
declare module 'typeorm/query-builder/DeleteQueryBuilder' {
|
|
100
|
-
interface DeleteQueryBuilder<Entity extends ObjectLiteral> {
|
|
101
|
-
/**
|
|
102
|
-
* Sets WHERE IN condition in the query builder.
|
|
103
|
-
* If you had previously WHERE expression defined,
|
|
104
|
-
* calling this function will override previously set WHERE conditions.
|
|
105
|
-
*/
|
|
106
|
-
whereIsIn(field: string, array?: ArgsType): DeleteQueryBuilder<Entity>;
|
|
107
|
-
/**
|
|
108
|
-
* Adds new AND WHERE IN condition in the query builder.
|
|
109
|
-
*/
|
|
110
|
-
andWhereIsIn(field: string, array?: ArgsType): DeleteQueryBuilder<Entity>;
|
|
111
|
-
/**
|
|
112
|
-
* Adds new OR WHERE IN condition in the query builder.
|
|
113
|
-
*/
|
|
114
|
-
orWhereIsIn(field: string, array?: ArgsType): DeleteQueryBuilder<Entity>;
|
|
115
|
-
/**
|
|
116
|
-
* Sets WHERE NOT IN condition in the query builder.
|
|
117
|
-
* If you had previously WHERE expression defined,
|
|
118
|
-
* calling this function will override previously set WHERE conditions.
|
|
119
|
-
*/
|
|
120
|
-
whereIsNotIn(field: string, array?: ArgsType): DeleteQueryBuilder<Entity>;
|
|
121
|
-
/**
|
|
122
|
-
* Adds new AND WHERE NOT IN condition in the query builder.
|
|
123
|
-
*/
|
|
124
|
-
andWhereIsNotIn(field: string, array?: ArgsType): DeleteQueryBuilder<Entity>;
|
|
125
|
-
/**
|
|
126
|
-
* Adds new OR WHERE NOT IN condition in the query builder.
|
|
127
|
-
*/
|
|
128
|
-
orWhereIsNotIn(field: string, array?: ArgsType): DeleteQueryBuilder<Entity>;
|
|
46
|
+
interface DeleteQueryBuilder<Entity extends ObjectLiteral> extends WhereIsInMethods {
|
|
129
47
|
}
|
|
130
48
|
}
|
|
131
49
|
declare module 'typeorm/query-builder/SoftDeleteQueryBuilder' {
|
|
132
|
-
interface SoftDeleteQueryBuilder<Entity extends ObjectLiteral> {
|
|
133
|
-
/**
|
|
134
|
-
* Sets WHERE IN condition in the query builder.
|
|
135
|
-
* If you had previously WHERE expression defined,
|
|
136
|
-
* calling this function will override previously set WHERE conditions.
|
|
137
|
-
*/
|
|
138
|
-
whereIsIn(field: string, array?: ArgsType): SoftDeleteQueryBuilder<Entity>;
|
|
139
|
-
/**
|
|
140
|
-
* Adds new AND WHERE IN condition in the query builder.
|
|
141
|
-
*/
|
|
142
|
-
andWhereIsIn(field: string, array?: ArgsType): SoftDeleteQueryBuilder<Entity>;
|
|
143
|
-
/**
|
|
144
|
-
* Adds new OR WHERE IN condition in the query builder.
|
|
145
|
-
*/
|
|
146
|
-
orWhereIsIn(field: string, array?: ArgsType): SoftDeleteQueryBuilder<Entity>;
|
|
147
|
-
/**
|
|
148
|
-
* Sets WHERE NOT IN condition in the query builder.
|
|
149
|
-
* If you had previously WHERE expression defined,
|
|
150
|
-
* calling this function will override previously set WHERE conditions.
|
|
151
|
-
*/
|
|
152
|
-
whereIsNotIn(field: string, array?: ArgsType): SoftDeleteQueryBuilder<Entity>;
|
|
153
|
-
/**
|
|
154
|
-
* Adds new AND WHERE NOT IN condition in the query builder.
|
|
155
|
-
*/
|
|
156
|
-
andWhereIsNotIn(field: string, array?: ArgsType): SoftDeleteQueryBuilder<Entity>;
|
|
157
|
-
/**
|
|
158
|
-
* Adds new OR WHERE NOT IN condition in the query builder.
|
|
159
|
-
*/
|
|
160
|
-
orWhereIsNotIn(field: string, array?: ArgsType): SoftDeleteQueryBuilder<Entity>;
|
|
50
|
+
interface SoftDeleteQueryBuilder<Entity extends ObjectLiteral> extends WhereIsInMethods {
|
|
161
51
|
}
|
|
162
52
|
}
|
|
@@ -1,41 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const typeorm_1 = require("typeorm");
|
|
4
|
-
const SoftDeleteQueryBuilder_1 = require("typeorm/query-builder/SoftDeleteQueryBuilder");
|
|
5
3
|
const prototype_utils_1 = require("../utils/prototype.utils");
|
|
6
4
|
const where_utils_1 = require("../utils/where.utils");
|
|
5
|
+
/* eslint-enable @typescript-eslint/no-empty-interface, @typescript-eslint/no-unused-vars */
|
|
7
6
|
// patching
|
|
7
|
+
const createWhereIsInMethod = (method, operator) => function (field, array) {
|
|
8
|
+
return attachWhereIsIn(this, method, field, operator, array);
|
|
9
|
+
};
|
|
8
10
|
const extension = {
|
|
9
11
|
prototype: {
|
|
10
|
-
whereIsIn:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
orWhereIsIn: function (field, array) {
|
|
17
|
-
return attachWhereIsIn(this, 'orWhere', field, 'IN', array);
|
|
18
|
-
},
|
|
19
|
-
whereIsNotIn: function (field, array) {
|
|
20
|
-
return attachWhereIsIn(this, 'where', field, 'NOT IN', array);
|
|
21
|
-
},
|
|
22
|
-
andWhereIsNotIn: function (field, array) {
|
|
23
|
-
return attachWhereIsIn(this, 'andWhere', field, 'NOT IN', array);
|
|
24
|
-
},
|
|
25
|
-
orWhereIsNotIn: function (field, array) {
|
|
26
|
-
return attachWhereIsIn(this, 'orWhere', field, 'NOT IN', array);
|
|
27
|
-
},
|
|
12
|
+
whereIsIn: createWhereIsInMethod('where', 'IN'),
|
|
13
|
+
andWhereIsIn: createWhereIsInMethod('andWhere', 'IN'),
|
|
14
|
+
orWhereIsIn: createWhereIsInMethod('orWhere', 'IN'),
|
|
15
|
+
whereIsNotIn: createWhereIsInMethod('where', 'NOT IN'),
|
|
16
|
+
andWhereIsNotIn: createWhereIsInMethod('andWhere', 'NOT IN'),
|
|
17
|
+
orWhereIsNotIn: createWhereIsInMethod('orWhere', 'NOT IN'),
|
|
28
18
|
},
|
|
29
19
|
};
|
|
30
|
-
|
|
31
|
-
typeorm_1.SelectQueryBuilder,
|
|
32
|
-
typeorm_1.UpdateQueryBuilder,
|
|
33
|
-
typeorm_1.DeleteQueryBuilder,
|
|
34
|
-
SoftDeleteQueryBuilder_1.SoftDeleteQueryBuilder,
|
|
35
|
-
];
|
|
36
|
-
queryBuilders.forEach((builder) => {
|
|
37
|
-
(0, prototype_utils_1.patchPrototype)(builder, extension);
|
|
38
|
-
});
|
|
20
|
+
(0, prototype_utils_1.patchPrototypes)(prototype_utils_1.WHERE_QUERY_BUILDERS, extension);
|
|
39
21
|
// implementation
|
|
40
22
|
function attachWhereIsIn(builder, method, field, operator, array) {
|
|
41
23
|
if (method && typeof field === 'string' && typeof operator === 'string') {
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const typeorm_1 = require("typeorm");
|
|
4
|
-
const SoftDeleteQueryBuilder_1 = require("typeorm/query-builder/SoftDeleteQueryBuilder");
|
|
5
3
|
const prototype_utils_1 = require("../utils/prototype.utils");
|
|
6
4
|
const query_builder_utils_1 = require("../utils/query-builder.utils");
|
|
7
5
|
const sql_utils_1 = require("../utils/sql.utils");
|
|
@@ -23,15 +21,7 @@ const extension = {
|
|
|
23
21
|
orWhereJsonHasKey: createWhereJsonHasKeyMethod('orWhere'),
|
|
24
22
|
},
|
|
25
23
|
};
|
|
26
|
-
|
|
27
|
-
typeorm_1.SelectQueryBuilder,
|
|
28
|
-
typeorm_1.UpdateQueryBuilder,
|
|
29
|
-
typeorm_1.DeleteQueryBuilder,
|
|
30
|
-
SoftDeleteQueryBuilder_1.SoftDeleteQueryBuilder,
|
|
31
|
-
];
|
|
32
|
-
queryBuilders.forEach((builder) => {
|
|
33
|
-
(0, prototype_utils_1.patchPrototype)(builder, extension);
|
|
34
|
-
});
|
|
24
|
+
(0, prototype_utils_1.patchPrototypes)(prototype_utils_1.WHERE_QUERY_BUILDERS, extension);
|
|
35
25
|
// implementation
|
|
36
26
|
/**
|
|
37
27
|
* `CAST("table"."column" AS jsonb)`: makes `json` and `simple-json` (text) columns work, and is dropped by PostgreSQL
|
|
@@ -22,18 +22,12 @@ const extension = {
|
|
|
22
22
|
// implementation
|
|
23
23
|
function attachRelationExists(builder, method, negate, relationSelection, alias, where) {
|
|
24
24
|
const methodName = `${method}Relation${negate ? 'Not' : ''}Exists`;
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
throw new TypeError(`${methodName} expects the callback to select one relation, got ${key.length}: ${key.join(', ')}`);
|
|
28
|
-
}
|
|
29
|
-
const dot = key.indexOf('.');
|
|
30
|
-
const ownerAlias = key.slice(0, dot);
|
|
31
|
-
const propertyPath = key.slice(dot + 1);
|
|
32
|
-
const aliases = queryAliases(builder);
|
|
25
|
+
const { aliasName: ownerAlias, propertyPath } = (0, query_builder_utils_1.resolveTypedProperty)(builder, relationSelection, methodName);
|
|
26
|
+
const aliases = (0, query_builder_utils_1.listQueryAliases)(builder);
|
|
33
27
|
const owner = aliases.find((candidate) => candidate.name === ownerAlias);
|
|
34
28
|
const relation = (owner === null || owner === void 0 ? void 0 : owner.hasMetadata) ? owner.metadata.findRelationWithPropertyPath(propertyPath) : undefined;
|
|
35
|
-
if (!relation) {
|
|
36
|
-
throw new TypeError(`${methodName}: ${
|
|
29
|
+
if (!owner || !relation) {
|
|
30
|
+
throw new TypeError(`${methodName}: ${ownerAlias}.${propertyPath} is not a relation of an entity of the query`);
|
|
37
31
|
}
|
|
38
32
|
// in the subquery the alias would hide the outer one the join condition refers to; SQLite matches
|
|
39
33
|
// names without case, so 'USER' would hide 'user' there
|
|
@@ -45,26 +39,12 @@ function attachRelationExists(builder, method, negate, relationSelection, alias,
|
|
|
45
39
|
.createQueryBuilder()
|
|
46
40
|
.select('1')
|
|
47
41
|
.from(relation.inverseEntityMetadata.target, alias);
|
|
48
|
-
const correlation = joinCondition(relation,
|
|
42
|
+
const correlation = joinCondition(relation, owner.name, alias, column, subQuery);
|
|
49
43
|
where === null || where === void 0 ? void 0 : where(subQuery);
|
|
50
44
|
// after the caller's conditions, so a `where` or an `orWhere` of theirs can't drop or bypass it
|
|
51
45
|
(0, where_utils_1.andWhereNarrowing)(subQuery, correlation);
|
|
52
46
|
return (0, where_exists_extension_1.attachExists)(builder, method, subQuery, negate);
|
|
53
47
|
}
|
|
54
|
-
/**
|
|
55
|
-
* The aliases of the query and of the queries it is part of. Inside `Brackets` the builder has the outer
|
|
56
|
-
* query's main alias but none of its joins: those are on its parent.
|
|
57
|
-
*/
|
|
58
|
-
function queryAliases(builder) {
|
|
59
|
-
const aliases = [];
|
|
60
|
-
// parentQueryBuilder is protected in TypeORM's types
|
|
61
|
-
let query = builder;
|
|
62
|
-
for (; query; query = query.parentQueryBuilder) {
|
|
63
|
-
const { aliases: own, mainAlias } = query.expressionMap;
|
|
64
|
-
aliases.push(...own, ...(mainAlias ? [mainAlias] : []));
|
|
65
|
-
}
|
|
66
|
-
return aliases;
|
|
67
|
-
}
|
|
68
48
|
const equal = (left, right) => `${left} = ${right}`;
|
|
69
49
|
/** The condition between the related rows (`alias`) and the outer row (`ownerAlias`); joins the junction table of a many-to-many. */
|
|
70
50
|
function joinCondition(relation, ownerAlias, alias, column, subQuery) {
|
package/dist/helpers.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from './utils/table.utils';
|
|
2
|
+
export * from './decorators/generated-column.decorator';
|
|
2
3
|
export { escapeLikePattern } from './utils/search.utils';
|
|
3
4
|
export { COCKROACHDB_RESERVED_KEY_WORDS, findBareReservedQualifiers, POSTGRES_RESERVED_KEY_WORDS, } from './utils/reserved-qualifier.utils';
|
|
4
5
|
export type { ReservedQualifier } from './utils/reserved-qualifier.utils';
|
package/dist/helpers.js
CHANGED
|
@@ -16,9 +16,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.ReservedQualifierError = exports.enableReservedQualifierGuard = exports.disableReservedQualifierGuard = exports.POSTGRES_RESERVED_KEY_WORDS = exports.findBareReservedQualifiers = exports.COCKROACHDB_RESERVED_KEY_WORDS = exports.escapeLikePattern = void 0;
|
|
18
18
|
// Side-effect-free entry point: `typeorm-extensions/helpers`.
|
|
19
|
-
// Exports helpers (tableHelper, escapeLikePattern, the reserved qualifier guard) only and patches nothing on import;
|
|
19
|
+
// Exports helpers (tableHelper, escapeLikePattern, the reserved qualifier guard, @GeneratedColumn) only and patches nothing on import;
|
|
20
20
|
// importing the package root (`typeorm-extensions`) installs every QueryBuilder extension.
|
|
21
21
|
__exportStar(require("./utils/table.utils"), exports);
|
|
22
|
+
__exportStar(require("./decorators/generated-column.decorator"), exports);
|
|
22
23
|
var search_utils_1 = require("./utils/search.utils");
|
|
23
24
|
Object.defineProperty(exports, "escapeLikePattern", { enumerable: true, get: function () { return search_utils_1.escapeLikePattern; } });
|
|
24
25
|
var reserved_qualifier_utils_1 = require("./utils/reserved-qualifier.utils");
|
package/dist/index.d.ts
CHANGED
|
@@ -4,9 +4,4 @@ export * from './types/interfaces';
|
|
|
4
4
|
export * from './types/extensions';
|
|
5
5
|
export type { Json } from './types/modules/proxy-callback.types';
|
|
6
6
|
export type { TypedRoot, WithTypedRoot } from './types/modules/typed-root.types';
|
|
7
|
-
export * from './
|
|
8
|
-
export { escapeLikePattern } from './utils/search.utils';
|
|
9
|
-
export { COCKROACHDB_RESERVED_KEY_WORDS, findBareReservedQualifiers, POSTGRES_RESERVED_KEY_WORDS, } from './utils/reserved-qualifier.utils';
|
|
10
|
-
export type { ReservedQualifier } from './utils/reserved-qualifier.utils';
|
|
11
|
-
export { disableReservedQualifierGuard, enableReservedQualifierGuard, ReservedQualifierError, } from './utils/reserved-qualifier-guard.utils';
|
|
12
|
-
export type { ReservedQualifierGuardOptions } from './utils/reserved-qualifier-guard.utils';
|
|
7
|
+
export * from './helpers';
|
package/dist/index.js
CHANGED
|
@@ -14,19 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.ReservedQualifierError = exports.enableReservedQualifierGuard = exports.disableReservedQualifierGuard = exports.POSTGRES_RESERVED_KEY_WORDS = exports.findBareReservedQualifiers = exports.COCKROACHDB_RESERVED_KEY_WORDS = exports.escapeLikePattern = void 0;
|
|
18
17
|
__exportStar(require("./extensions"), exports);
|
|
19
18
|
__exportStar(require("./decorators"), exports);
|
|
20
19
|
__exportStar(require("./types/interfaces"), exports);
|
|
21
20
|
__exportStar(require("./types/extensions"), exports);
|
|
22
|
-
__exportStar(require("./
|
|
23
|
-
var search_utils_1 = require("./utils/search.utils");
|
|
24
|
-
Object.defineProperty(exports, "escapeLikePattern", { enumerable: true, get: function () { return search_utils_1.escapeLikePattern; } });
|
|
25
|
-
var reserved_qualifier_utils_1 = require("./utils/reserved-qualifier.utils");
|
|
26
|
-
Object.defineProperty(exports, "COCKROACHDB_RESERVED_KEY_WORDS", { enumerable: true, get: function () { return reserved_qualifier_utils_1.COCKROACHDB_RESERVED_KEY_WORDS; } });
|
|
27
|
-
Object.defineProperty(exports, "findBareReservedQualifiers", { enumerable: true, get: function () { return reserved_qualifier_utils_1.findBareReservedQualifiers; } });
|
|
28
|
-
Object.defineProperty(exports, "POSTGRES_RESERVED_KEY_WORDS", { enumerable: true, get: function () { return reserved_qualifier_utils_1.POSTGRES_RESERVED_KEY_WORDS; } });
|
|
29
|
-
var reserved_qualifier_guard_utils_1 = require("./utils/reserved-qualifier-guard.utils");
|
|
30
|
-
Object.defineProperty(exports, "disableReservedQualifierGuard", { enumerable: true, get: function () { return reserved_qualifier_guard_utils_1.disableReservedQualifierGuard; } });
|
|
31
|
-
Object.defineProperty(exports, "enableReservedQualifierGuard", { enumerable: true, get: function () { return reserved_qualifier_guard_utils_1.enableReservedQualifierGuard; } });
|
|
32
|
-
Object.defineProperty(exports, "ReservedQualifierError", { enumerable: true, get: function () { return reserved_qualifier_guard_utils_1.ReservedQualifierError; } });
|
|
21
|
+
__exportStar(require("./helpers"), exports);
|