1 | import { ModuleMetadata, Provider, Type } from '@nestjs/common';
|
2 | import { DataSource, DataSourceOptions } 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 |
|
30 | keepConnectionAlive?: boolean;
|
31 | |
32 |
|
33 |
|
34 | verboseRetryLog?: boolean;
|
35 | } & Partial<DataSourceOptions>;
|
36 | export interface TypeOrmOptionsFactory {
|
37 | createTypeOrmOptions(connectionName?: string): Promise<TypeOrmModuleOptions> | TypeOrmModuleOptions;
|
38 | }
|
39 | export declare type TypeOrmDataSourceFactory = (options?: DataSourceOptions) => Promise<DataSource>;
|
40 | export interface TypeOrmModuleAsyncOptions extends Pick<ModuleMetadata, 'imports'> {
|
41 | name?: string;
|
42 | useExisting?: Type<TypeOrmOptionsFactory>;
|
43 | useClass?: Type<TypeOrmOptionsFactory>;
|
44 | useFactory?: (...args: any[]) => Promise<TypeOrmModuleOptions> | TypeOrmModuleOptions;
|
45 | dataSourceFactory?: TypeOrmDataSourceFactory;
|
46 | inject?: any[];
|
47 | extraProviders?: Provider[];
|
48 | }
|