elioria-sst-x
    Preparing search index...

    Class SupabaseRiskEpiRuleRepository

    Implements

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

    The db value.

    • Generated

      Executes create.

      Parameters

      • data: Omit<RiskEpiRule, "id" | "createdAt" | "updatedAt">

        The data value.

      Returns Promise<RiskEpiRule>

      The function result.

      Objective: In module packages/db/src/repositories/risk-epi-rule.repository.ts, run create.

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

    • Generated

      Returns the result of findApprovedByKeyword.

      Parameters

      • keyword: string

        The keyword value.

      Returns Promise<RiskEpiRule[]>

      The function result.

      Objective: In module packages/db/src/repositories/risk-epi-rule.repository.ts, retrieve data through findApprovedByKeyword.

      Behavior: Async; accepts keyword; returns a value; invokes this.db .select() .from(riskEpiRules) .where( and( ilike(ris.

    • Generated

      Returns the result of findApprovedByRiskClass.

      Parameters

      • riskClass: HazardType

        The riskClass value.

      Returns Promise<RiskEpiRule[]>

      The function result.

      Objective: In module packages/db/src/repositories/risk-epi-rule.repository.ts, retrieve data through findApprovedByRiskClass.

      Behavior: Async; accepts riskClass; returns a value; invokes this.db .select() .from(riskEpiRules) .where( and( eq(riskEp.

    • Generated

      Returns the result of findById.

      Parameters

      • id: string

        The id value.

      Returns Promise<RiskEpiRule | null>

      The function result.

      Objective: In module packages/db/src/repositories/risk-epi-rule.repository.ts, retrieve data through findById.

      Behavior: Async; accepts id; returns a value; invokes this.db .select() .from(riskEpiRules) .where(eq(riskEpiRules.

    • Generated

      Returns the result of listApproved.

      Returns Promise<RiskEpiRule[]>

      The function result.

      Objective: In module packages/db/src/repositories/risk-epi-rule.repository.ts, retrieve data through listApproved.

      Behavior: Async; returns a value; invokes this.db .select() .from(riskEpiRules) .where(and(eq(riskEpiR.

    • Generated

      Returns the result of listByStatus.

      Parameters

      • status: RiskEpiRuleStatus

        The status value.

      Returns Promise<RiskEpiRule[]>

      The function result.

      Objective: In module packages/db/src/repositories/risk-epi-rule.repository.ts, retrieve data through listByStatus.

      Behavior: Async; accepts status; returns a value; invokes this.db .select() .from(riskEpiRules) .where(and(eq(riskEpiR.