Line data Source code
1 4 : (ns matchscore.domain.class-template-participant.query
2 : (:require
3 : [matchscore.domain.class-template-participant.repository.postgres
4 : :as
5 : class-template-participant-postgres-repo]))
6 :
7 :
8 4 : (defn get-participant
9 : "Retrieves a class template participant by composite key (class-template-id, participant-id).
10 : Returns ClassTemplateParticipant map or nil."
11 : [repo class-template-id participant-id]
12 10 : (class-template-participant-postgres-repo/find-by-id repo class-template-id participant-id))
13 :
14 :
15 4 : (defn get-participants-by-class-template-id
16 : "Retrieves all participants for a given class template, ordered by registered_at asc.
17 : Returns a vector of ClassTemplateParticipant maps."
18 : [repo class-template-id]
19 8 : (class-template-participant-postgres-repo/find-by-class-template-id repo class-template-id))
20 :
21 :
22 4 : (defn get-participants-by-class-template-ids
23 : "Retrieves all participants for multiple class templates in one batch query.
24 : Returns a vector of ClassTemplateParticipant maps."
25 : [repo class-template-ids]
26 8 : (class-template-participant-postgres-repo/find-by-class-template-ids repo class-template-ids))
|