typeorm-extensions 2.2.0-rc.6 → 2.2.0-rc.7
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/extensions/cursor-pagination.extension.d.ts +2 -1
- package/dist/extensions/order.extension.d.ts +2 -2
- package/dist/extensions/pagination.extension.d.ts +1 -1
- package/dist/extensions/period-filter.extension.d.ts +4 -0
- package/dist/extensions/period-filter.extension.js +2 -0
- package/dist/extensions/typed/index.d.ts +1 -0
- package/dist/extensions/typed/index.js +1 -0
- package/dist/extensions/typed/typed-distinct/typed-distinct.extension.d.ts +2 -2
- package/dist/extensions/typed/typed-group-by/typed-group-by.extension.d.ts +2 -2
- package/dist/extensions/typed/typed-having/typed-having.extension.d.ts +4 -4
- package/dist/extensions/typed/typed-joins/typed-join-and-map.extension.d.ts +19 -0
- package/dist/extensions/typed/typed-joins/typed-join-and-map.extension.js +22 -0
- package/dist/extensions/typed/typed-joins/typed-joins.extension.d.ts +4 -4
- package/dist/extensions/typed/typed-order-by/typed-order-by-array-position.extension.d.ts +2 -2
- package/dist/extensions/typed/typed-order-by/typed-order-by.extension.d.ts +2 -2
- package/dist/extensions/typed/typed-root.extension.d.ts +26 -4
- package/dist/extensions/typed/typed-select/typed-select.extension.d.ts +6 -6
- package/dist/extensions/typed/typed-where/typed-period-filter.extension.d.ts +5 -1
- package/dist/extensions/typed/typed-where/typed-period-filter.extension.js +2 -0
- package/dist/extensions/typed/typed-where/typed-where-array.extension.d.ts +13 -9
- package/dist/extensions/typed/typed-where/typed-where-array.extension.js +2 -0
- package/dist/extensions/typed/typed-where/typed-where-ilike.extension.d.ts +10 -6
- package/dist/extensions/typed/typed-where/typed-where-ilike.extension.js +2 -0
- package/dist/extensions/typed/typed-where/typed-where-is-any.extension.d.ts +10 -6
- package/dist/extensions/typed/typed-where/typed-where-is-any.extension.js +2 -0
- package/dist/extensions/typed/typed-where/typed-where-is-distinct-from.extension.d.ts +10 -6
- package/dist/extensions/typed/typed-where/typed-where-is-distinct-from.extension.js +2 -0
- package/dist/extensions/typed/typed-where/typed-where-is-in.extension.d.ts +10 -6
- package/dist/extensions/typed/typed-where/typed-where-is-in.extension.js +2 -0
- package/dist/extensions/typed/typed-where/typed-where-json.extension.d.ts +10 -6
- package/dist/extensions/typed/typed-where/typed-where-json.extension.js +2 -0
- package/dist/extensions/typed/typed-where/typed-where-lower.extension.d.ts +10 -6
- package/dist/extensions/typed/typed-where/typed-where-lower.extension.js +2 -0
- package/dist/extensions/typed/typed-where/typed-where-similar.extension.d.ts +8 -4
- package/dist/extensions/typed/typed-where/typed-where-similar.extension.js +2 -0
- package/dist/extensions/typed/typed-where/typed-where.extension.d.ts +7 -3
- package/dist/extensions/typed/typed-where/typed-where.extension.js +2 -0
- package/dist/extensions/where-array.extension.d.ts +4 -0
- package/dist/extensions/where-array.extension.js +2 -0
- package/dist/extensions/where-is-any.extension.d.ts +41 -6
- package/dist/extensions/where-is-any.extension.js +2 -0
- package/dist/extensions/where-is-distinct-from.extension.d.ts +4 -0
- package/dist/extensions/where-is-distinct-from.extension.js +2 -0
- package/dist/extensions/where-is-in.extension.d.ts +38 -6
- package/dist/extensions/where-is-in.extension.js +2 -0
- package/dist/extensions/where-json.extension.d.ts +4 -0
- package/dist/extensions/where-json.extension.js +2 -0
- package/dist/extensions/where-relation-exists.extension.d.ts +6 -6
- package/dist/helpers.d.ts +4 -0
- package/dist/helpers.js +11 -3
- package/dist/index.d.ts +4 -0
- package/dist/index.js +9 -1
- package/dist/types/extensions/index.d.ts +1 -0
- package/dist/types/extensions/index.js +1 -0
- package/dist/types/extensions/typed-join-and-map.types.d.ts +6 -0
- package/dist/types/extensions/typed-join-and-map.types.js +2 -0
- package/dist/types/modules/typed-root.types.d.ts +11 -9
- package/dist/utils/query-builder.utils.d.ts +3 -2
- package/dist/utils/query-builder.utils.js +6 -4
- package/dist/utils/reserved-qualifier-guard.utils.d.ts +36 -0
- package/dist/utils/reserved-qualifier-guard.utils.js +98 -0
- package/dist/utils/reserved-qualifier.utils.d.ts +33 -0
- package/dist/utils/reserved-qualifier.utils.js +252 -0
- package/dist/utils/table.utils.d.ts +27 -11
- package/dist/utils/table.utils.js +49 -12
- package/package.json +2 -2
|
@@ -12,29 +12,29 @@ export interface TypedWhereDistinctMethods<Entity extends ObjectLiteral> {
|
|
|
12
12
|
* If you had previously WHERE expression defined,
|
|
13
13
|
* calling this function will override previously set WHERE conditions.
|
|
14
14
|
*/
|
|
15
|
-
whereIsDistinctFromTyped<Type extends ObjectLiteral = TypedRoot<Entity>>(where: (proxy: DeepUnwrapArray<Type>) => ProxyColumnValueType, value: unknown): this;
|
|
15
|
+
whereIsDistinctFromTyped<Type extends ObjectLiteral = TypedRoot<Entity, this>>(where: (proxy: DeepUnwrapArray<Type>) => ProxyColumnValueType, value: unknown): this;
|
|
16
16
|
/**
|
|
17
17
|
* Adds new AND WHERE `column IS DISTINCT FROM :value` condition: the column differs from the value, `NULL` included.
|
|
18
18
|
*/
|
|
19
|
-
andWhereIsDistinctFromTyped<Type extends ObjectLiteral = TypedRoot<Entity>>(where: (proxy: DeepUnwrapArray<Type>) => ProxyColumnValueType, value: unknown): this;
|
|
19
|
+
andWhereIsDistinctFromTyped<Type extends ObjectLiteral = TypedRoot<Entity, this>>(where: (proxy: DeepUnwrapArray<Type>) => ProxyColumnValueType, value: unknown): this;
|
|
20
20
|
/**
|
|
21
21
|
* Adds new OR WHERE `column IS DISTINCT FROM :value` condition: the column differs from the value, `NULL` included.
|
|
22
22
|
*/
|
|
23
|
-
orWhereIsDistinctFromTyped<Type extends ObjectLiteral = TypedRoot<Entity>>(where: (proxy: DeepUnwrapArray<Type>) => ProxyColumnValueType, value: unknown): this;
|
|
23
|
+
orWhereIsDistinctFromTyped<Type extends ObjectLiteral = TypedRoot<Entity, this>>(where: (proxy: DeepUnwrapArray<Type>) => ProxyColumnValueType, value: unknown): this;
|
|
24
24
|
/**
|
|
25
25
|
* Sets WHERE `column IS NOT DISTINCT FROM :value` condition: the column equals the value, `NULL` included.
|
|
26
26
|
* If you had previously WHERE expression defined,
|
|
27
27
|
* calling this function will override previously set WHERE conditions.
|
|
28
28
|
*/
|
|
29
|
-
whereIsNotDistinctFromTyped<Type extends ObjectLiteral = TypedRoot<Entity>>(where: (proxy: DeepUnwrapArray<Type>) => ProxyColumnValueType, value: unknown): this;
|
|
29
|
+
whereIsNotDistinctFromTyped<Type extends ObjectLiteral = TypedRoot<Entity, this>>(where: (proxy: DeepUnwrapArray<Type>) => ProxyColumnValueType, value: unknown): this;
|
|
30
30
|
/**
|
|
31
31
|
* Adds new AND WHERE `column IS NOT DISTINCT FROM :value` condition: the column equals the value, `NULL` included.
|
|
32
32
|
*/
|
|
33
|
-
andWhereIsNotDistinctFromTyped<Type extends ObjectLiteral = TypedRoot<Entity>>(where: (proxy: DeepUnwrapArray<Type>) => ProxyColumnValueType, value: unknown): this;
|
|
33
|
+
andWhereIsNotDistinctFromTyped<Type extends ObjectLiteral = TypedRoot<Entity, this>>(where: (proxy: DeepUnwrapArray<Type>) => ProxyColumnValueType, value: unknown): this;
|
|
34
34
|
/**
|
|
35
35
|
* Adds new OR WHERE `column IS NOT DISTINCT FROM :value` condition: the column equals the value, `NULL` included.
|
|
36
36
|
*/
|
|
37
|
-
orWhereIsNotDistinctFromTyped<Type extends ObjectLiteral = TypedRoot<Entity>>(where: (proxy: DeepUnwrapArray<Type>) => ProxyColumnValueType, value: unknown): this;
|
|
37
|
+
orWhereIsNotDistinctFromTyped<Type extends ObjectLiteral = TypedRoot<Entity, this>>(where: (proxy: DeepUnwrapArray<Type>) => ProxyColumnValueType, value: unknown): this;
|
|
38
38
|
}
|
|
39
39
|
declare module 'typeorm/query-builder/WhereExpressionBuilder' {
|
|
40
40
|
interface WhereExpressionBuilder extends TypedWhereDistinctMethods<ObjectLiteral> {
|
|
@@ -52,3 +52,7 @@ declare module 'typeorm/query-builder/DeleteQueryBuilder' {
|
|
|
52
52
|
interface DeleteQueryBuilder<Entity extends ObjectLiteral> extends TypedWhereDistinctMethods<Entity> {
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
+
declare module 'typeorm/query-builder/SoftDeleteQueryBuilder' {
|
|
56
|
+
interface SoftDeleteQueryBuilder<Entity extends ObjectLiteral> extends TypedWhereDistinctMethods<Entity> {
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
require("../../where-is-distinct-from.extension");
|
|
4
4
|
const typeorm_1 = require("typeorm");
|
|
5
|
+
const SoftDeleteQueryBuilder_1 = require("typeorm/query-builder/SoftDeleteQueryBuilder");
|
|
5
6
|
const query_builder_utils_1 = require("../../../utils/query-builder.utils");
|
|
6
7
|
const prototype_utils_1 = require("../../../utils/prototype.utils");
|
|
7
8
|
/* eslint-enable @typescript-eslint/no-empty-interface */
|
|
@@ -23,6 +24,7 @@ const queryBuilders = [
|
|
|
23
24
|
typeorm_1.SelectQueryBuilder,
|
|
24
25
|
typeorm_1.UpdateQueryBuilder,
|
|
25
26
|
typeorm_1.DeleteQueryBuilder,
|
|
27
|
+
SoftDeleteQueryBuilder_1.SoftDeleteQueryBuilder,
|
|
26
28
|
];
|
|
27
29
|
queryBuilders.forEach((builder) => {
|
|
28
30
|
(0, prototype_utils_1.patchPrototype)(builder, extension);
|
|
@@ -9,29 +9,29 @@ export interface TypedWhereIsInMethods<Entity extends ObjectLiteral> {
|
|
|
9
9
|
* If you had previously WHERE expression defined,
|
|
10
10
|
* calling this function will override previously set WHERE conditions.
|
|
11
11
|
*/
|
|
12
|
-
whereIsInTyped<Type extends ObjectLiteral = UnsetType, Value extends ProxyColumnValueType = ProxyColumnValueType>(where: (proxy: DeepUnwrapArray<TypeOrDefault<Type, TypedRoot<Entity>>>) => Value, array?: TypedArrayArg<Type, Value>): this;
|
|
12
|
+
whereIsInTyped<Type extends ObjectLiteral = UnsetType, Value extends ProxyColumnValueType = ProxyColumnValueType>(where: (proxy: DeepUnwrapArray<TypeOrDefault<Type, TypedRoot<Entity, this>>>) => Value, array?: TypedArrayArg<Type, Value>): this;
|
|
13
13
|
/**
|
|
14
14
|
* Adds new AND WHERE IN condition in the query builder.
|
|
15
15
|
*/
|
|
16
|
-
andWhereIsInTyped<Type extends ObjectLiteral = UnsetType, Value extends ProxyColumnValueType = ProxyColumnValueType>(where: (proxy: DeepUnwrapArray<TypeOrDefault<Type, TypedRoot<Entity>>>) => Value, array?: TypedArrayArg<Type, Value>): this;
|
|
16
|
+
andWhereIsInTyped<Type extends ObjectLiteral = UnsetType, Value extends ProxyColumnValueType = ProxyColumnValueType>(where: (proxy: DeepUnwrapArray<TypeOrDefault<Type, TypedRoot<Entity, this>>>) => Value, array?: TypedArrayArg<Type, Value>): this;
|
|
17
17
|
/**
|
|
18
18
|
* Adds new OR WHERE IN condition in the query builder.
|
|
19
19
|
*/
|
|
20
|
-
orWhereIsInTyped<Type extends ObjectLiteral = UnsetType, Value extends ProxyColumnValueType = ProxyColumnValueType>(where: (proxy: DeepUnwrapArray<TypeOrDefault<Type, TypedRoot<Entity>>>) => Value, array?: TypedArrayArg<Type, Value>): this;
|
|
20
|
+
orWhereIsInTyped<Type extends ObjectLiteral = UnsetType, Value extends ProxyColumnValueType = ProxyColumnValueType>(where: (proxy: DeepUnwrapArray<TypeOrDefault<Type, TypedRoot<Entity, this>>>) => Value, array?: TypedArrayArg<Type, Value>): this;
|
|
21
21
|
/**
|
|
22
22
|
* Sets WHERE NOT IN condition in the query builder.
|
|
23
23
|
* If you had previously WHERE expression defined,
|
|
24
24
|
* calling this function will override previously set WHERE conditions.
|
|
25
25
|
*/
|
|
26
|
-
whereIsNotInTyped<Type extends ObjectLiteral = UnsetType, Value extends ProxyColumnValueType = ProxyColumnValueType>(where: (proxy: DeepUnwrapArray<TypeOrDefault<Type, TypedRoot<Entity>>>) => Value, array?: TypedArrayArg<Type, Value>): this;
|
|
26
|
+
whereIsNotInTyped<Type extends ObjectLiteral = UnsetType, Value extends ProxyColumnValueType = ProxyColumnValueType>(where: (proxy: DeepUnwrapArray<TypeOrDefault<Type, TypedRoot<Entity, this>>>) => Value, array?: TypedArrayArg<Type, Value>): this;
|
|
27
27
|
/**
|
|
28
28
|
* Adds new AND WHERE NOT IN condition in the query builder.
|
|
29
29
|
*/
|
|
30
|
-
andWhereIsNotInTyped<Type extends ObjectLiteral = UnsetType, Value extends ProxyColumnValueType = ProxyColumnValueType>(where: (proxy: DeepUnwrapArray<TypeOrDefault<Type, TypedRoot<Entity>>>) => Value, array?: TypedArrayArg<Type, Value>): this;
|
|
30
|
+
andWhereIsNotInTyped<Type extends ObjectLiteral = UnsetType, Value extends ProxyColumnValueType = ProxyColumnValueType>(where: (proxy: DeepUnwrapArray<TypeOrDefault<Type, TypedRoot<Entity, this>>>) => Value, array?: TypedArrayArg<Type, Value>): this;
|
|
31
31
|
/**
|
|
32
32
|
* Adds new OR WHERE NOT IN condition in the query builder.
|
|
33
33
|
*/
|
|
34
|
-
orWhereIsNotInTyped<Type extends ObjectLiteral = UnsetType, Value extends ProxyColumnValueType = ProxyColumnValueType>(where: (proxy: DeepUnwrapArray<TypeOrDefault<Type, TypedRoot<Entity>>>) => Value, array?: TypedArrayArg<Type, Value>): this;
|
|
34
|
+
orWhereIsNotInTyped<Type extends ObjectLiteral = UnsetType, Value extends ProxyColumnValueType = ProxyColumnValueType>(where: (proxy: DeepUnwrapArray<TypeOrDefault<Type, TypedRoot<Entity, this>>>) => Value, array?: TypedArrayArg<Type, Value>): this;
|
|
35
35
|
}
|
|
36
36
|
declare module 'typeorm/query-builder/WhereExpressionBuilder' {
|
|
37
37
|
interface WhereExpressionBuilder extends TypedWhereIsInMethods<ObjectLiteral> {
|
|
@@ -49,3 +49,7 @@ declare module 'typeorm/query-builder/DeleteQueryBuilder' {
|
|
|
49
49
|
interface DeleteQueryBuilder<Entity extends ObjectLiteral> extends TypedWhereIsInMethods<Entity> {
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
+
declare module 'typeorm/query-builder/SoftDeleteQueryBuilder' {
|
|
53
|
+
interface SoftDeleteQueryBuilder<Entity extends ObjectLiteral> extends TypedWhereIsInMethods<Entity> {
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
require("../../where-is-in.extension");
|
|
4
4
|
const typeorm_1 = require("typeorm");
|
|
5
|
+
const SoftDeleteQueryBuilder_1 = require("typeorm/query-builder/SoftDeleteQueryBuilder");
|
|
5
6
|
const query_builder_utils_1 = require("../../../utils/query-builder.utils");
|
|
6
7
|
const prototype_utils_1 = require("../../../utils/prototype.utils");
|
|
7
8
|
/* eslint-enable @typescript-eslint/no-empty-interface */
|
|
@@ -23,6 +24,7 @@ const queryBuilders = [
|
|
|
23
24
|
typeorm_1.SelectQueryBuilder,
|
|
24
25
|
typeorm_1.UpdateQueryBuilder,
|
|
25
26
|
typeorm_1.DeleteQueryBuilder,
|
|
27
|
+
SoftDeleteQueryBuilder_1.SoftDeleteQueryBuilder,
|
|
26
28
|
];
|
|
27
29
|
queryBuilders.forEach((builder) => {
|
|
28
30
|
(0, prototype_utils_1.patchPrototype)(builder, extension);
|
|
@@ -12,29 +12,29 @@ export interface TypedWhereJsonMethods<Entity extends ObjectLiteral> {
|
|
|
12
12
|
* If you had previously WHERE expression defined,
|
|
13
13
|
* calling this function will override previously set WHERE conditions.
|
|
14
14
|
*/
|
|
15
|
-
whereJsonContainsTyped<Type extends ObjectLiteral = TypedRoot<Entity>>(where: (proxy: DeepUnwrapArray<Type>) => ProxyColumnValueType, value: unknown): this;
|
|
15
|
+
whereJsonContainsTyped<Type extends ObjectLiteral = TypedRoot<Entity, this>>(where: (proxy: DeepUnwrapArray<Type>) => ProxyColumnValueType, value: unknown): this;
|
|
16
16
|
/**
|
|
17
17
|
* Adds new AND WHERE `column @> :value` condition (PostgreSQL): the JSON document contains `value`.
|
|
18
18
|
*/
|
|
19
|
-
andWhereJsonContainsTyped<Type extends ObjectLiteral = TypedRoot<Entity>>(where: (proxy: DeepUnwrapArray<Type>) => ProxyColumnValueType, value: unknown): this;
|
|
19
|
+
andWhereJsonContainsTyped<Type extends ObjectLiteral = TypedRoot<Entity, this>>(where: (proxy: DeepUnwrapArray<Type>) => ProxyColumnValueType, value: unknown): this;
|
|
20
20
|
/**
|
|
21
21
|
* Adds new OR WHERE `column @> :value` condition (PostgreSQL): the JSON document contains `value`.
|
|
22
22
|
*/
|
|
23
|
-
orWhereJsonContainsTyped<Type extends ObjectLiteral = TypedRoot<Entity>>(where: (proxy: DeepUnwrapArray<Type>) => ProxyColumnValueType, value: unknown): this;
|
|
23
|
+
orWhereJsonContainsTyped<Type extends ObjectLiteral = TypedRoot<Entity, this>>(where: (proxy: DeepUnwrapArray<Type>) => ProxyColumnValueType, value: unknown): this;
|
|
24
24
|
/**
|
|
25
25
|
* Sets WHERE `column ? :key` condition (PostgreSQL): the JSON object has the top-level key.
|
|
26
26
|
* If you had previously WHERE expression defined,
|
|
27
27
|
* calling this function will override previously set WHERE conditions.
|
|
28
28
|
*/
|
|
29
|
-
whereJsonHasKeyTyped<Type extends ObjectLiteral = TypedRoot<Entity>>(where: (proxy: DeepUnwrapArray<Type>) => ProxyColumnValueType, key: string): this;
|
|
29
|
+
whereJsonHasKeyTyped<Type extends ObjectLiteral = TypedRoot<Entity, this>>(where: (proxy: DeepUnwrapArray<Type>) => ProxyColumnValueType, key: string): this;
|
|
30
30
|
/**
|
|
31
31
|
* Adds new AND WHERE `column ? :key` condition (PostgreSQL): the JSON object has the top-level key.
|
|
32
32
|
*/
|
|
33
|
-
andWhereJsonHasKeyTyped<Type extends ObjectLiteral = TypedRoot<Entity>>(where: (proxy: DeepUnwrapArray<Type>) => ProxyColumnValueType, key: string): this;
|
|
33
|
+
andWhereJsonHasKeyTyped<Type extends ObjectLiteral = TypedRoot<Entity, this>>(where: (proxy: DeepUnwrapArray<Type>) => ProxyColumnValueType, key: string): this;
|
|
34
34
|
/**
|
|
35
35
|
* Adds new OR WHERE `column ? :key` condition (PostgreSQL): the JSON object has the top-level key.
|
|
36
36
|
*/
|
|
37
|
-
orWhereJsonHasKeyTyped<Type extends ObjectLiteral = TypedRoot<Entity>>(where: (proxy: DeepUnwrapArray<Type>) => ProxyColumnValueType, key: string): this;
|
|
37
|
+
orWhereJsonHasKeyTyped<Type extends ObjectLiteral = TypedRoot<Entity, this>>(where: (proxy: DeepUnwrapArray<Type>) => ProxyColumnValueType, key: string): this;
|
|
38
38
|
}
|
|
39
39
|
declare module 'typeorm/query-builder/WhereExpressionBuilder' {
|
|
40
40
|
interface WhereExpressionBuilder extends TypedWhereJsonMethods<ObjectLiteral> {
|
|
@@ -52,3 +52,7 @@ declare module 'typeorm/query-builder/DeleteQueryBuilder' {
|
|
|
52
52
|
interface DeleteQueryBuilder<Entity extends ObjectLiteral> extends TypedWhereJsonMethods<Entity> {
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
+
declare module 'typeorm/query-builder/SoftDeleteQueryBuilder' {
|
|
56
|
+
interface SoftDeleteQueryBuilder<Entity extends ObjectLiteral> extends TypedWhereJsonMethods<Entity> {
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
require("../../where-json.extension");
|
|
4
4
|
const typeorm_1 = require("typeorm");
|
|
5
|
+
const SoftDeleteQueryBuilder_1 = require("typeorm/query-builder/SoftDeleteQueryBuilder");
|
|
5
6
|
const query_builder_utils_1 = require("../../../utils/query-builder.utils");
|
|
6
7
|
const prototype_utils_1 = require("../../../utils/prototype.utils");
|
|
7
8
|
/* eslint-enable @typescript-eslint/no-empty-interface */
|
|
@@ -23,6 +24,7 @@ const queryBuilders = [
|
|
|
23
24
|
typeorm_1.SelectQueryBuilder,
|
|
24
25
|
typeorm_1.UpdateQueryBuilder,
|
|
25
26
|
typeorm_1.DeleteQueryBuilder,
|
|
27
|
+
SoftDeleteQueryBuilder_1.SoftDeleteQueryBuilder,
|
|
26
28
|
];
|
|
27
29
|
queryBuilders.forEach((builder) => {
|
|
28
30
|
(0, prototype_utils_1.patchPrototype)(builder, extension);
|
|
@@ -13,34 +13,34 @@ export interface TypedWhereLowerMethods<Entity extends ObjectLiteral> {
|
|
|
13
13
|
* If you had previously WHERE expression defined,
|
|
14
14
|
* calling this function will override previously set WHERE conditions.
|
|
15
15
|
*/
|
|
16
|
-
whereLowerEqualsTyped<Type extends ObjectLiteral = TypedRoot<Entity>>(where: (proxy: DeepUnwrapArray<Type>) => ProxyColumnValueType, value: string | null | undefined, options?: TypedLowerOptions): this;
|
|
16
|
+
whereLowerEqualsTyped<Type extends ObjectLiteral = TypedRoot<Entity, this>>(where: (proxy: DeepUnwrapArray<Type>) => ProxyColumnValueType, value: string | null | undefined, options?: TypedLowerOptions): this;
|
|
17
17
|
/**
|
|
18
18
|
* Adds new AND WHERE `LOWER(column) = LOWER(:value)` condition in the query builder.
|
|
19
19
|
* `null` / `undefined` matches nothing (`FALSE`).
|
|
20
20
|
*/
|
|
21
|
-
andWhereLowerEqualsTyped<Type extends ObjectLiteral = TypedRoot<Entity>>(where: (proxy: DeepUnwrapArray<Type>) => ProxyColumnValueType, value: string | null | undefined, options?: TypedLowerOptions): this;
|
|
21
|
+
andWhereLowerEqualsTyped<Type extends ObjectLiteral = TypedRoot<Entity, this>>(where: (proxy: DeepUnwrapArray<Type>) => ProxyColumnValueType, value: string | null | undefined, options?: TypedLowerOptions): this;
|
|
22
22
|
/**
|
|
23
23
|
* Adds new OR WHERE `LOWER(column) = LOWER(:value)` condition in the query builder.
|
|
24
24
|
* `null` / `undefined` matches nothing (`FALSE`).
|
|
25
25
|
*/
|
|
26
|
-
orWhereLowerEqualsTyped<Type extends ObjectLiteral = TypedRoot<Entity>>(where: (proxy: DeepUnwrapArray<Type>) => ProxyColumnValueType, value: string | null | undefined, options?: TypedLowerOptions): this;
|
|
26
|
+
orWhereLowerEqualsTyped<Type extends ObjectLiteral = TypedRoot<Entity, this>>(where: (proxy: DeepUnwrapArray<Type>) => ProxyColumnValueType, value: string | null | undefined, options?: TypedLowerOptions): this;
|
|
27
27
|
/**
|
|
28
28
|
* Sets WHERE `LOWER(column) IN (LOWER(:v1), LOWER(:v2), …)` condition in the query builder.
|
|
29
29
|
* An empty or missing array matches nothing (`FALSE`), like `whereIsIn`.
|
|
30
30
|
* If you had previously WHERE expression defined,
|
|
31
31
|
* calling this function will override previously set WHERE conditions.
|
|
32
32
|
*/
|
|
33
|
-
whereIsInLowerTyped<Type extends ObjectLiteral = TypedRoot<Entity>>(where: (proxy: DeepUnwrapArray<Type>) => ProxyColumnValueType, values: ReadonlyArray<string> | null | undefined, options?: TypedLowerOptions): this;
|
|
33
|
+
whereIsInLowerTyped<Type extends ObjectLiteral = TypedRoot<Entity, this>>(where: (proxy: DeepUnwrapArray<Type>) => ProxyColumnValueType, values: ReadonlyArray<string> | null | undefined, options?: TypedLowerOptions): this;
|
|
34
34
|
/**
|
|
35
35
|
* Adds new AND WHERE `LOWER(column) IN (LOWER(:v1), LOWER(:v2), …)` condition in the query builder.
|
|
36
36
|
* An empty or missing array matches nothing (`FALSE`).
|
|
37
37
|
*/
|
|
38
|
-
andWhereIsInLowerTyped<Type extends ObjectLiteral = TypedRoot<Entity>>(where: (proxy: DeepUnwrapArray<Type>) => ProxyColumnValueType, values: ReadonlyArray<string> | null | undefined, options?: TypedLowerOptions): this;
|
|
38
|
+
andWhereIsInLowerTyped<Type extends ObjectLiteral = TypedRoot<Entity, this>>(where: (proxy: DeepUnwrapArray<Type>) => ProxyColumnValueType, values: ReadonlyArray<string> | null | undefined, options?: TypedLowerOptions): this;
|
|
39
39
|
/**
|
|
40
40
|
* Adds new OR WHERE `LOWER(column) IN (LOWER(:v1), LOWER(:v2), …)` condition in the query builder.
|
|
41
41
|
* An empty or missing array matches nothing (`FALSE`).
|
|
42
42
|
*/
|
|
43
|
-
orWhereIsInLowerTyped<Type extends ObjectLiteral = TypedRoot<Entity>>(where: (proxy: DeepUnwrapArray<Type>) => ProxyColumnValueType, values: ReadonlyArray<string> | null | undefined, options?: TypedLowerOptions): this;
|
|
43
|
+
orWhereIsInLowerTyped<Type extends ObjectLiteral = TypedRoot<Entity, this>>(where: (proxy: DeepUnwrapArray<Type>) => ProxyColumnValueType, values: ReadonlyArray<string> | null | undefined, options?: TypedLowerOptions): this;
|
|
44
44
|
}
|
|
45
45
|
declare module 'typeorm/query-builder/WhereExpressionBuilder' {
|
|
46
46
|
interface WhereExpressionBuilder extends TypedWhereLowerMethods<ObjectLiteral> {
|
|
@@ -58,3 +58,7 @@ declare module 'typeorm/query-builder/DeleteQueryBuilder' {
|
|
|
58
58
|
interface DeleteQueryBuilder<Entity extends ObjectLiteral> extends TypedWhereLowerMethods<Entity> {
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
|
+
declare module 'typeorm/query-builder/SoftDeleteQueryBuilder' {
|
|
62
|
+
interface SoftDeleteQueryBuilder<Entity extends ObjectLiteral> extends TypedWhereLowerMethods<Entity> {
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const typeorm_1 = require("typeorm");
|
|
4
|
+
const SoftDeleteQueryBuilder_1 = require("typeorm/query-builder/SoftDeleteQueryBuilder");
|
|
4
5
|
const query_builder_utils_1 = require("../../../utils/query-builder.utils");
|
|
5
6
|
const prototype_utils_1 = require("../../../utils/prototype.utils");
|
|
6
7
|
const sql_utils_1 = require("../../../utils/sql.utils");
|
|
@@ -59,6 +60,7 @@ const queryBuilders = [
|
|
|
59
60
|
typeorm_1.SelectQueryBuilder,
|
|
60
61
|
typeorm_1.UpdateQueryBuilder,
|
|
61
62
|
typeorm_1.DeleteQueryBuilder,
|
|
63
|
+
SoftDeleteQueryBuilder_1.SoftDeleteQueryBuilder,
|
|
62
64
|
];
|
|
63
65
|
queryBuilders.forEach((builder) => {
|
|
64
66
|
(0, prototype_utils_1.patchPrototype)(builder, extension);
|
|
@@ -14,17 +14,17 @@ export interface TypedWhereSimilarMethods<Entity extends ObjectLiteral> {
|
|
|
14
14
|
* If you had previously WHERE expression defined,
|
|
15
15
|
* calling this function will override previously set WHERE conditions.
|
|
16
16
|
*/
|
|
17
|
-
whereSimilarTyped<Type extends ObjectLiteral = TypedRoot<Entity>>(where: (proxy: DeepUnwrapArray<Type>) => ProxyColumnValueType, term: string | null | undefined, options?: TypedSimilarOptions): this;
|
|
17
|
+
whereSimilarTyped<Type extends ObjectLiteral = TypedRoot<Entity, this>>(where: (proxy: DeepUnwrapArray<Type>) => ProxyColumnValueType, term: string | null | undefined, options?: TypedSimilarOptions): this;
|
|
18
18
|
/**
|
|
19
19
|
* Adds new AND WHERE `column % :term` condition in the query builder (PostgreSQL, pg_trgm).
|
|
20
20
|
* A blank term adds no condition.
|
|
21
21
|
*/
|
|
22
|
-
andWhereSimilarTyped<Type extends ObjectLiteral = TypedRoot<Entity>>(where: (proxy: DeepUnwrapArray<Type>) => ProxyColumnValueType, term: string | null | undefined, options?: TypedSimilarOptions): this;
|
|
22
|
+
andWhereSimilarTyped<Type extends ObjectLiteral = TypedRoot<Entity, this>>(where: (proxy: DeepUnwrapArray<Type>) => ProxyColumnValueType, term: string | null | undefined, options?: TypedSimilarOptions): this;
|
|
23
23
|
/**
|
|
24
24
|
* Adds new OR WHERE `column % :term` condition in the query builder (PostgreSQL, pg_trgm).
|
|
25
25
|
* A blank term adds no condition.
|
|
26
26
|
*/
|
|
27
|
-
orWhereSimilarTyped<Type extends ObjectLiteral = TypedRoot<Entity>>(where: (proxy: DeepUnwrapArray<Type>) => ProxyColumnValueType, term: string | null | undefined, options?: TypedSimilarOptions): this;
|
|
27
|
+
orWhereSimilarTyped<Type extends ObjectLiteral = TypedRoot<Entity, this>>(where: (proxy: DeepUnwrapArray<Type>) => ProxyColumnValueType, term: string | null | undefined, options?: TypedSimilarOptions): this;
|
|
28
28
|
}
|
|
29
29
|
/** Trigram similarity score selection (PostgreSQL, `pg_trgm` extension). */
|
|
30
30
|
export interface TypedSimilarityScoreMethods<Entity extends ObjectLiteral> {
|
|
@@ -35,7 +35,7 @@ export interface TypedSimilarityScoreMethods<Entity extends ObjectLiteral> {
|
|
|
35
35
|
* (`word_similarity(:term, column)`, the score of `column %> :term`).
|
|
36
36
|
* Use a lower-case alias: PostgreSQL folds an unquoted alias in ORDER BY.
|
|
37
37
|
*/
|
|
38
|
-
addSimilarityScoreTyped<Type extends ObjectLiteral = TypedRoot<Entity>>(selection: (proxy: DeepUnwrapArray<Type>) => ProxyColumnValueType, term: string | null | undefined, alias: string, options?: SimilarityScoreOptions): this;
|
|
38
|
+
addSimilarityScoreTyped<Type extends ObjectLiteral = TypedRoot<Entity, this>>(selection: (proxy: DeepUnwrapArray<Type>) => ProxyColumnValueType, term: string | null | undefined, alias: string, options?: SimilarityScoreOptions): this;
|
|
39
39
|
}
|
|
40
40
|
declare module 'typeorm/query-builder/WhereExpressionBuilder' {
|
|
41
41
|
interface WhereExpressionBuilder extends TypedWhereSimilarMethods<ObjectLiteral> {
|
|
@@ -53,3 +53,7 @@ declare module 'typeorm/query-builder/DeleteQueryBuilder' {
|
|
|
53
53
|
interface DeleteQueryBuilder<Entity extends ObjectLiteral> extends TypedWhereSimilarMethods<Entity> {
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
+
declare module 'typeorm/query-builder/SoftDeleteQueryBuilder' {
|
|
57
|
+
interface SoftDeleteQueryBuilder<Entity extends ObjectLiteral> extends TypedWhereSimilarMethods<Entity> {
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const typeorm_1 = require("typeorm");
|
|
4
|
+
const SoftDeleteQueryBuilder_1 = require("typeorm/query-builder/SoftDeleteQueryBuilder");
|
|
4
5
|
const query_builder_utils_1 = require("../../../utils/query-builder.utils");
|
|
5
6
|
const prototype_utils_1 = require("../../../utils/prototype.utils");
|
|
6
7
|
const sql_utils_1 = require("../../../utils/sql.utils");
|
|
@@ -66,6 +67,7 @@ const queryBuilders = [
|
|
|
66
67
|
typeorm_1.SelectQueryBuilder,
|
|
67
68
|
typeorm_1.UpdateQueryBuilder,
|
|
68
69
|
typeorm_1.DeleteQueryBuilder,
|
|
70
|
+
SoftDeleteQueryBuilder_1.SoftDeleteQueryBuilder,
|
|
69
71
|
];
|
|
70
72
|
queryBuilders.forEach((builder) => {
|
|
71
73
|
(0, prototype_utils_1.patchPrototype)(builder, extension);
|
|
@@ -14,17 +14,17 @@ export interface TypedWhereMethods<Entity extends ObjectLiteral> {
|
|
|
14
14
|
* calling this function will override previously set WHERE conditions.
|
|
15
15
|
* Additionally you can add parameters used in where expression.
|
|
16
16
|
*/
|
|
17
|
-
whereTyped<Type extends ObjectLiteral = UnsetType, Value extends ProxyColumnValueType = ProxyColumnValueType, Operator extends string = string>(where: (proxy: DeepUnwrapArray<TypeOrDefault<Type, TypedRoot<Entity>>>) => Value, conditions: Operator, ...args: TypedWhereArgs<Type, Operator, Value>): this;
|
|
17
|
+
whereTyped<Type extends ObjectLiteral = UnsetType, Value extends ProxyColumnValueType = ProxyColumnValueType, Operator extends string = string>(where: (proxy: DeepUnwrapArray<TypeOrDefault<Type, TypedRoot<Entity, this>>>) => Value, conditions: Operator, ...args: TypedWhereArgs<Type, Operator, Value>): this;
|
|
18
18
|
/**
|
|
19
19
|
* Adds new AND WHERE condition in the query builder.
|
|
20
20
|
* Additionally you can add parameters used in where expression.
|
|
21
21
|
*/
|
|
22
|
-
andWhereTyped<Type extends ObjectLiteral = UnsetType, Value extends ProxyColumnValueType = ProxyColumnValueType, Operator extends string = string>(where: (proxy: DeepUnwrapArray<TypeOrDefault<Type, TypedRoot<Entity>>>) => Value, conditions: Operator, ...args: TypedWhereArgs<Type, Operator, Value>): this;
|
|
22
|
+
andWhereTyped<Type extends ObjectLiteral = UnsetType, Value extends ProxyColumnValueType = ProxyColumnValueType, Operator extends string = string>(where: (proxy: DeepUnwrapArray<TypeOrDefault<Type, TypedRoot<Entity, this>>>) => Value, conditions: Operator, ...args: TypedWhereArgs<Type, Operator, Value>): this;
|
|
23
23
|
/**
|
|
24
24
|
* Adds new OR WHERE condition in the query builder.
|
|
25
25
|
* Additionally you can add parameters used in where expression.
|
|
26
26
|
*/
|
|
27
|
-
orWhereTyped<Type extends ObjectLiteral = UnsetType, Value extends ProxyColumnValueType = ProxyColumnValueType, Operator extends string = string>(where: (proxy: DeepUnwrapArray<TypeOrDefault<Type, TypedRoot<Entity>>>) => Value, conditions: Operator, ...args: TypedWhereArgs<Type, Operator, Value>): this;
|
|
27
|
+
orWhereTyped<Type extends ObjectLiteral = UnsetType, Value extends ProxyColumnValueType = ProxyColumnValueType, Operator extends string = string>(where: (proxy: DeepUnwrapArray<TypeOrDefault<Type, TypedRoot<Entity, this>>>) => Value, conditions: Operator, ...args: TypedWhereArgs<Type, Operator, Value>): this;
|
|
28
28
|
}
|
|
29
29
|
declare module 'typeorm/query-builder/WhereExpressionBuilder' {
|
|
30
30
|
interface WhereExpressionBuilder extends TypedWhereMethods<ObjectLiteral> {
|
|
@@ -42,3 +42,7 @@ declare module 'typeorm/query-builder/DeleteQueryBuilder' {
|
|
|
42
42
|
interface DeleteQueryBuilder<Entity extends ObjectLiteral> extends TypedWhereMethods<Entity> {
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
+
declare module 'typeorm/query-builder/SoftDeleteQueryBuilder' {
|
|
46
|
+
interface SoftDeleteQueryBuilder<Entity extends ObjectLiteral> extends TypedWhereMethods<Entity> {
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const typeorm_1 = require("typeorm");
|
|
4
|
+
const SoftDeleteQueryBuilder_1 = require("typeorm/query-builder/SoftDeleteQueryBuilder");
|
|
4
5
|
const query_builder_utils_1 = require("../../../utils/query-builder.utils");
|
|
5
6
|
const prototype_utils_1 = require("../../../utils/prototype.utils");
|
|
6
7
|
const where_utils_1 = require("../../../utils/where.utils");
|
|
@@ -20,6 +21,7 @@ const queryBuilders = [
|
|
|
20
21
|
typeorm_1.SelectQueryBuilder,
|
|
21
22
|
typeorm_1.UpdateQueryBuilder,
|
|
22
23
|
typeorm_1.DeleteQueryBuilder,
|
|
24
|
+
SoftDeleteQueryBuilder_1.SoftDeleteQueryBuilder,
|
|
23
25
|
];
|
|
24
26
|
queryBuilders.forEach((builder) => {
|
|
25
27
|
(0, prototype_utils_1.patchPrototype)(builder, extension);
|
|
@@ -68,3 +68,7 @@ declare module 'typeorm/query-builder/DeleteQueryBuilder' {
|
|
|
68
68
|
interface DeleteQueryBuilder<Entity extends ObjectLiteral> extends WhereArrayMethods {
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
+
declare module 'typeorm/query-builder/SoftDeleteQueryBuilder' {
|
|
72
|
+
interface SoftDeleteQueryBuilder<Entity extends ObjectLiteral> extends WhereArrayMethods {
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const typeorm_1 = require("typeorm");
|
|
4
|
+
const SoftDeleteQueryBuilder_1 = require("typeorm/query-builder/SoftDeleteQueryBuilder");
|
|
4
5
|
const prototype_utils_1 = require("../utils/prototype.utils");
|
|
5
6
|
const query_builder_utils_1 = require("../utils/query-builder.utils");
|
|
6
7
|
const sql_utils_1 = require("../utils/sql.utils");
|
|
@@ -24,6 +25,7 @@ const queryBuilders = [
|
|
|
24
25
|
typeorm_1.SelectQueryBuilder,
|
|
25
26
|
typeorm_1.UpdateQueryBuilder,
|
|
26
27
|
typeorm_1.DeleteQueryBuilder,
|
|
28
|
+
SoftDeleteQueryBuilder_1.SoftDeleteQueryBuilder,
|
|
27
29
|
];
|
|
28
30
|
queryBuilders.forEach((builder) => {
|
|
29
31
|
(0, prototype_utils_1.patchPrototype)(builder, extension);
|
|
@@ -44,30 +44,30 @@ declare module 'typeorm/query-builder/SelectQueryBuilder' {
|
|
|
44
44
|
* If you had previously WHERE expression defined,
|
|
45
45
|
* calling this function will override previously set WHERE conditions.
|
|
46
46
|
*/
|
|
47
|
-
whereIsAny(field: string, array?: ArgsType, arrayType?: string):
|
|
47
|
+
whereIsAny(field: string, array?: ArgsType, arrayType?: string): this;
|
|
48
48
|
/**
|
|
49
49
|
* Adds new AND WHERE `field = ANY(:array)` condition in the query builder (PostgreSQL).
|
|
50
50
|
*/
|
|
51
|
-
andWhereIsAny(field: string, array?: ArgsType, arrayType?: string):
|
|
51
|
+
andWhereIsAny(field: string, array?: ArgsType, arrayType?: string): this;
|
|
52
52
|
/**
|
|
53
53
|
* Adds new OR WHERE `field = ANY(:array)` condition in the query builder (PostgreSQL).
|
|
54
54
|
*/
|
|
55
|
-
orWhereIsAny(field: string, array?: ArgsType, arrayType?: string):
|
|
55
|
+
orWhereIsAny(field: string, array?: ArgsType, arrayType?: string): this;
|
|
56
56
|
/**
|
|
57
57
|
* Sets WHERE `field <> ALL(:array)` condition in the query builder (PostgreSQL):
|
|
58
58
|
* the field differs from every value of the array.
|
|
59
59
|
* If you had previously WHERE expression defined,
|
|
60
60
|
* calling this function will override previously set WHERE conditions.
|
|
61
61
|
*/
|
|
62
|
-
whereIsNotAny(field: string, array?: ArgsType, arrayType?: string):
|
|
62
|
+
whereIsNotAny(field: string, array?: ArgsType, arrayType?: string): this;
|
|
63
63
|
/**
|
|
64
64
|
* Adds new AND WHERE `field <> ALL(:array)` condition in the query builder (PostgreSQL).
|
|
65
65
|
*/
|
|
66
|
-
andWhereIsNotAny(field: string, array?: ArgsType, arrayType?: string):
|
|
66
|
+
andWhereIsNotAny(field: string, array?: ArgsType, arrayType?: string): this;
|
|
67
67
|
/**
|
|
68
68
|
* Adds new OR WHERE `field <> ALL(:array)` condition in the query builder (PostgreSQL).
|
|
69
69
|
*/
|
|
70
|
-
orWhereIsNotAny(field: string, array?: ArgsType, arrayType?: string):
|
|
70
|
+
orWhereIsNotAny(field: string, array?: ArgsType, arrayType?: string): this;
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
declare module 'typeorm/query-builder/UpdateQueryBuilder' {
|
|
@@ -140,3 +140,38 @@ declare module 'typeorm/query-builder/DeleteQueryBuilder' {
|
|
|
140
140
|
orWhereIsNotAny(field: string, array?: ArgsType, arrayType?: string): DeleteQueryBuilder<Entity>;
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
|
+
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>;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const typeorm_1 = require("typeorm");
|
|
4
|
+
const SoftDeleteQueryBuilder_1 = require("typeorm/query-builder/SoftDeleteQueryBuilder");
|
|
4
5
|
const prototype_utils_1 = require("../utils/prototype.utils");
|
|
5
6
|
const query_builder_utils_1 = require("../utils/query-builder.utils");
|
|
6
7
|
const sql_utils_1 = require("../utils/sql.utils");
|
|
@@ -21,6 +22,7 @@ const queryBuilders = [
|
|
|
21
22
|
typeorm_1.SelectQueryBuilder,
|
|
22
23
|
typeorm_1.UpdateQueryBuilder,
|
|
23
24
|
typeorm_1.DeleteQueryBuilder,
|
|
25
|
+
SoftDeleteQueryBuilder_1.SoftDeleteQueryBuilder,
|
|
24
26
|
];
|
|
25
27
|
queryBuilders.forEach((builder) => {
|
|
26
28
|
(0, prototype_utils_1.patchPrototype)(builder, extension);
|
|
@@ -54,3 +54,7 @@ declare module 'typeorm/query-builder/DeleteQueryBuilder' {
|
|
|
54
54
|
interface DeleteQueryBuilder<Entity extends ObjectLiteral> extends WhereDistinctMethods {
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
+
declare module 'typeorm/query-builder/SoftDeleteQueryBuilder' {
|
|
58
|
+
interface SoftDeleteQueryBuilder<Entity extends ObjectLiteral> extends WhereDistinctMethods {
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const typeorm_1 = require("typeorm");
|
|
4
|
+
const SoftDeleteQueryBuilder_1 = require("typeorm/query-builder/SoftDeleteQueryBuilder");
|
|
4
5
|
const prototype_utils_1 = require("../utils/prototype.utils");
|
|
5
6
|
const query_builder_utils_1 = require("../utils/query-builder.utils");
|
|
6
7
|
const sql_utils_1 = require("../utils/sql.utils");
|
|
@@ -23,6 +24,7 @@ const queryBuilders = [
|
|
|
23
24
|
typeorm_1.SelectQueryBuilder,
|
|
24
25
|
typeorm_1.UpdateQueryBuilder,
|
|
25
26
|
typeorm_1.DeleteQueryBuilder,
|
|
27
|
+
SoftDeleteQueryBuilder_1.SoftDeleteQueryBuilder,
|
|
26
28
|
];
|
|
27
29
|
queryBuilders.forEach((builder) => {
|
|
28
30
|
(0, prototype_utils_1.patchPrototype)(builder, extension);
|
|
@@ -39,29 +39,29 @@ declare module 'typeorm/query-builder/SelectQueryBuilder' {
|
|
|
39
39
|
* If you had previously WHERE expression defined,
|
|
40
40
|
* calling this function will override previously set WHERE conditions.
|
|
41
41
|
*/
|
|
42
|
-
whereIsIn(field: string, array?: ArgsType):
|
|
42
|
+
whereIsIn(field: string, array?: ArgsType): this;
|
|
43
43
|
/**
|
|
44
44
|
* Adds new AND WHERE IN condition in the query builder.
|
|
45
45
|
*/
|
|
46
|
-
andWhereIsIn(field: string, array?: ArgsType):
|
|
46
|
+
andWhereIsIn(field: string, array?: ArgsType): this;
|
|
47
47
|
/**
|
|
48
48
|
* Adds new OR WHERE IN condition in the query builder.
|
|
49
49
|
*/
|
|
50
|
-
orWhereIsIn(field: string, array?: ArgsType):
|
|
50
|
+
orWhereIsIn(field: string, array?: ArgsType): this;
|
|
51
51
|
/**
|
|
52
52
|
* Sets WHERE NOT IN condition in the query builder.
|
|
53
53
|
* If you had previously WHERE expression defined,
|
|
54
54
|
* calling this function will override previously set WHERE conditions.
|
|
55
55
|
*/
|
|
56
|
-
whereIsNotIn(field: string, array?: ArgsType):
|
|
56
|
+
whereIsNotIn(field: string, array?: ArgsType): this;
|
|
57
57
|
/**
|
|
58
58
|
* Adds new AND WHERE NOT IN condition in the query builder.
|
|
59
59
|
*/
|
|
60
|
-
andWhereIsNotIn(field: string, array?: ArgsType):
|
|
60
|
+
andWhereIsNotIn(field: string, array?: ArgsType): this;
|
|
61
61
|
/**
|
|
62
62
|
* Adds new OR WHERE NOT IN condition in the query builder.
|
|
63
63
|
*/
|
|
64
|
-
orWhereIsNotIn(field: string, array?: ArgsType):
|
|
64
|
+
orWhereIsNotIn(field: string, array?: ArgsType): this;
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
declare module 'typeorm/query-builder/UpdateQueryBuilder' {
|
|
@@ -128,3 +128,35 @@ declare module 'typeorm/query-builder/DeleteQueryBuilder' {
|
|
|
128
128
|
orWhereIsNotIn(field: string, array?: ArgsType): DeleteQueryBuilder<Entity>;
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
|
+
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>;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const typeorm_1 = require("typeorm");
|
|
4
|
+
const SoftDeleteQueryBuilder_1 = require("typeorm/query-builder/SoftDeleteQueryBuilder");
|
|
4
5
|
const prototype_utils_1 = require("../utils/prototype.utils");
|
|
5
6
|
const where_utils_1 = require("../utils/where.utils");
|
|
6
7
|
// patching
|
|
@@ -30,6 +31,7 @@ const queryBuilders = [
|
|
|
30
31
|
typeorm_1.SelectQueryBuilder,
|
|
31
32
|
typeorm_1.UpdateQueryBuilder,
|
|
32
33
|
typeorm_1.DeleteQueryBuilder,
|
|
34
|
+
SoftDeleteQueryBuilder_1.SoftDeleteQueryBuilder,
|
|
33
35
|
];
|
|
34
36
|
queryBuilders.forEach((builder) => {
|
|
35
37
|
(0, prototype_utils_1.patchPrototype)(builder, extension);
|
|
@@ -53,3 +53,7 @@ declare module 'typeorm/query-builder/DeleteQueryBuilder' {
|
|
|
53
53
|
interface DeleteQueryBuilder<Entity extends ObjectLiteral> extends WhereJsonMethods {
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
+
declare module 'typeorm/query-builder/SoftDeleteQueryBuilder' {
|
|
57
|
+
interface SoftDeleteQueryBuilder<Entity extends ObjectLiteral> extends WhereJsonMethods {
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const typeorm_1 = require("typeorm");
|
|
4
|
+
const SoftDeleteQueryBuilder_1 = require("typeorm/query-builder/SoftDeleteQueryBuilder");
|
|
4
5
|
const prototype_utils_1 = require("../utils/prototype.utils");
|
|
5
6
|
const query_builder_utils_1 = require("../utils/query-builder.utils");
|
|
6
7
|
const sql_utils_1 = require("../utils/sql.utils");
|
|
@@ -26,6 +27,7 @@ const queryBuilders = [
|
|
|
26
27
|
typeorm_1.SelectQueryBuilder,
|
|
27
28
|
typeorm_1.UpdateQueryBuilder,
|
|
28
29
|
typeorm_1.DeleteQueryBuilder,
|
|
30
|
+
SoftDeleteQueryBuilder_1.SoftDeleteQueryBuilder,
|
|
29
31
|
];
|
|
30
32
|
queryBuilders.forEach((builder) => {
|
|
31
33
|
(0, prototype_utils_1.patchPrototype)(builder, extension);
|