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