Skip to content
This repository has been archived by the owner on Mar 18, 2024. It is now read-only.

Commit

Permalink
Improve exercises screen
Browse files Browse the repository at this point in the history
  • Loading branch information
AnkitSuda committed Nov 22, 2022
1 parent f6fe396 commit 6327048
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ interface ExercisesDao {

@Query(
"""
SELECT
e.*,
(SELECT
COUNT(ewj.id)
FROM exercise_workout_junctions ewj
JOIN workouts w ON ewj.workout_id = w.id AND e.exercise_id = ewj.exercise_id
WHERE w.id = ewj.workout_id AND w.is_hidden = 0 AND w.in_progress = 0) as logs_count
FROM exercises e ORDER BY name COLLATE NOCASE ASC
"""
)
fun getAllExercisesWithExtraInfoPaged(searchQuery: String?): PagingSource<Int, ExerciseWithExtraInfo>
Expand Down

0 comments on commit 6327048

Please sign in to comment.