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