Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "index"

Index

Functions

createConnection

  • Creates a new connection and registers it in the manager. Only one connection from ormconfig will be created (name "default" or connection without name).

    If connection options were not specified, then it will try to create connection automatically, based on content of ormconfig (json/js/yml/xml/env) file or environment variables. Only one connection from ormconfig will be created (name "default" or connection without name).

    Returns Promise<Connection>

  • Creates a new connection from the ormconfig file with a given name.

    If connection options were not specified, then it will try to create connection automatically, based on content of ormconfig (json/js/yml/xml/env) file or environment variables. Only one connection from ormconfig will be created (name "default" or connection without name).

    Parameters

    • name: string

    Returns Promise<Connection>

  • Creates a new connection and registers it in the manager.

    If connection options were not specified, then it will try to create connection automatically, based on content of ormconfig (json/js/yml/xml/env) file or environment variables. Only one connection from ormconfig will be created (name "default" or connection without name).

    Parameters

    Returns Promise<Connection>

createConnections

  • Creates new connections and registers them in the manager.

    If connection options were not specified, then it will try to create connection automatically, based on content of ormconfig (json/js/yml/xml/env) file or environment variables. All connections from the ormconfig will be created.

    Parameters

    Returns Promise<Connection[]>

createQueryBuilder

  • createQueryBuilder<Entity>(entityClass?: ObjectType<Entity> | string, alias?: undefined | string, connectionName?: string): SelectQueryBuilder<Entity>
  • Creates a new query builder.

    Type parameters

    • Entity

    Parameters

    • Optional entityClass: ObjectType<Entity> | string
    • Optional alias: undefined | string
    • Default value connectionName: string = "default"

    Returns SelectQueryBuilder<Entity>

getConnection

  • getConnection(connectionName?: string): Connection
  • Gets connection from the connection manager. If connection name wasn't specified, then "default" connection will be retrieved.

    Parameters

    • Default value connectionName: string = "default"

    Returns Connection

getConnectionManager

getConnectionOptions

  • Reads connection options stored in ormconfig configuration file.

    Parameters

    • Default value connectionName: string = "default"

    Returns Promise<ConnectionOptions>

getCustomRepository

  • getCustomRepository<T>(customRepository: ObjectType<T>, connectionName?: string): T
  • Gets tree repository for the given entity class.

    Type parameters

    • T

    Parameters

    • customRepository: ObjectType<T>
    • Default value connectionName: string = "default"

    Returns T

getManager

  • Gets entity manager from the connection. If connection name wasn't specified, then "default" connection will be retrieved.

    Parameters

    • Default value connectionName: string = "default"

    Returns EntityManager

getMetadataArgsStorage

getMongoManager

  • Gets MongoDB entity manager from the connection. If connection name wasn't specified, then "default" connection will be retrieved.

    Parameters

    • Default value connectionName: string = "default"

    Returns MongoEntityManager

getMongoRepository

  • Gets mongodb repository for the given entity class or name.

    Type parameters

    • Entity

    Parameters

    • entityClass: ObjectType<Entity> | string
    • Default value connectionName: string = "default"

    Returns MongoRepository<Entity>

getRepository

  • getRepository<Entity>(entityClass: ObjectType<Entity> | string, connectionName?: string): Repository<Entity>
  • Gets repository for the given entity class.

    Type parameters

    • Entity

    Parameters

    • entityClass: ObjectType<Entity> | string
    • Default value connectionName: string = "default"

    Returns Repository<Entity>

getSqljsManager

  • Gets Sqljs entity manager from connection name. "default" connection is used, when no name is specified. Only works when Sqljs driver is used.

    Parameters

    • Default value connectionName: string = "default"

    Returns SqljsEntityManager

getTreeRepository

  • Gets tree repository for the given entity class.

    Type parameters

    • Entity

    Parameters

    • entityClass: ObjectType<Entity> | string
    • Default value connectionName: string = "default"

    Returns TreeRepository<Entity>

Generated using TypeDoc