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