Class AbstractEntityManager<MongoDBDatasources, KnexDataSources, Scalars, MetadataType>Abstract

Type Parameters

Hierarchy

  • AbstractEntityManager

Constructors

  • Type Parameters

    Parameters

    • args: {
          cache?: {
              engine: TypettaCache;
          };
          idGenerators?: { [ K in string | number | symbol]?: (() => Scalars[K]) };
          metadata?: MetadataType;
          scalars?: DriverDataTypeAdapterMap<Scalars>;
      }
      • Optional cache?: {
            engine: TypettaCache;
        }
      • Optional idGenerators?: { [ K in string | number | symbol]?: (() => Scalars[K]) }
      • Optional metadata?: MetadataType
      • Optional scalars?: DriverDataTypeAdapterMap<Scalars>

    Returns AbstractEntityManager<MongoDBDatasources, KnexDataSources, Scalars, MetadataType>

Properties

Transaction: AbstractEntityManager<MongoDBDatasources, KnexDataSources, Scalars, MetadataType> & {
    __transaction_enabled__: true;
} = ...
adapters: DriverDataTypeAdapterMap<Scalars>
cache?: TypettaCache
metadata?: MetadataType

Methods

  • Type Parameters

    • T

    Parameters

    • run: ((dbs: Record<string, unknown>, entities: Record<string, unknown>) => Promise<T>)
        • (dbs: Record<string, unknown>, entities: Record<string, unknown>): Promise<T>
        • Parameters

          • dbs: Record<string, unknown>
          • entities: Record<string, unknown>

          Returns Promise<T>

    Returns Promise<T>

  • Parameters

    • datasource: string

    Returns undefined | Transaction<any, any[]>

  • Parameters

    • datasource: string

    Returns undefined | ClientSession

  • Type Parameters

    • T

    Parameters

    • transaction: TransactionData<MongoDBDatasources, KnexDataSources>
    • f: ((dao: AbstractEntityManager<MongoDBDatasources, KnexDataSources, Scalars, MetadataType> & {
          __transaction_enabled__: true;
      }) => Promise<T>)
        • (dao: AbstractEntityManager<MongoDBDatasources, KnexDataSources, Scalars, MetadataType> & {
              __transaction_enabled__: true;
          }): Promise<T>
        • Parameters

          • dao: AbstractEntityManager<MongoDBDatasources, KnexDataSources, Scalars, MetadataType> & {
                __transaction_enabled__: true;
            }

          Returns Promise<T>

    Returns Promise<T>

Generated using TypeDoc