elioria-sst-x
    Preparing search index...

    Class SupabaseEpiProtectionNeedRepository

    Implements

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

    The db value.

    • Generated

      Executes create.

      Parameters

      • data: CreateEpiProtectionNeedData

        The data value.

      Returns Promise<EpiProtectionNeed>

      The function result.

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

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

    • Generated

      Executes deactivate.

      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-protection-need.repository.ts, run deactivate.

      Behavior: Async; accepts id and tenantId; returns a value; invokes this.db .update(epiProtectionNeeds) .set({ active: false }) .

    • Generated

      Returns the result of findActiveByNameAndCategory.

      Parameters

      • tenantId: string

        The tenantId value.

      • name: string

        The name value.

      • category: string

        The category value.

      Returns Promise<EpiProtectionNeed | null>

      The function result.

      Objective: In module packages/db/src/repositories/epi-protection-need.repository.ts, retrieve data through findActiveByNameAndCategory.

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

    • Generated

      Returns the result of findById.

      Parameters

      • id: string

        The id value.

      • tenantId: string

        The tenantId value.

      Returns Promise<EpiProtectionNeed | null>

      The function result.

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

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

    • Generated

      Returns the result of findManyByIds.

      Parameters

      • ids: string[]

        The ids value.

      • tenantId: string

        The tenantId value.

      Returns Promise<EpiProtectionNeed[]>

      The function result.

      Objective: In module packages/db/src/repositories/epi-protection-need.repository.ts, retrieve data through findManyByIds.

      Behavior: Async; accepts ids and tenantId; returns a value; invokes this.db .select() .from(epiProtectionNeeds) .where( and( inA.

    • Generated

      Executes list.

      Parameters

      • tenantId: string

        The tenantId value.

      • activeOnly: boolean = true

        The activeOnly value.

      • OptionalcompanyId: string

        The companyId value.

      Returns Promise<EpiProtectionNeed[]>

      The function result.

      Objective: In module packages/db/src/repositories/epi-protection-need.repository.ts, run list.

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

    • Generated

      Executes update.

      Parameters

      • id: string

        The id value.

      • tenantId: string

        The tenantId value.

      • data: UpdateEpiProtectionNeedData

        The data value.

      Returns Promise<EpiProtectionNeed>

      The function result.

      Objective: In module packages/db/src/repositories/epi-protection-need.repository.ts, run update.

      Behavior: Async; accepts id and tenantId and data; returns a value; invokes this.db .update(epiProtectionNeeds) .set(payload) .where(and.