vsrepo 1.4.0 → 2.0.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 +723 -1338
- package/README.pt-BR.md +729 -1341
- package/dist/VSRepoAdapter.d.ts +71 -0
- package/dist/VSRepoAdapter.js +18 -0
- package/dist/VSRepository.d.ts +135 -1201
- package/dist/VSRepository.js +273 -237
- package/dist/decorators/dynamic-method.decorator.d.ts +25 -0
- package/dist/decorators/dynamic-method.decorator.js +38 -0
- package/dist/decorators/query-method.decorator.d.ts +27 -0
- package/dist/decorators/query-method.decorator.js +45 -0
- package/dist/errors/VSRepoAdapterError.d.ts +22 -0
- package/dist/errors/VSRepoAdapterError.js +31 -0
- package/dist/errors/VSRepoError.d.ts +15 -0
- package/dist/errors/VSRepoError.js +21 -0
- package/dist/index.d.ts +34 -1
- package/dist/index.js +28 -15
- package/dist/internal/constants/debug-arg-symbol.constant.d.ts +1 -0
- package/dist/internal/constants/debug-arg-symbol.constant.js +4 -0
- package/dist/internal/constants/dynamic-methods-key.constant.d.ts +1 -0
- package/dist/internal/constants/query-methods-key.constant.d.ts +1 -0
- package/dist/internal/constants/query-methods-key.constant.js +4 -0
- package/dist/internal/enums/adapter-error-code.enum.d.ts +125 -0
- package/dist/internal/enums/adapter-error-code.enum.js +129 -0
- package/dist/internal/enums/transaction-isolation-level.enum.d.ts +16 -0
- package/dist/internal/enums/transaction-isolation-level.enum.js +20 -0
- package/dist/internal/enums/vs-log-level.enum.d.ts +18 -0
- package/dist/internal/enums/vs-log-level.enum.js +22 -0
- package/dist/internal/enums/vsrepo-error-type.enum.d.ts +19 -0
- package/dist/internal/enums/vsrepo-error-type.enum.js +23 -0
- package/dist/internal/resolvers/dynamic-methods.resolver.d.ts +23 -0
- package/dist/internal/resolvers/dynamic-methods.resolver.js +910 -0
- package/dist/internal/resolvers/merge-wheres.resolver.d.ts +7 -0
- package/dist/internal/resolvers/merge-wheres.resolver.js +26 -0
- package/dist/internal/utils/uncapitalize.util.d.ts +1 -0
- package/dist/internal/utils/vs-logger.util.d.ts +25 -0
- package/dist/internal/utils/vs-logger.util.js +139 -0
- package/dist/internal/validators/decorators.validator.d.ts +8 -0
- package/dist/internal/validators/decorators.validator.js +75 -0
- package/dist/internal/validators/schemas/ordering.schema.d.ts +3 -0
- package/dist/internal/validators/schemas/ordering.schema.js +38 -0
- package/dist/internal/validators/schemas/pagination.schema.d.ts +6 -0
- package/dist/internal/validators/schemas/pagination.schema.js +40 -0
- package/dist/internal/validators/schemas/where.schema.d.ts +7 -0
- package/dist/internal/validators/schemas/where.schema.js +42 -0
- package/dist/internal/validators/vsrepo.validator.d.ts +33 -0
- package/dist/internal/validators/vsrepo.validator.js +160 -0
- package/dist/types/adapter/adapter-method-options.type.d.ts +24 -0
- package/dist/types/adapter/adapter-query-options.type.d.ts +5 -0
- package/dist/types/decorators/dynamic-method-options.type.d.ts +14 -0
- package/dist/types/decorators/query-method-options.type.d.ts +15 -0
- package/dist/types/dynamic-methods/dynamic-method-customization.type.d.ts +7 -0
- package/dist/types/dynamic-methods/dynamic-method-info.type.d.ts +18 -0
- package/dist/types/dynamic-methods/dynamic-method-where-ops.type.d.ts +6 -0
- package/dist/types/utils/count-result.type.d.ts +9 -0
- package/dist/types/utils/deep-partial.type.d.ts +14 -0
- package/dist/types/utils/keys-of-type.type.d.ts +20 -0
- package/dist/types/utils/methods-options.type.d.ts +23 -0
- package/dist/types/utils/ordering.type.d.ts +39 -0
- package/dist/types/utils/pagination.type.d.ts +11 -0
- package/dist/types/utils/perform-data.type.d.ts +4 -0
- package/dist/types/utils/primitive.type.d.ts +6 -0
- package/dist/types/utils/query-method-arg.type.d.ts +27 -0
- package/dist/types/utils/see-mode.type.d.ts +12 -0
- package/dist/types/vsrepo/vsrepo-args.type.d.ts +9 -0
- package/dist/types/vsrepo/vsrepo-method.type.d.ts +4 -0
- package/dist/types/vsrepo/vsrepo-options.type.d.ts +34 -0
- package/dist/types/vsrepo/vsrepo-orm-types.type.d.ts +17 -0
- package/dist/types/vsrepo/vsrepo-pretty-where.type.d.ts +7 -0
- package/dist/types/vsrepo/vsrepo-query-options.type.d.ts +17 -0
- package/dist/types/vsrepo/vsrepo-query-options.type.js +2 -0
- package/dist/types/vsrepo/vsrepo-query.type.d.ts +5 -0
- package/dist/types/vsrepo/vsrepo-query.type.js +2 -0
- package/dist/types/vsrepo/vsrepo-relations.type.d.ts +26 -0
- package/dist/types/vsrepo/vsrepo-relations.type.js +2 -0
- package/dist/types/vsrepo/vsrepo-resolve-args-data.type.d.ts +19 -0
- package/dist/types/vsrepo/vsrepo-resolve-args-data.type.js +2 -0
- package/dist/types/vsrepo/vsrepo-select.type.d.ts +15 -0
- package/dist/types/vsrepo/vsrepo-select.type.js +2 -0
- package/dist/types/vsrepo/vsrepo-transaction-options.type.d.ts +12 -0
- package/dist/types/vsrepo/vsrepo-transaction-options.type.js +2 -0
- package/dist/types/vsrepo/vsrepo-ugly-where.type.d.ts +9 -0
- package/dist/types/vsrepo/vsrepo-ugly-where.type.js +2 -0
- package/dist/types/vsrepo/vsrepo-where.type.d.ts +99 -0
- package/dist/types/vsrepo/vsrepo-where.type.js +2 -0
- package/package.json +16 -37
- package/README-DynamicRepo.md +0 -625
- package/README-DynamicRepo.pt-BR.md +0 -625
- package/dist/DynamicRepository.d.ts +0 -497
- package/dist/DynamicRepository.js +0 -26
- package/dist/VSRepoError.d.ts +0 -83
- package/dist/VSRepoError.js +0 -17
- package/dist/internal/decorators/dynamic-method.decorator.js +0 -14
- package/dist/internal/decorators/query-method.decorator.js +0 -20
- package/dist/internal/entities/dynamic-method-metadata.entity.js +0 -26
- package/dist/internal/errors/vs-repo.error.js +0 -31
- package/dist/internal/resolvers/base-methods.resolve.js +0 -536
- package/dist/internal/resolvers/create-update-payloads-with-relations.resolve.js +0 -143
- package/dist/internal/resolvers/data-payload-with-relations.resolve.js +0 -60
- package/dist/internal/resolvers/dbAndPrismaArgs.resolve.js +0 -63
- package/dist/internal/resolvers/dynamic-method-customization.resolve.js +0 -57
- package/dist/internal/resolvers/dynamic-method-info.resolve.js +0 -279
- package/dist/internal/resolvers/dynamic-methods-metadata.resolve.js +0 -15
- package/dist/internal/resolvers/merge-wheres.resolve.js +0 -22
- package/dist/internal/resolvers/pretty-wheres.resolve.js +0 -87
- package/dist/internal/resolvers/select.resolve.js +0 -7
- package/dist/internal/resolvers/specific-where.resolve.js +0 -84
- package/dist/internal/resolvers/ugly-where.resolve.js +0 -178
- package/dist/internal/utils/logger.util.js +0 -21
- package/dist/internal/utils/schemas.util.js +0 -31
- package/dist/internal/validation/build-config.validate.js +0 -84
- package/dist/internal/validation/constructor-config.validate.js +0 -64
- package/dist/internal/validation/dynamic-method-config.validate.js +0 -19
- package/dist/internal/validation/extension.validate.js +0 -15
- package/dist/internal/validation/is-object.validate.js +0 -6
- package/dist/internal/validation/method-options.validate.js +0 -42
- package/dist/internal/validation/obj-with-relations.validate.js +0 -37
- package/dist/internal/validation/prisma-client.validate.js +0 -10
- package/dist/internal/validation/query-method-arg.validate.js +0 -22
- package/dist/internal/validation/query-method-options.validate.js +0 -24
- package/scripts/configure-prisma-import.mjs +0 -283
- package/scripts/copy-types.mjs +0 -24
- /package/dist/{internal/decorators/types/dynamic-method-config.type.js → types/adapter/adapter-method-options.type.js} +0 -0
- /package/dist/{internal/errors/types/vs-repo-error-type.type.js → types/adapter/adapter-query-options.type.js} +0 -0
- /package/dist/{internal/errors/types/vs-repo-runtime-error-code.type.js → types/decorators/dynamic-method-options.type.js} +0 -0
- /package/dist/{internal/validation/types → types/decorators}/query-method-options.type.js +0 -0
- /package/dist/{internal/resolvers/types → types/dynamic-methods}/dynamic-method-customization.type.js +0 -0
- /package/dist/{internal/resolvers/types → types/dynamic-methods}/dynamic-method-info.type.js +0 -0
- /package/dist/{internal/resolvers/types → types/dynamic-methods}/dynamic-method-where-ops.type.js +0 -0
- /package/dist/{internal/resolvers/types/base-method-function.type.js → types/utils/count-result.type.js} +0 -0
- /package/dist/{internal/resolvers/types/pretty-where.type.js → types/utils/deep-partial.type.js} +0 -0
- /package/dist/{internal/resolvers/types/prisma-args.type.js → types/utils/keys-of-type.type.js} +0 -0
- /package/dist/{internal/resolvers/types/repository-build-instance.type.js → types/utils/methods-options.type.js} +0 -0
- /package/dist/{internal/resolvers/types/resolve-db-and-prisma-args-data.type.js → types/utils/ordering.type.js} +0 -0
- /package/dist/{internal/validation/types → types/utils}/pagination.type.js +0 -0
- /package/dist/{internal/resolvers/types/ugly-where.type.js → types/utils/perform-data.type.js} +0 -0
- /package/dist/{internal/validation/types/base-methods.type.js → types/utils/primitive.type.js} +0 -0
- /package/dist/{internal/validation/types → types/utils}/query-method-arg.type.js +0 -0
- /package/dist/{internal/validation/types → types/utils}/see-mode.type.js +0 -0
- /package/dist/{internal/validation/types/build-config.type.js → types/vsrepo/vsrepo-args.type.js} +0 -0
- /package/dist/{internal/validation/types/constructor-config.type.js → types/vsrepo/vsrepo-method.type.js} +0 -0
- /package/dist/{internal/validation/types/method-options.type.js → types/vsrepo/vsrepo-options.type.js} +0 -0
- /package/dist/{internal/validation/types/method.type.js → types/vsrepo/vsrepo-orm-types.type.js} +0 -0
- /package/dist/{internal/validation/types/relation.type.js → types/vsrepo/vsrepo-pretty-where.type.js} +0 -0
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DynamicMethodMetadata = void 0;
|
|
4
|
-
class DynamicMethodMetadata {
|
|
5
|
-
propertyKey;
|
|
6
|
-
map;
|
|
7
|
-
proxyTo;
|
|
8
|
-
whereType;
|
|
9
|
-
pushWhere;
|
|
10
|
-
fbMode;
|
|
11
|
-
injectOrdering;
|
|
12
|
-
injectPagination;
|
|
13
|
-
query;
|
|
14
|
-
constructor(propertyKey, map, proxyTo, whereType, pushWhere, fbMode, injectOrdering, injectPagination, query) {
|
|
15
|
-
this.propertyKey = propertyKey;
|
|
16
|
-
this.map = map;
|
|
17
|
-
this.proxyTo = proxyTo;
|
|
18
|
-
this.whereType = whereType;
|
|
19
|
-
this.pushWhere = pushWhere;
|
|
20
|
-
this.fbMode = fbMode;
|
|
21
|
-
this.injectOrdering = injectOrdering;
|
|
22
|
-
this.injectPagination = injectPagination;
|
|
23
|
-
this.query = query;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
exports.DynamicMethodMetadata = DynamicMethodMetadata;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.VSRepoRuntimeError = exports.VSRepoDecoratorError = exports.VSRepoExtendError = exports.VSRepoBuildError = exports.VSRepoConfigError = exports.VSRepoError = void 0;
|
|
4
|
-
class VSRepoError extends Error {
|
|
5
|
-
}
|
|
6
|
-
exports.VSRepoError = VSRepoError;
|
|
7
|
-
class VSRepoConfigError extends VSRepoError {
|
|
8
|
-
type = "VSREPO_CONFIG";
|
|
9
|
-
}
|
|
10
|
-
exports.VSRepoConfigError = VSRepoConfigError;
|
|
11
|
-
class VSRepoBuildError extends VSRepoError {
|
|
12
|
-
type = "VSREPO_BUILD";
|
|
13
|
-
}
|
|
14
|
-
exports.VSRepoBuildError = VSRepoBuildError;
|
|
15
|
-
class VSRepoExtendError extends VSRepoError {
|
|
16
|
-
type = "VSREPO_EXTEND";
|
|
17
|
-
}
|
|
18
|
-
exports.VSRepoExtendError = VSRepoExtendError;
|
|
19
|
-
class VSRepoDecoratorError extends VSRepoError {
|
|
20
|
-
type = "VSREPO_DECORATOR";
|
|
21
|
-
}
|
|
22
|
-
exports.VSRepoDecoratorError = VSRepoDecoratorError;
|
|
23
|
-
class VSRepoRuntimeError extends VSRepoError {
|
|
24
|
-
type = "VSREPO_RUNTIME";
|
|
25
|
-
code;
|
|
26
|
-
constructor(message, code) {
|
|
27
|
-
super(message);
|
|
28
|
-
this.code = code;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
exports.VSRepoRuntimeError = VSRepoRuntimeError;
|
|
@@ -1,536 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.resolveBaseMethods = resolveBaseMethods;
|
|
7
|
-
const vs_repo_error_1 = require("../errors/vs-repo.error");
|
|
8
|
-
const logger_util_1 = require("../utils/logger.util");
|
|
9
|
-
const is_object_validate_1 = require("../validation/is-object.validate");
|
|
10
|
-
const method_options_validate_1 = require("../validation/method-options.validate");
|
|
11
|
-
const obj_with_relations_validate_1 = require("../validation/obj-with-relations.validate");
|
|
12
|
-
const create_update_payloads_with_relations_resolve_1 = require("./create-update-payloads-with-relations.resolve");
|
|
13
|
-
const data_payload_with_relations_resolve_1 = require("./data-payload-with-relations.resolve");
|
|
14
|
-
const dbAndPrismaArgs_resolve_1 = require("./dbAndPrismaArgs.resolve");
|
|
15
|
-
const deepmerge_1 = __importDefault(require("deepmerge"));
|
|
16
|
-
function resolveBaseMethods(instance, config) {
|
|
17
|
-
const { baseMethods, showWorking } = config;
|
|
18
|
-
const { tableName, pkName, relations, softRemovekName } = instance;
|
|
19
|
-
const relationsKeys = relations ? Object.keys(relations) : [];
|
|
20
|
-
// * GET
|
|
21
|
-
if (baseMethods.get.active) {
|
|
22
|
-
instance.get = async (pk, options) => {
|
|
23
|
-
if (pk == undefined)
|
|
24
|
-
throw new vs_repo_error_1.VSRepoRuntimeError(`[VSRepository] (${tableName}: runtime) 'pk' must be provided.`, "65706");
|
|
25
|
-
const { db, prismaArgs } = (0, dbAndPrismaArgs_resolve_1.resolveDbAndPrismaArgs)({
|
|
26
|
-
instance,
|
|
27
|
-
baseConfig: baseMethods.get,
|
|
28
|
-
options,
|
|
29
|
-
wherePkValue: pk,
|
|
30
|
-
});
|
|
31
|
-
const start = showWorking
|
|
32
|
-
? (0, logger_util_1.performanceLoggerStart)(tableName, "get", prismaArgs)
|
|
33
|
-
: undefined;
|
|
34
|
-
const result = await db[tableName].findUnique(prismaArgs);
|
|
35
|
-
if (showWorking)
|
|
36
|
-
(0, logger_util_1.performanceLoggerEnd)(tableName, "get", start);
|
|
37
|
-
return result;
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
// * GET OR THROW
|
|
41
|
-
if (baseMethods.getOrThrow.active) {
|
|
42
|
-
instance.getOrThrow = async (pk, options) => {
|
|
43
|
-
if (pk == undefined)
|
|
44
|
-
throw new vs_repo_error_1.VSRepoRuntimeError(`[VSRepository] (${tableName}: runtime) 'pk' must be provided.`, "65706");
|
|
45
|
-
const { db, prismaArgs } = (0, dbAndPrismaArgs_resolve_1.resolveDbAndPrismaArgs)({
|
|
46
|
-
instance,
|
|
47
|
-
baseConfig: baseMethods.getOrThrow,
|
|
48
|
-
options,
|
|
49
|
-
wherePkValue: pk,
|
|
50
|
-
});
|
|
51
|
-
const start = showWorking
|
|
52
|
-
? (0, logger_util_1.performanceLoggerStart)(tableName, "getOrThrow", prismaArgs)
|
|
53
|
-
: undefined;
|
|
54
|
-
const result = await db[tableName].findUnique(prismaArgs);
|
|
55
|
-
if (showWorking)
|
|
56
|
-
(0, logger_util_1.performanceLoggerEnd)(tableName, "getOrThrow", start);
|
|
57
|
-
if (!result) {
|
|
58
|
-
throw new vs_repo_error_1.VSRepoRuntimeError(`[VSRepository] (${tableName}: runtime) No record was found for the provided primary key.`, "20727");
|
|
59
|
-
}
|
|
60
|
-
return result;
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
// * GET LIST
|
|
64
|
-
if (baseMethods.getList.active) {
|
|
65
|
-
instance.getList = async (pks, options) => {
|
|
66
|
-
if (!Array.isArray(pks) || pks.some(pk => pk == undefined))
|
|
67
|
-
throw new vs_repo_error_1.VSRepoRuntimeError(`[VSRepository] (${tableName}: runtime) 'pks' must an array of primary keys.`, "65706");
|
|
68
|
-
const { db, prismaArgs } = (0, dbAndPrismaArgs_resolve_1.resolveDbAndPrismaArgs)({
|
|
69
|
-
instance,
|
|
70
|
-
baseConfig: baseMethods.getList,
|
|
71
|
-
options,
|
|
72
|
-
wherePkValue: { in: pks },
|
|
73
|
-
});
|
|
74
|
-
const start = showWorking
|
|
75
|
-
? (0, logger_util_1.performanceLoggerStart)(tableName, "getList", prismaArgs)
|
|
76
|
-
: undefined;
|
|
77
|
-
const result = await db[tableName].findMany(prismaArgs);
|
|
78
|
-
if (showWorking)
|
|
79
|
-
(0, logger_util_1.performanceLoggerEnd)(tableName, "getList", start);
|
|
80
|
-
return result;
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
// * GET ALL
|
|
84
|
-
if (baseMethods.getAll.active) {
|
|
85
|
-
instance.getAll = async (options) => {
|
|
86
|
-
if (options !== undefined && !(0, is_object_validate_1.isObject)(options))
|
|
87
|
-
throw new vs_repo_error_1.VSRepoRuntimeError(`[VSRepository] (${tableName}: runtime) 'options' must be a valid object.`, "65706");
|
|
88
|
-
const { pagination, order, ...restOptions } = options ?? {};
|
|
89
|
-
const { db, prismaArgs } = (0, dbAndPrismaArgs_resolve_1.resolveDbAndPrismaArgs)({
|
|
90
|
-
instance,
|
|
91
|
-
baseConfig: baseMethods.getAll,
|
|
92
|
-
options: restOptions,
|
|
93
|
-
pagination,
|
|
94
|
-
ordering: order,
|
|
95
|
-
withOrderingAndPagination: true,
|
|
96
|
-
});
|
|
97
|
-
const start = showWorking
|
|
98
|
-
? (0, logger_util_1.performanceLoggerStart)(tableName, "getAll", prismaArgs)
|
|
99
|
-
: undefined;
|
|
100
|
-
const result = await db[tableName].findMany(prismaArgs);
|
|
101
|
-
if (showWorking)
|
|
102
|
-
(0, logger_util_1.performanceLoggerEnd)(tableName, "getAll", start);
|
|
103
|
-
return result;
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
// * REMOVE
|
|
107
|
-
if (baseMethods.remove.active) {
|
|
108
|
-
instance.remove = async (pk, options) => {
|
|
109
|
-
if (pk == undefined)
|
|
110
|
-
throw new vs_repo_error_1.VSRepoRuntimeError(`[VSRepository] (${tableName}: runtime) 'pk' must be provided.`, "65706");
|
|
111
|
-
const { db, prismaArgs } = (0, dbAndPrismaArgs_resolve_1.resolveDbAndPrismaArgs)({
|
|
112
|
-
instance,
|
|
113
|
-
baseConfig: baseMethods.remove,
|
|
114
|
-
options,
|
|
115
|
-
wherePkValue: pk,
|
|
116
|
-
});
|
|
117
|
-
const start = showWorking
|
|
118
|
-
? (0, logger_util_1.performanceLoggerStart)(tableName, "remove", prismaArgs)
|
|
119
|
-
: undefined;
|
|
120
|
-
const result = await db[tableName].delete(prismaArgs);
|
|
121
|
-
if (showWorking)
|
|
122
|
-
(0, logger_util_1.performanceLoggerEnd)(tableName, "remove", start);
|
|
123
|
-
return result;
|
|
124
|
-
};
|
|
125
|
-
}
|
|
126
|
-
// * REMOVE LIST
|
|
127
|
-
if (baseMethods.removeList.active) {
|
|
128
|
-
instance.removeList = async (pks, options) => {
|
|
129
|
-
if (!Array.isArray(pks) || pks.some(pk => pk == undefined))
|
|
130
|
-
throw new vs_repo_error_1.VSRepoRuntimeError(`[VSRepository] (${tableName}: runtime) 'pks' must an array of primary keys.`, "65706");
|
|
131
|
-
const { db, prismaArgs } = (0, dbAndPrismaArgs_resolve_1.resolveDbAndPrismaArgs)({
|
|
132
|
-
instance,
|
|
133
|
-
baseConfig: baseMethods.removeList,
|
|
134
|
-
options,
|
|
135
|
-
wherePkValue: { in: pks },
|
|
136
|
-
withoutSelect: true,
|
|
137
|
-
});
|
|
138
|
-
const start = showWorking
|
|
139
|
-
? (0, logger_util_1.performanceLoggerStart)(tableName, "removeList", prismaArgs)
|
|
140
|
-
: undefined;
|
|
141
|
-
const result = await db[tableName].deleteMany(prismaArgs);
|
|
142
|
-
if (showWorking)
|
|
143
|
-
(0, logger_util_1.performanceLoggerEnd)(tableName, "removeList", start);
|
|
144
|
-
return result;
|
|
145
|
-
};
|
|
146
|
-
}
|
|
147
|
-
// * TOTAL
|
|
148
|
-
if (baseMethods.total.active) {
|
|
149
|
-
instance.total = async (options) => {
|
|
150
|
-
const { db, prismaArgs } = (0, dbAndPrismaArgs_resolve_1.resolveDbAndPrismaArgs)({
|
|
151
|
-
instance,
|
|
152
|
-
baseConfig: baseMethods.total,
|
|
153
|
-
options,
|
|
154
|
-
withoutSelect: true,
|
|
155
|
-
});
|
|
156
|
-
const start = showWorking
|
|
157
|
-
? (0, logger_util_1.performanceLoggerStart)(tableName, "total", prismaArgs)
|
|
158
|
-
: undefined;
|
|
159
|
-
const result = await db[tableName].count(prismaArgs);
|
|
160
|
-
if (showWorking)
|
|
161
|
-
(0, logger_util_1.performanceLoggerEnd)(tableName, "total", start);
|
|
162
|
-
return result;
|
|
163
|
-
};
|
|
164
|
-
}
|
|
165
|
-
// * HAS
|
|
166
|
-
if (baseMethods.has.active) {
|
|
167
|
-
instance.has = async (pk, options) => {
|
|
168
|
-
if (pk == undefined)
|
|
169
|
-
throw new vs_repo_error_1.VSRepoRuntimeError(`[VSRepository] (${tableName}: runtime) 'pk' must be provided.`, "65706");
|
|
170
|
-
const { db, prismaArgs } = (0, dbAndPrismaArgs_resolve_1.resolveDbAndPrismaArgs)({
|
|
171
|
-
instance,
|
|
172
|
-
baseConfig: baseMethods.has,
|
|
173
|
-
options,
|
|
174
|
-
wherePkValue: pk,
|
|
175
|
-
specificSelect: { [pkName]: true },
|
|
176
|
-
});
|
|
177
|
-
const start = showWorking
|
|
178
|
-
? (0, logger_util_1.performanceLoggerStart)(tableName, "has", prismaArgs)
|
|
179
|
-
: undefined;
|
|
180
|
-
const result = await db[tableName].findUnique(prismaArgs);
|
|
181
|
-
if (showWorking)
|
|
182
|
-
(0, logger_util_1.performanceLoggerEnd)(tableName, "has", start);
|
|
183
|
-
return !!result;
|
|
184
|
-
};
|
|
185
|
-
}
|
|
186
|
-
// * MERGE
|
|
187
|
-
if (baseMethods.merge.active) {
|
|
188
|
-
instance.merge = async (pk, obj, options) => {
|
|
189
|
-
if (pk == undefined)
|
|
190
|
-
throw new vs_repo_error_1.VSRepoRuntimeError(`[VSRepository] (${tableName}: runtime) 'pk' must be provided.`, "65706");
|
|
191
|
-
if (!(0, is_object_validate_1.isObject)(obj)) {
|
|
192
|
-
throw new vs_repo_error_1.VSRepoRuntimeError(`[VSRepository] (${tableName}: runtime) 'obj' must be a valid object.`, "65706");
|
|
193
|
-
}
|
|
194
|
-
(0, obj_with_relations_validate_1.validateObjWithRelations)(instance, obj, relationsKeys);
|
|
195
|
-
const { db, prismaArgs } = (0, dbAndPrismaArgs_resolve_1.resolveDbAndPrismaArgs)({
|
|
196
|
-
instance,
|
|
197
|
-
baseConfig: baseMethods.merge,
|
|
198
|
-
options,
|
|
199
|
-
wherePkValue: pk,
|
|
200
|
-
});
|
|
201
|
-
const start = showWorking
|
|
202
|
-
? (0, logger_util_1.performanceLoggerStart)(tableName, "merge", prismaArgs)
|
|
203
|
-
: undefined;
|
|
204
|
-
const result = await db[tableName].findUnique(prismaArgs);
|
|
205
|
-
if (!result) {
|
|
206
|
-
if (showWorking)
|
|
207
|
-
(0, logger_util_1.performanceLoggerEnd)(tableName, "merge", start);
|
|
208
|
-
return null;
|
|
209
|
-
}
|
|
210
|
-
if (!relations) {
|
|
211
|
-
if (showWorking)
|
|
212
|
-
(0, logger_util_1.performanceLoggerEnd)(tableName, "merge", start);
|
|
213
|
-
return (0, deepmerge_1.default)(result, obj, {
|
|
214
|
-
arrayMerge: (target, source) => target.concat(source),
|
|
215
|
-
});
|
|
216
|
-
}
|
|
217
|
-
const objKeys = Object.keys(obj);
|
|
218
|
-
const objAny = obj;
|
|
219
|
-
for (let i = 0; i < objKeys.length; i++) {
|
|
220
|
-
const key = objKeys[i];
|
|
221
|
-
if (!relationsKeys.includes(key)) {
|
|
222
|
-
result[key] = objAny[key];
|
|
223
|
-
continue;
|
|
224
|
-
}
|
|
225
|
-
const relation = relations[key];
|
|
226
|
-
if ((relation.mode === "oto" || relation.mode === "mto") && (0, is_object_validate_1.isObject)(result[key])) {
|
|
227
|
-
result[key] = objAny[key] === null ? null : (0, deepmerge_1.default)(result[key], objAny[key]);
|
|
228
|
-
continue;
|
|
229
|
-
}
|
|
230
|
-
else if ((relation.mode === "mtm" || relation.mode === "otm") &&
|
|
231
|
-
Array.isArray(result[key])) {
|
|
232
|
-
const targetArray = result[key];
|
|
233
|
-
const sourceArray = objAny[key];
|
|
234
|
-
const relationPk = relation.pk;
|
|
235
|
-
const targetMap = new Map();
|
|
236
|
-
const targetWithoutPk = [];
|
|
237
|
-
const sourceWithoutPk = [];
|
|
238
|
-
for (let i = 0; i < targetArray.length; i++) {
|
|
239
|
-
const item = targetArray[i];
|
|
240
|
-
if (item[relationPk] !== undefined) {
|
|
241
|
-
targetMap.set(item[relationPk], item);
|
|
242
|
-
}
|
|
243
|
-
else {
|
|
244
|
-
targetWithoutPk.push(item);
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
for (let i = 0; i < sourceArray.length; i++) {
|
|
248
|
-
const sourceItem = sourceArray[i];
|
|
249
|
-
if (sourceItem[relationPk] !== undefined) {
|
|
250
|
-
const targetItem = targetMap.get(sourceItem[relationPk]);
|
|
251
|
-
if (targetItem) {
|
|
252
|
-
targetMap.set(sourceItem[relationPk], (0, deepmerge_1.default)(targetItem, sourceItem));
|
|
253
|
-
}
|
|
254
|
-
else {
|
|
255
|
-
targetMap.set(sourceItem[relationPk], sourceItem);
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
else {
|
|
259
|
-
sourceWithoutPk.push(sourceItem);
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
result[key] = [...targetMap.values(), ...targetWithoutPk, ...sourceWithoutPk];
|
|
263
|
-
continue;
|
|
264
|
-
}
|
|
265
|
-
result[key] = objAny[key];
|
|
266
|
-
}
|
|
267
|
-
if (showWorking)
|
|
268
|
-
(0, logger_util_1.performanceLoggerEnd)(tableName, "merge", start);
|
|
269
|
-
return result;
|
|
270
|
-
};
|
|
271
|
-
}
|
|
272
|
-
// * SOFT REMOVE
|
|
273
|
-
if (baseMethods.softRemove.active && softRemovekName) {
|
|
274
|
-
instance.softRemove = async (pk, options) => {
|
|
275
|
-
if (pk == undefined)
|
|
276
|
-
throw new vs_repo_error_1.VSRepoRuntimeError(`[VSRepository] (${tableName}: runtime) 'pk' must be provided.`, "65706");
|
|
277
|
-
const { db, prismaArgs } = (0, dbAndPrismaArgs_resolve_1.resolveDbAndPrismaArgs)({
|
|
278
|
-
instance,
|
|
279
|
-
baseConfig: baseMethods.softRemove,
|
|
280
|
-
options,
|
|
281
|
-
wherePkValue: pk,
|
|
282
|
-
forceSeeMode: "all",
|
|
283
|
-
dataPayload: { [softRemovekName]: new Date() },
|
|
284
|
-
});
|
|
285
|
-
const start = showWorking
|
|
286
|
-
? (0, logger_util_1.performanceLoggerStart)(tableName, "softRemove", prismaArgs)
|
|
287
|
-
: undefined;
|
|
288
|
-
const result = await db[tableName].update(prismaArgs);
|
|
289
|
-
if (showWorking)
|
|
290
|
-
(0, logger_util_1.performanceLoggerEnd)(tableName, "softRemove", start);
|
|
291
|
-
return result;
|
|
292
|
-
};
|
|
293
|
-
}
|
|
294
|
-
// * SOFT REMOVE LIST
|
|
295
|
-
if (baseMethods.softRemoveList.active && softRemovekName) {
|
|
296
|
-
instance.softRemoveList = async (pks, options) => {
|
|
297
|
-
if (!Array.isArray(pks) || pks.some(pk => pk == undefined))
|
|
298
|
-
throw new vs_repo_error_1.VSRepoRuntimeError(`[VSRepository] (${tableName}: runtime) 'pks' must an array of primary keys.`, "65706");
|
|
299
|
-
const { db, prismaArgs } = (0, dbAndPrismaArgs_resolve_1.resolveDbAndPrismaArgs)({
|
|
300
|
-
instance,
|
|
301
|
-
baseConfig: baseMethods.softRemoveList,
|
|
302
|
-
options,
|
|
303
|
-
wherePkValue: { in: pks },
|
|
304
|
-
withoutSelect: true,
|
|
305
|
-
forceSeeMode: "all",
|
|
306
|
-
dataPayload: { [softRemovekName]: new Date() },
|
|
307
|
-
});
|
|
308
|
-
const start = showWorking
|
|
309
|
-
? (0, logger_util_1.performanceLoggerStart)(tableName, "softRemoveList", prismaArgs)
|
|
310
|
-
: undefined;
|
|
311
|
-
const result = await db[tableName].updateMany(prismaArgs);
|
|
312
|
-
if (showWorking)
|
|
313
|
-
(0, logger_util_1.performanceLoggerEnd)(tableName, "softRemoveList", start);
|
|
314
|
-
return result;
|
|
315
|
-
};
|
|
316
|
-
}
|
|
317
|
-
// * RESTORE
|
|
318
|
-
if (baseMethods.restore.active && softRemovekName) {
|
|
319
|
-
instance.restore = async (pk, options) => {
|
|
320
|
-
if (pk == undefined)
|
|
321
|
-
throw new vs_repo_error_1.VSRepoRuntimeError(`[VSRepository] (${tableName}: runtime) 'pk' must be provided.`, "65706");
|
|
322
|
-
const { db, prismaArgs } = (0, dbAndPrismaArgs_resolve_1.resolveDbAndPrismaArgs)({
|
|
323
|
-
instance,
|
|
324
|
-
baseConfig: baseMethods.restore,
|
|
325
|
-
options,
|
|
326
|
-
wherePkValue: pk,
|
|
327
|
-
forceSeeMode: "all",
|
|
328
|
-
dataPayload: { [softRemovekName]: null },
|
|
329
|
-
});
|
|
330
|
-
const start = showWorking
|
|
331
|
-
? (0, logger_util_1.performanceLoggerStart)(tableName, "restore", prismaArgs)
|
|
332
|
-
: undefined;
|
|
333
|
-
const result = await db[tableName].update(prismaArgs);
|
|
334
|
-
if (showWorking)
|
|
335
|
-
(0, logger_util_1.performanceLoggerEnd)(tableName, "restore", start);
|
|
336
|
-
return result;
|
|
337
|
-
};
|
|
338
|
-
}
|
|
339
|
-
// * RESTORE LIST
|
|
340
|
-
if (baseMethods.restoreList.active && softRemovekName) {
|
|
341
|
-
instance.restoreList = async (pks, options) => {
|
|
342
|
-
if (!Array.isArray(pks) || pks.some(pk => pk == undefined))
|
|
343
|
-
throw new vs_repo_error_1.VSRepoRuntimeError(`[VSRepository] (${tableName}: runtime) 'pks' must an array of primary keys.`, "65706");
|
|
344
|
-
const { db, prismaArgs } = (0, dbAndPrismaArgs_resolve_1.resolveDbAndPrismaArgs)({
|
|
345
|
-
instance,
|
|
346
|
-
baseConfig: baseMethods.restoreList,
|
|
347
|
-
options,
|
|
348
|
-
withoutSelect: true,
|
|
349
|
-
wherePkValue: { in: pks },
|
|
350
|
-
forceSeeMode: "all",
|
|
351
|
-
dataPayload: { [softRemovekName]: null },
|
|
352
|
-
});
|
|
353
|
-
const start = showWorking
|
|
354
|
-
? (0, logger_util_1.performanceLoggerStart)(tableName, "restoreList", prismaArgs)
|
|
355
|
-
: undefined;
|
|
356
|
-
const result = await db[tableName].updateMany(prismaArgs);
|
|
357
|
-
if (showWorking)
|
|
358
|
-
(0, logger_util_1.performanceLoggerEnd)(tableName, "restoreList", start);
|
|
359
|
-
return result;
|
|
360
|
-
};
|
|
361
|
-
}
|
|
362
|
-
// * SAVE
|
|
363
|
-
if (baseMethods.save.active) {
|
|
364
|
-
instance.save = async (obj, options) => {
|
|
365
|
-
if (!(0, is_object_validate_1.isObject)(obj)) {
|
|
366
|
-
throw new vs_repo_error_1.VSRepoRuntimeError(`[VSRepository] (${tableName}: runtime) 'obj' must be a valid object.`, "65706");
|
|
367
|
-
}
|
|
368
|
-
(0, obj_with_relations_validate_1.validateObjWithRelations)(instance, obj, relationsKeys);
|
|
369
|
-
const objAny = obj;
|
|
370
|
-
if (objAny[pkName] === undefined) {
|
|
371
|
-
const { db, prismaArgs } = (0, dbAndPrismaArgs_resolve_1.resolveDbAndPrismaArgs)({
|
|
372
|
-
instance,
|
|
373
|
-
baseConfig: baseMethods.save,
|
|
374
|
-
options,
|
|
375
|
-
withoutWhere: true,
|
|
376
|
-
dataPayload: (0, data_payload_with_relations_resolve_1.resolveDataPayloadWithRelations)(instance, objAny, relationsKeys),
|
|
377
|
-
});
|
|
378
|
-
const start = showWorking
|
|
379
|
-
? (0, logger_util_1.performanceLoggerStart)(tableName, "save", prismaArgs)
|
|
380
|
-
: undefined;
|
|
381
|
-
const result = await db[tableName].create(prismaArgs);
|
|
382
|
-
if (showWorking)
|
|
383
|
-
(0, logger_util_1.performanceLoggerEnd)(tableName, "save", start);
|
|
384
|
-
return result;
|
|
385
|
-
}
|
|
386
|
-
else {
|
|
387
|
-
const { createPayload, updatePayload } = (0, create_update_payloads_with_relations_resolve_1.resolveCreateUpdatePayloadsWithRelations)(instance, obj, relationsKeys);
|
|
388
|
-
const { db, prismaArgs } = (0, dbAndPrismaArgs_resolve_1.resolveDbAndPrismaArgs)({
|
|
389
|
-
instance,
|
|
390
|
-
baseConfig: baseMethods.save,
|
|
391
|
-
options,
|
|
392
|
-
wherePkValue: objAny[pkName],
|
|
393
|
-
createPayload,
|
|
394
|
-
updatePayload,
|
|
395
|
-
});
|
|
396
|
-
const start = showWorking
|
|
397
|
-
? (0, logger_util_1.performanceLoggerStart)(tableName, "save", prismaArgs)
|
|
398
|
-
: undefined;
|
|
399
|
-
const result = await db[tableName].upsert(prismaArgs);
|
|
400
|
-
if (showWorking)
|
|
401
|
-
(0, logger_util_1.performanceLoggerEnd)(tableName, "save", start);
|
|
402
|
-
return result;
|
|
403
|
-
}
|
|
404
|
-
};
|
|
405
|
-
}
|
|
406
|
-
// * SAVE LIST
|
|
407
|
-
if (baseMethods.saveList.active) {
|
|
408
|
-
instance.saveList = async (objs, options) => {
|
|
409
|
-
if (!Array.isArray(objs) || objs.some(ob => !(0, is_object_validate_1.isObject)(ob))) {
|
|
410
|
-
throw new vs_repo_error_1.VSRepoRuntimeError(`[VSRepository] (${tableName}: runtime) 'objs' must be an array of valid objects.`, "65706");
|
|
411
|
-
}
|
|
412
|
-
const validatedOptions = (0, method_options_validate_1.validateMethodOptions)(options, instance);
|
|
413
|
-
const argsList = [];
|
|
414
|
-
const queries = objs.map(obj => {
|
|
415
|
-
(0, obj_with_relations_validate_1.validateObjWithRelations)(instance, obj, relationsKeys);
|
|
416
|
-
const objAny = obj;
|
|
417
|
-
if (objAny[pkName] === undefined) {
|
|
418
|
-
const { prismaArgs } = (0, dbAndPrismaArgs_resolve_1.resolveDbAndPrismaArgs)({
|
|
419
|
-
instance,
|
|
420
|
-
baseConfig: baseMethods.saveList,
|
|
421
|
-
options: validatedOptions,
|
|
422
|
-
alreadyValidatedOptions: true,
|
|
423
|
-
withoutWhere: true,
|
|
424
|
-
dataPayload: (0, data_payload_with_relations_resolve_1.resolveDataPayloadWithRelations)(instance, objAny, relationsKeys),
|
|
425
|
-
});
|
|
426
|
-
argsList.push(prismaArgs);
|
|
427
|
-
return (db) => db[tableName].create(prismaArgs);
|
|
428
|
-
}
|
|
429
|
-
else {
|
|
430
|
-
const { createPayload, updatePayload } = (0, create_update_payloads_with_relations_resolve_1.resolveCreateUpdatePayloadsWithRelations)(instance, obj, relationsKeys);
|
|
431
|
-
const { prismaArgs } = (0, dbAndPrismaArgs_resolve_1.resolveDbAndPrismaArgs)({
|
|
432
|
-
instance,
|
|
433
|
-
baseConfig: baseMethods.saveList,
|
|
434
|
-
options: validatedOptions,
|
|
435
|
-
alreadyValidatedOptions: true,
|
|
436
|
-
wherePkValue: objAny[pkName],
|
|
437
|
-
createPayload,
|
|
438
|
-
updatePayload,
|
|
439
|
-
});
|
|
440
|
-
argsList.push(prismaArgs);
|
|
441
|
-
return (db) => db[tableName].upsert(prismaArgs);
|
|
442
|
-
}
|
|
443
|
-
});
|
|
444
|
-
const start = showWorking
|
|
445
|
-
? (0, logger_util_1.performanceLoggerStart)(tableName, "saveList", argsList)
|
|
446
|
-
: undefined;
|
|
447
|
-
const results = [];
|
|
448
|
-
if (validatedOptions.db) {
|
|
449
|
-
for (let i = 0; i < queries.length; i++) {
|
|
450
|
-
results.push(await queries[i](validatedOptions.db));
|
|
451
|
-
}
|
|
452
|
-
}
|
|
453
|
-
else {
|
|
454
|
-
await instance.prisma.$transaction(async (tx) => {
|
|
455
|
-
for (let i = 0; i < queries.length; i++) {
|
|
456
|
-
results.push(await queries[i](tx));
|
|
457
|
-
}
|
|
458
|
-
});
|
|
459
|
-
}
|
|
460
|
-
if (showWorking)
|
|
461
|
-
(0, logger_util_1.performanceLoggerEnd)(tableName, "saveList", start);
|
|
462
|
-
return results;
|
|
463
|
-
};
|
|
464
|
-
}
|
|
465
|
-
// * PATCH
|
|
466
|
-
if (baseMethods.patch.active) {
|
|
467
|
-
instance.patch = async (pk, obj, options) => {
|
|
468
|
-
if (pk == undefined)
|
|
469
|
-
throw new vs_repo_error_1.VSRepoRuntimeError(`[VSRepository] (${tableName}: runtime) 'pk' must be provided.`, "65706");
|
|
470
|
-
if (!(0, is_object_validate_1.isObject)(obj)) {
|
|
471
|
-
throw new vs_repo_error_1.VSRepoRuntimeError(`[VSRepository] (${tableName}: runtime) 'obj' must be a valid object.`, "65706");
|
|
472
|
-
}
|
|
473
|
-
(0, obj_with_relations_validate_1.validateObjWithRelations)(instance, obj, relationsKeys);
|
|
474
|
-
const { updatePayload } = (0, create_update_payloads_with_relations_resolve_1.resolveCreateUpdatePayloadsWithRelations)(instance, obj, relationsKeys);
|
|
475
|
-
const { db, prismaArgs } = (0, dbAndPrismaArgs_resolve_1.resolveDbAndPrismaArgs)({
|
|
476
|
-
instance,
|
|
477
|
-
baseConfig: baseMethods.patch,
|
|
478
|
-
options,
|
|
479
|
-
wherePkValue: pk,
|
|
480
|
-
dataPayload: updatePayload,
|
|
481
|
-
});
|
|
482
|
-
const start = showWorking
|
|
483
|
-
? (0, logger_util_1.performanceLoggerStart)(tableName, "patch", prismaArgs)
|
|
484
|
-
: undefined;
|
|
485
|
-
const result = await db[tableName].update(prismaArgs);
|
|
486
|
-
if (showWorking)
|
|
487
|
-
(0, logger_util_1.performanceLoggerEnd)(tableName, "patch", start);
|
|
488
|
-
return result;
|
|
489
|
-
};
|
|
490
|
-
}
|
|
491
|
-
// * PATCH LIST
|
|
492
|
-
if (baseMethods.patchList.active) {
|
|
493
|
-
instance.patchList = async (tuples, options) => {
|
|
494
|
-
if (!Array.isArray(tuples) ||
|
|
495
|
-
tuples.some(tuple => tuple[0] == undefined || !(0, is_object_validate_1.isObject)(tuple[1]))) {
|
|
496
|
-
throw new vs_repo_error_1.VSRepoRuntimeError(`[VSRepository] (${tableName}: runtime) 'tuples' must be a valid array of tuples [pk, obj].`, "65706");
|
|
497
|
-
}
|
|
498
|
-
const validatedOptions = (0, method_options_validate_1.validateMethodOptions)(options, instance);
|
|
499
|
-
const argsList = [];
|
|
500
|
-
const queries = tuples.map(tuple => {
|
|
501
|
-
(0, obj_with_relations_validate_1.validateObjWithRelations)(instance, tuple[1], relationsKeys);
|
|
502
|
-
const objAny = tuple[1];
|
|
503
|
-
const { updatePayload } = (0, create_update_payloads_with_relations_resolve_1.resolveCreateUpdatePayloadsWithRelations)(instance, objAny, relationsKeys);
|
|
504
|
-
const { prismaArgs } = (0, dbAndPrismaArgs_resolve_1.resolveDbAndPrismaArgs)({
|
|
505
|
-
instance,
|
|
506
|
-
baseConfig: baseMethods.patchList,
|
|
507
|
-
options: validatedOptions,
|
|
508
|
-
alreadyValidatedOptions: true,
|
|
509
|
-
wherePkValue: tuple[0],
|
|
510
|
-
dataPayload: updatePayload,
|
|
511
|
-
});
|
|
512
|
-
argsList.push(prismaArgs);
|
|
513
|
-
return (db) => db[tableName].update(prismaArgs);
|
|
514
|
-
});
|
|
515
|
-
const start = showWorking
|
|
516
|
-
? (0, logger_util_1.performanceLoggerStart)(tableName, "patchList", argsList)
|
|
517
|
-
: undefined;
|
|
518
|
-
const results = [];
|
|
519
|
-
if (validatedOptions.db) {
|
|
520
|
-
for (let i = 0; i < queries.length; i++) {
|
|
521
|
-
results.push(await queries[i](validatedOptions.db));
|
|
522
|
-
}
|
|
523
|
-
}
|
|
524
|
-
else {
|
|
525
|
-
await instance.prisma.$transaction(async (tx) => {
|
|
526
|
-
for (let i = 0; i < queries.length; i++) {
|
|
527
|
-
results.push(await queries[i](tx));
|
|
528
|
-
}
|
|
529
|
-
});
|
|
530
|
-
}
|
|
531
|
-
if (showWorking)
|
|
532
|
-
(0, logger_util_1.performanceLoggerEnd)(tableName, "patchList", start);
|
|
533
|
-
return results;
|
|
534
|
-
};
|
|
535
|
-
}
|
|
536
|
-
}
|