elioria-sst-x
    Preparing search index...

    Class SupabaseCipaPeElectionDocumentRepository

    Implements

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

    The db value.

    • Generated

      Executes countByCodePrefix.

      Parameters

      • codePrefix: string

        The codePrefix value.

      • tenantId: string

        The tenantId value.

      Returns Promise<number>

      The function result.

      Objective: In module packages/db/src/repositories/cipa.repository.ts, run countByCodePrefix.

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

    • Generated

      Returns the result of findByCode.

      Parameters

      • code: string

        The code value.

      • tenantId: string

        The tenantId value.

      Returns Promise<CipaPeElectionDocument | null>

      The function result.

      Objective: In module packages/db/src/repositories/cipa.repository.ts, retrieve data through findByCode.

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

    • Generated

      Returns the result of findByElection.

      Parameters

      • electionId: string

        The electionId value.

      • tenantId: string

        The tenantId value.

      Returns Promise<CipaPeElectionDocument[]>

      The function result.

      Objective: In module packages/db/src/repositories/cipa.repository.ts, retrieve data through findByElection.

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

    • Generated

      Returns the result of findById.

      Parameters

      • id: string

        The id value.

      • tenantId: string

        The tenantId value.

      Returns Promise<CipaPeElectionDocument | null>

      The function result.

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

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

    • Generated

      Returns the result of findByType.

      Parameters

      • electionId: string

        The electionId value.

      • peType: string

        The peType value.

      • tenantId: string

        The tenantId value.

      Returns Promise<CipaPeElectionDocument[]>

      The function result.

      Objective: In module packages/db/src/repositories/cipa.repository.ts, retrieve data through findByType.

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

    • Generated

      Updates data through updateStatus.

      Parameters

      Returns Promise<CipaPeElectionDocument | null>

      The function result.

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

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