elioria-sst-x
    Preparing search index...

    Class SupabaseCipaCandidateRepository

    Implements

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

    The db value.

    • Generated

      Returns the result of findByElection.

      Parameters

      • electionId: string

        The electionId value.

      • tenantId: string

        The tenantId value.

      Returns Promise<CipaCandidate[]>

      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(cipaCandidates).where(and(eq(cipaCandi.

    • Generated

      Returns the result of findById.

      Parameters

      • id: string

        The id value.

      • tenantId: string

        The tenantId value.

      Returns Promise<CipaCandidate | 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(cipaCandidates).where(and(eq(cipaCandi.

    • Generated

      Updates data through updateCandidatoStatus.

      Parameters

      • id: string

        The id value.

      • tenantId: string

        The tenantId value.

      • status: CipaCandidatoStatus

        The status value.

      Returns Promise<void>

      The function result.

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

      Behavior: Async; accepts id and tenantId and status; returns a value; invokes this.db.update(cipaCandidates).set({ candidatoStatus: status.

    • Generated

      Updates data through updateVotes.

      Parameters

      • id: string

        The id value.

      • tenantId: string

        The tenantId value.

      • votes: number

        The votes value.

      • isElected: boolean

        The isElected value.

      Returns Promise<void>

      The function result.

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

      Behavior: Async; accepts id and tenantId and votes and isElected; returns a value; invokes this.db.update(cipaCandidates).set({ votesReceived: votes, i.