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