@atlantjs/arch 3.2.6 → 3.2.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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DataSource,
|
|
1
|
+
import { DataSource, ObjectLiteral } from "typeorm";
|
|
2
2
|
import { FindOptionsRelations } from "typeorm";
|
|
3
3
|
import { Newable } from "../../../../@tool-box/utils/datatypes/generic-types";
|
|
4
4
|
import { Optional } from "../../../../@tool-box/utils/ducts/optional-type";
|
|
@@ -6,7 +6,6 @@ import { Return } from "../../../../@tool-box/utils/ducts/return-type";
|
|
|
6
6
|
import { DatabaseConfigAbstract } from "./database.config";
|
|
7
7
|
import { FailureAbstract } from "../failures/failure.abstract";
|
|
8
8
|
import { EntityBackendAbstract } from "../../domain/entities/entity-backend.abstract";
|
|
9
|
-
type SchemaAbstract = EntityTarget<ObjectLiteral>;
|
|
10
9
|
export declare abstract class DatabaseHelperAbstract {
|
|
11
10
|
private database;
|
|
12
11
|
private queryRunner;
|
|
@@ -15,11 +14,12 @@ export declare abstract class DatabaseHelperAbstract {
|
|
|
15
14
|
read<T extends Newable<ObjectLiteral>, E extends ObjectLiteral>(schema: T, condition: {
|
|
16
15
|
[K in keyof InstanceType<T>]?: InstanceType<T>[K];
|
|
17
16
|
}, relations: FindOptionsRelations<E>): Promise<Return<Optional<ObjectLiteral[]>, FailureAbstract>>;
|
|
18
|
-
write<T extends
|
|
19
|
-
delete<T extends
|
|
17
|
+
write<T extends Newable<ObjectLiteral>>(schema: T, sortedEntities: EntityBackendAbstract[]): Promise<Return<undefined, undefined>>;
|
|
18
|
+
delete<T extends Newable<ObjectLiteral>>(entity: T, condition: {
|
|
19
|
+
[K in keyof InstanceType<T>]?: InstanceType<T>[K];
|
|
20
|
+
}): Promise<Return<undefined, undefined>>;
|
|
20
21
|
private getManager;
|
|
21
22
|
private openTransaction;
|
|
22
23
|
private commit;
|
|
23
24
|
private rollback;
|
|
24
25
|
}
|
|
25
|
-
export {};
|