@nestjs/typeorm

  • Version 7.1.5
  • Published
  • 34.2 kB
  • 1 dependency
  • MIT license

Install

npm i @nestjs/typeorm
yarn add @nestjs/typeorm
pnpm add @nestjs/typeorm

Overview

Nest - modern, fast, powerful node.js web framework (@typeorm)

Index

Functions

function generateString

generateString: () => string;

    function getConnectionName

    getConnectionName: (options: any) => string;

      function getConnectionPrefix

      getConnectionPrefix: (
      connection?: Connection | ConnectionOptions | string
      ) => string;

        function getConnectionToken

        getConnectionToken: (
        connection?: Connection | ConnectionOptions | string
        ) => string | Function | Type<Connection>;

          function getCustomRepositoryToken

          getCustomRepositoryToken: (repository: Function) => string;

            function getEntityManagerToken

            getEntityManagerToken: (
            connection?: Connection | ConnectionOptions | string
            ) => string | Function;

              function getRepositoryToken

              getRepositoryToken: (
              entity: EntityClassOrSchema,
              connection?: Connection | ConnectionOptions | string
              ) => string;

                function handleRetry

                handleRetry: (
                retryAttempts?: number,
                retryDelay?: number,
                connectionName?: string,
                verboseRetryLog?: boolean,
                toRetry?: (err: any) => boolean
                ) => <T>(source: any) => any;

                  function InjectConnection

                  InjectConnection: (
                  connection?: Connection | ConnectionOptions | string
                  ) => ParameterDecorator;

                    function InjectEntityManager

                    InjectEntityManager: (
                    connection?: Connection | ConnectionOptions | string
                    ) => ParameterDecorator;

                      function InjectRepository

                      InjectRepository: (
                      entity: EntityClassOrSchema,
                      connection?: string
                      ) => (target: object, key: string | symbol, index?: number | undefined) => void;

                        Classes

                        class TypeOrmModule

                        class TypeOrmModule {}

                          method forFeature

                          static forFeature: (
                          entities?: EntityClassOrSchema[],
                          connection?: Connection | ConnectionOptions | string
                          ) => any;

                            method forRoot

                            static forRoot: (options?: TypeOrmModuleOptions) => any;

                              method forRootAsync

                              static forRootAsync: (options: TypeOrmModuleAsyncOptions) => any;

                                Interfaces

                                interface TypeOrmModuleAsyncOptions

                                interface TypeOrmModuleAsyncOptions extends Pick<ModuleMetadata, 'imports'> {}

                                  property inject

                                  inject?: any[];

                                    property name

                                    name?: string;

                                      property useClass

                                      useClass?: Type<TypeOrmOptionsFactory>;

                                        property useExisting

                                        useExisting?: Type<TypeOrmOptionsFactory>;

                                          property useFactory

                                          useFactory?: (
                                          ...args: any[]
                                          ) => Promise<TypeOrmModuleOptions> | TypeOrmModuleOptions;

                                            interface TypeOrmOptionsFactory

                                            interface TypeOrmOptionsFactory {}

                                              method createTypeOrmOptions

                                              createTypeOrmOptions: (
                                              connectionName?: string
                                              ) => Promise<TypeOrmModuleOptions> | TypeOrmModuleOptions;

                                                Type Aliases

                                                type TypeOrmModuleOptions

                                                type TypeOrmModuleOptions = {
                                                retryAttempts?: number;
                                                retryDelay?: number;
                                                toRetry?: (err: any) => boolean;
                                                autoLoadEntities?: boolean;
                                                keepConnectionAlive?: boolean;
                                                verboseRetryLog?: boolean;
                                                } & Partial<ConnectionOptions>;

                                                  Package Files (5)

                                                  Dependencies (1)

                                                  Dev Dependencies (29)

                                                  Peer Dependencies (5)

                                                  Badge

                                                  To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                  You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@nestjs/typeorm.

                                                  • Markdown
                                                    [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@nestjs/typeorm)
                                                  • HTML
                                                    <a href="https://www.jsdocs.io/package/@nestjs/typeorm"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>