Line data Source code
1 4 : (ns matchscore.domain.series.query
2 : (:require
3 : [matchscore.domain.series.repository.postgres :as postgres-repo]))
4 :
5 :
6 4 : (defn get-series
7 : "Retrieves a series by ID. Returns Series map or nil."
8 : [repo id]
9 4 : (postgres-repo/find-by-id repo id))
10 :
11 :
12 4 : (defn get-series-by-group
13 : "Retrieves all series for a group. Returns seq."
14 : [repo group-id]
15 4 : (postgres-repo/find-by-group-id repo group-id))
16 :
17 :
18 4 : (defn get-series-by-group-ids
19 : "Retrieves all series for multiple groups in one batch. Returns seq."
20 : [repo group-ids]
21 8 : (postgres-repo/find-by-group-ids repo group-ids))
22 :
23 :
24 4 : (defn get-series-by-bracket-match
25 : "Retrieves all series for a bracket match. Returns seq."
26 : [repo bracket-match-id]
27 0 : (postgres-repo/find-by-bracket-match-id repo bracket-match-id))
28 :
29 :
30 4 : (defn get-series-by-bracket-match-ids
31 : "Retrieves all series for multiple bracket matches in one batch. Returns seq."
32 : [repo bracket-match-ids]
33 4 : (postgres-repo/find-by-bracket-match-ids repo bracket-match-ids))
34 :
35 :
36 4 : (defn search-series
37 : "Search series by filters and pagination. Returns paginated result."
38 : [repo filters pagination]
39 5 : (postgres-repo/search repo filters pagination))
|