elioria-sst-x
    Preparing search index...

    Implements

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

    The db value.

    • Generated

      Executes countUnread.

      Parameters

      • tenantId: string

        The tenantId value.

      Returns Promise<number>

      The function result.

      Objective: In module packages/db/src/repositories/epi-alert.repository.ts, run countUnread.

      Behavior: Async; accepts tenantId; returns a value; invokes this.db .select({ count: sql<number>count(*) }) .from(epiA.

    • Generated

      Executes countUnreadByCompanyUnits.

      Parameters

      • tenantId: string

        The tenantId value.

      • unitIds: string[]

        The unitIds value.

      Returns Promise<number>

      The function result.

      Objective: In module packages/db/src/repositories/epi-alert.repository.ts, run countUnreadByCompanyUnits.

      Behavior: Async; accepts tenantId and unitIds; returns a value; invokes this.db .select({ count: sql<number>count(*) }) .from(epiA.

    • Generated

      Executes countUnreadByUnit.

      Parameters

      • unitId: string

        The unitId value.

      • tenantId: string

        The tenantId value.

      Returns Promise<number>

      The function result.

      Objective: In module packages/db/src/repositories/epi-alert.repository.ts, run countUnreadByUnit.

      Behavior: Async; accepts unitId and tenantId; returns a value; invokes this.db .select({ count: sql<number>count(*) }) .from(epiA.

    • Generated

      Executes create.

      Parameters

      • data: CreateEpiAlertData

        The data value.

      Returns Promise<EpiAlert>

      The function result.

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

      Behavior: Async; accepts data; returns a value; invokes this.db .insert(epiAlerts) .values(toValues(data)) .returnin.

    • Generated

      Updates data through createBatch.

      Parameters

      • dataArr: CreateEpiAlertData[]

        The dataArr value.

      Returns Promise<EpiAlert[]>

      The function result.

      Objective: In module packages/db/src/repositories/epi-alert.repository.ts, change data through createBatch.

      Behavior: Async; accepts dataArr; returns a value; invokes this.db .insert(epiAlerts) .values(dataArr.map(toValues)) .r.

    • Generated

      Updates data through createWithDedupe.

      Parameters

      • data: CreateEpiAlertData

        The data value.

      Returns Promise<EpiAlert | null>

      The function result.

      Objective: In module packages/db/src/repositories/epi-alert.repository.ts, change data through createWithDedupe.

      Behavior: Async; accepts data; returns a value; invokes this.create.

    • Generated

      Returns the result of findUnreadByCompanyUnits.

      Parameters

      • tenantId: string

        The tenantId value.

      • unitIds: string[]

        The unitIds value.

      Returns Promise<EpiAlert[]>

      The function result.

      Objective: In module packages/db/src/repositories/epi-alert.repository.ts, retrieve data through findUnreadByCompanyUnits.

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

    • Generated

      Returns the result of findUnreadByTenant.

      Parameters

      • tenantId: string

        The tenantId value.

      Returns Promise<EpiAlert[]>

      The function result.

      Objective: In module packages/db/src/repositories/epi-alert.repository.ts, retrieve data through findUnreadByTenant.

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

    • Generated

      Returns the result of findUnreadByUnit.

      Parameters

      • unitId: string

        The unitId value.

      • tenantId: string

        The tenantId value.

      Returns Promise<EpiAlert[]>

      The function result.

      Objective: In module packages/db/src/repositories/epi-alert.repository.ts, retrieve data through findUnreadByUnit.

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

    • Generated

      Executes markAsRead.

      Parameters

      • id: string

        The id value.

      • tenantId: string

        The tenantId value.

      Returns Promise<void>

      The function result.

      Objective: In module packages/db/src/repositories/epi-alert.repository.ts, run markAsRead.

      Behavior: Async; accepts id and tenantId; returns a value; invokes this.db .update(epiAlerts) .set({ isRead: true, readAt: new .