elioria-sst-x
    Preparing search index...

    Class SupabaseSafetyAlertRepository

    Implements

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

    The db value.

    • Generated

      Returns the result of findById.

      Parameters

      • id: string

        The id value.

      • tenantId: string

        The tenantId value.

      Returns Promise<SafetyAlert | 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(safetyAlerts) .where.

    • Generated

      Returns the result of findByInvestigation.

      Parameters

      • investigationId: string

        The investigationId value.

      • tenantId: string

        The tenantId value.

      Returns Promise<SafetyAlert[]>

      The function result.

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

      Behavior: Async; accepts investigationId and tenantId; returns a value; invokes this.db .select() .from(safetyAlerts) .where(and(eq(safetyAl.

    • Generated

      Executes update.

      Parameters

      • id: string

        The id value.

      • tenantId: string

        The tenantId value.

      • data: UpdateSafetyAlertData

        The data value.

      Returns Promise<SafetyAlert>

      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(safetyAlerts) .set(data as Record<string, unk; may throw.

      When the function cannot complete normally.