elioria-sst-x
    Preparing search index...

    Class SupabaseGheFunctionRepository

    Implements

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

    The db value.

    • Generated

      Executes assign.

      Parameters

      • data: { gheId: string; sectorFunctionId: string; tenantId: string }

        The data value.

      Returns Promise<GheFunction>

      The function result.

      Objective: In module packages/db/src/repositories/ghe-function.repository.ts, run assign.

      Behavior: Async; accepts data; returns a value; invokes this.db .insert(gheFunctions) .values({ tenantId: data.tenan.

    • Generated

      Executes bulkAssign.

      Parameters

      • data: { gheId: string; sectorFunctionIds: string[]; tenantId: string }

        The data value.

      Returns Promise<GheFunction[]>

      The function result.

      Objective: In module packages/db/src/repositories/ghe-function.repository.ts, run bulkAssign.

      Behavior: Async; accepts data; returns a value; invokes data.sectorFunctionIds.map.

    • Generated

      Returns the result of findByGhe.

      Parameters

      • gheId: string

        The gheId value.

      • tenantId: string

        The tenantId value.

      Returns Promise<GheFunction[]>

      The function result.

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

      Behavior: Async; accepts gheId and tenantId; returns a value; invokes this.db .select({ id: gheFunctions.id, tenantId: gheFunction.

    • Generated

      Returns the result of findByGheIds.

      Parameters

      • gheIds: string[]

        The gheIds value.

      • tenantId: string

        The tenantId value.

      Returns Promise<GheFunction[]>

      The function result.

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

      Behavior: Async; accepts gheIds and tenantId; returns a value; invokes this.db .select({ id: gheFunctions.id, tenantId: gheFunction.

    • Generated

      Returns the result of findBySectorFunction.

      Parameters

      • sectorFunctionId: string

        The sectorFunctionId value.

      • tenantId: string

        The tenantId value.

      Returns Promise<{ gheCode: string | null; gheId: string; gheName: string }[]>

      The function result.

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

      Behavior: Async; accepts sectorFunctionId and tenantId; returns a value; invokes this.db .select({ gheId: gheFunctions.gheId, gheName: ghes.n.

    • Generated

      Executes remove.

      Parameters

      • gheId: string

        The gheId value.

      • sectorFunctionId: string

        The sectorFunctionId value.

      • tenantId: string

        The tenantId value.

      Returns Promise<boolean>

      The function result.

      Objective: In module packages/db/src/repositories/ghe-function.repository.ts, run remove.

      Behavior: Async; accepts gheId and sectorFunctionId and tenantId; returns a value; invokes this.db .delete(gheFunctions) .where( and( eq(gheFunctions.g.

    • Generated

      Updates data through updatePlannedCount.

      Parameters

      • id: string

        The id value.

      • tenantId: string

        The tenantId value.

      • plannedCount: number | null

        The plannedCount value.

      Returns Promise<GheFunction | null>

      The function result.

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

      Behavior: Async; accepts id and tenantId and plannedCount; returns a value; invokes this.db .update(gheFunctions) .set({ plannedCount }) .where(.