elioria-sst-x
    Preparing search index...

    Implements

    Index
    db: PostgresJsDatabase<packages/db/src/schema> & {}

    The db value.

    • Generated

      Executes countLinkedRecords.

      Parameters

      • gheId: string

        The gheId value.

      • tenantId: string

        The tenantId value.

      Returns Promise<
          {
              collaborators: number;
              epiRequirements: number;
              epiSuggestions: number;
              functions: number;
              riskCatalogItems: number;
              riskItems: number;
              total: number;
              trainingRequirements: number;
          },
      >

      The function result.

      Objective: In module packages/db/src/repositories/ghe.repository.ts, run countLinkedRecords.

      Behavior: Async; accepts gheId and tenantId; returns a value; invokes Promise.all.

    • Generated

      Executes delete.

      Parameters

      • id: string

        The id value.

      • tenantId: string

        The tenantId value.

      Returns Promise<boolean>

      The function result.

      Objective: In module packages/db/src/repositories/ghe.repository.ts, run delete.

      Behavior: Async; accepts id and tenantId; returns a value; invokes this.db .delete(ghes) .where(and(eq(ghes.id, id), eq(ghes.te.

    • Generated

      Updates data through deleteLinkedConfig.

      Parameters

      • gheId: string

        The gheId value.

      • tenantId: string

        The tenantId value.

      Returns Promise<void>

      The function result.

      Objective: In module packages/db/src/repositories/ghe.repository.ts, change data through deleteLinkedConfig.

      Behavior: Async; accepts gheId and tenantId; returns a value; invokes Promise.all.

    • Generated

      Returns the result of findById.

      Parameters

      • id: string

        The id value.

      • tenantId: string

        The tenantId value.

      Returns Promise<Ghe | null>

      The function result.

      Objective: In module packages/db/src/repositories/ghe.repository.ts, retrieve data through findById.

      Behavior: Async; accepts id and tenantId; returns a value; invokes this.db .select() .from(ghes) .where(and(eq(ghes.id, id), eq.

    • Generated

      Returns the result of findBySector.

      Parameters

      • sectorId: string

        The sectorId value.

      • tenantId: string

        The tenantId value.

      Returns Promise<Ghe[]>

      The function result.

      Objective: In module packages/db/src/repositories/ghe.repository.ts, retrieve data through findBySector.

      Behavior: Async; accepts sectorId and tenantId; returns a value; invokes this.db .select() .from(ghes) .where(and(eq(ghes.sectorId, s.

    • Generated

      Returns the result of findByTenant.

      Parameters

      • tenantId: string

        The tenantId value.

      Returns Promise<Ghe[]>

      The function result.

      Objective: In module packages/db/src/repositories/ghe.repository.ts, retrieve data through findByTenant.

      Behavior: Async; accepts tenantId; returns a value; invokes this.db .select() .from(ghes) .where(eq(ghes.tenantId, tenan.

    • Generated

      Returns the result of findByUnit.

      Parameters

      • unitId: string

        The unitId value.

      • tenantId: string

        The tenantId value.

      Returns Promise<Ghe[]>

      The function result.

      Objective: In module packages/db/src/repositories/ghe.repository.ts, retrieve data through findByUnit.

      Behavior: Async; accepts unitId and tenantId; returns a value; invokes this.db .select() .from(ghes) .where(and(eq(ghes.unitId, uni.

    • Generated

      Executes update.

      Parameters

      • id: string

        The id value.

      • tenantId: string

        The tenantId value.

      • data: UpdateGheData

        The data value.

      Returns Promise<Ghe | null>

      The function result.

      Objective: In module packages/db/src/repositories/ghe.repository.ts, run update.

      Behavior: Async; accepts id and tenantId and data; returns a value; invokes this.db .update(ghes) .set(patch) .where(and(eq(ghes.id, id).

    • Generated

      Updates data through updateStatus.

      Parameters

      • id: string

        The id value.

      • tenantId: string

        The tenantId value.

      • status: GheStatus

        The status value.

      • OptionalvalidatedBy: string

        The validatedBy value.

      • Optionaljustification: string

        The justification value.

      Returns Promise<Ghe | null>

      The function result.

      Objective: In module packages/db/src/repositories/ghe.repository.ts, change data through updateStatus.

      Behavior: Async; accepts id and tenantId and status and validatedBy and justification; returns a value; invokes this.db .update(ghes) .set(patch) .where(and(eq(ghes.id, id).