SelectSet - select all sets from DB
(path string)
| 46 | |
| 47 | // SelectSet - select all sets from DB |
| 48 | func SelectSet(path string) (sets []models.Set) { |
| 49 | |
| 50 | mu.Lock() |
| 51 | dbx := connect(path) |
| 52 | err := dbx.Select(&sets, "SELECT * FROM sets ORDER BY ID ASC") |
| 53 | mu.Unlock() |
| 54 | |
| 55 | check.IfError(err) |
| 56 | |
| 57 | return sets |
| 58 | } |
| 59 | |
| 60 | // SelectW - select all weight from DB |
| 61 | func SelectW(path string) (w []models.BodyWeight) { |
no test coverage detected