1 | import { Type } from '@nestjs/common';
|
2 | import { Observable } from 'rxjs';
|
3 | import { Connection, ConnectionOptions } from 'typeorm';
|
4 | import { EntityClassOrSchema } from '../interfaces/entity-class-or-schema.type';
|
5 | /**
|
6 | * This function generates an injection token for an Entity or Repository
|
7 | * @param {EntityClassOrSchema} entity parameter can either be an Entity or Repository
|
8 | * @param {string} [connection='default'] Connection name
|
9 | * @returns {string} The Entity | Repository injection token
|
10 | */
|
11 | export declare function getRepositoryToken(entity: EntityClassOrSchema, connection?: Connection | ConnectionOptions | string): Function | string;
|
12 | /**
|
13 | * This function generates an injection token for an Entity or Repository
|
14 | * @param {Function} This parameter can either be an Entity or Repository
|
15 | * @returns {string} The Repository injection token
|
16 | */
|
17 | export declare function getCustomRepositoryToken(repository: Function): string;
|
18 | /**
|
19 | * This function returns a Connection injection token for the given Connection, ConnectionOptions or connection name.
|
20 | * @param {Connection | ConnectionOptions | string} [connection='default'] This optional parameter is either
|
21 | * a Connection, or a ConnectionOptions or a string.
|
22 | * @returns {string | Function} The Connection injection token.
|
23 | */
|
24 | export declare function getConnectionToken(connection?: Connection | ConnectionOptions | string): string | Function | Type<Connection>;
|
25 | /**
|
26 | * This function returns a Connection prefix based on the connection name
|
27 | * @param {Connection | ConnectionOptions | string} [connection='default'] This optional parameter is either
|
28 | * a Connection, or a ConnectionOptions or a string.
|
29 | * @returns {string | Function} The Connection injection token.
|
30 | */
|
31 | export declare function getConnectionPrefix(connection?: Connection | ConnectionOptions | string): string;
|
32 | /**
|
33 | * This function returns an EntityManager injection token for the given Connection, ConnectionOptions or connection name.
|
34 | * @param {Connection | ConnectionOptions | string} [connection='default'] This optional parameter is either
|
35 | * a Connection, or a ConnectionOptions or a string.
|
36 | * @returns {string | Function} The EntityManager injection token.
|
37 | */
|
38 | export declare function getEntityManagerToken(connection?: Connection | ConnectionOptions | string): string | Function;
|
39 | export declare function handleRetry(retryAttempts?: number, retryDelay?: number, connectionName?: string, verboseRetryLog?: boolean, toRetry?: (err: any) => boolean): <T>(source: Observable<T>) => Observable<T>;
|
40 | export declare function getConnectionName(options: ConnectionOptions): string;
|
41 | export declare const generateString: () => string;
|