1 | import { ModuleMetadata, Type } from '@nestjs/common';
|
2 | import { Connection, ConnectionOptions } from 'typeorm';
|
3 | export declare type TypeOrmModuleOptions = {
|
4 | |
5 |
|
6 |
|
7 |
|
8 | retryAttempts?: number;
|
9 | |
10 |
|
11 |
|
12 |
|
13 | retryDelay?: number;
|
14 | |
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 | toRetry?: (err: any) => boolean;
|
22 | |
23 |
|
24 |
|
25 | autoLoadEntities?: boolean;
|
26 | |
27 |
|
28 |
|
29 | keepConnectionAlive?: boolean;
|
30 | |
31 |
|
32 |
|
33 | verboseRetryLog?: boolean;
|
34 | } & Partial<ConnectionOptions>;
|
35 | export interface TypeOrmOptionsFactory {
|
36 | createTypeOrmOptions(connectionName?: string): Promise<TypeOrmModuleOptions> | TypeOrmModuleOptions;
|
37 | }
|
38 | export declare type TypeOrmConnectionFactory = (options?: ConnectionOptions) => Promise<Connection>;
|
39 | export interface TypeOrmModuleAsyncOptions extends Pick<ModuleMetadata, 'imports'> {
|
40 | name?: string;
|
41 | useExisting?: Type<TypeOrmOptionsFactory>;
|
42 | useClass?: Type<TypeOrmOptionsFactory>;
|
43 | useFactory?: (...args: any[]) => Promise<TypeOrmModuleOptions> | TypeOrmModuleOptions;
|
44 | connectionFactory?: TypeOrmConnectionFactory;
|
45 | inject?: any[];
|
46 | }
|