Line data Source code
1 4 : (ns matchscore.domain.class-participant.query
2 : (:require
3 : [matchscore.domain.class-participant.repository.postgres :as postgres-repo]))
4 :
5 :
6 4 : (defn get-class-participant
7 : "Retrieves a class participant by composite PK. Returns ClassParticipant map or nil."
8 : [repo class-id participant-id]
9 15 : (postgres-repo/find-by-class-and-participant repo class-id participant-id))
10 :
11 :
12 4 : (defn get-class-participants-by-class
13 : "Retrieves all participants for a class. Returns seq."
14 : [repo class-id]
15 4 : (postgres-repo/find-by-class-id repo class-id))
16 :
17 :
18 4 : (defn get-class-participants-by-class-ids
19 : "Retrieves all participants for class ids. Returns seq."
20 : [repo class-ids]
21 4 : (postgres-repo/find-by-class-ids repo class-ids))
22 :
23 :
24 4 : (defn get-class-participants-by-participant
25 : "Retrieves all class entries for a participant. Returns seq."
26 : [repo participant-id]
27 4 : (postgres-repo/find-by-participant-id repo participant-id))
28 :
29 :
30 4 : (defn search-class-participants
31 : "Search class participants by filters and pagination. Returns paginated result."
32 : [repo filters pagination]
33 5 : (postgres-repo/search repo filters pagination))
|