elioria-sst-x
    Preparing search index...

    Class SupabaseInvestigationV2Repository

    Implements

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

    The db value.

    • Generated

      Executes applyLifecycle.

      Parameters

      Returns Promise<Investigation>

      The function result.

      Objective: In module packages/db/src/repositories/investigacao-v2.repository.ts, run applyLifecycle.

      Behavior: Async; accepts id and tenantId and data; returns a value; invokes this.db .update(investigations) .set(data as Record<string, ; may throw.

      When the function cannot complete normally.

    • Generated

      Returns the result of findActiveByIncidentId.

      Parameters

      • incidentId: string

        The incidentId value.

      • tenantId: string

        The tenantId value.

      Returns Promise<Investigation | null>

      The function result.

      Objective: In module packages/db/src/repositories/investigacao-v2.repository.ts, retrieve data through findActiveByIncidentId.

      Behavior: Async; accepts incidentId and tenantId; returns a value; invokes this.db .select() .from(investigations) .where( and( eq(inve.

    • Generated

      Returns the result of findById.

      Parameters

      • id: string

        The id value.

      • tenantId: string

        The tenantId value.

      Returns Promise<Investigation | null>

      The function result.

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

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

    • Generated

      Returns the result of findByIncidentId.

      Parameters

      • incidentId: string

        The incidentId value.

      • tenantId: string

        The tenantId value.

      Returns Promise<Investigation[]>

      The function result.

      Objective: In module packages/db/src/repositories/investigacao-v2.repository.ts, retrieve data through findByIncidentId.

      Behavior: Async; accepts incidentId and tenantId; returns a value; invokes this.db .select() .from(investigations) .where(and(eq(invest.

    • Generated

      Returns the result of findByTenant.

      Parameters

      • tenantId: string

        The tenantId value.

      • companyId: string

        The companyId value.

      • Optionalquery: ListInvestigationsQuery

        The query value.

      Returns Promise<PagedResult<Investigation>>

      The function result.

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

      Behavior: Async; accepts tenantId and companyId and query; returns a value; invokes eq.

    • Generated

      Executes update.

      Parameters

      Returns Promise<Investigation>

      The function result.

      Objective: In module packages/db/src/repositories/investigacao-v2.repository.ts, run update.

      Behavior: Async; accepts id and tenantId and data; returns a value; invokes this.db .update(investigations) .set(data as Record<string, ; may throw.

      When the function cannot complete normally.

    • Generated

      Updates data through updateStatus.

      Parameters

      • id: string

        The id value.

      • tenantId: string

        The tenantId value.

      • status: InvestigationStatusV2

        The status value.

      Returns Promise<void>

      The function result.

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

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