zibri
    Preparing search index...

    Class Repository<T, CreateData, UpdateData>

    A repository that handles database related things for its entity.

    Type Parameters

    Index

    Constructors

    Methods

    • Finds a single entity with the given options.

      Type Parameters

      • B extends boolean = true

      Parameters

      • options: FindOneOptions<T>

        The options, including the where filter etc.

      • required: B = ...

        Whether or not a result is required. Defaults to true.

      Returns Promise<B extends false ? undefined | T : T>

      The found result. If required is set to false, also undefined.