MCPcopy Create free account
hub / github.com/aceberg/ExerciseDiary / SelectSet

Function SelectSet

internal/db/sqlite.go:48–58  ·  view source on GitHub ↗

SelectSet - select all sets from DB

(path string)

Source from the content-addressed store, hash-verified

46
47// SelectSet - select all sets from DB
48func 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
61func SelectW(path string) (w []models.BodyWeight) {

Callers 4

indexHandlerFunction · 0.92
setHandlerFunction · 0.92
statsHandlerFunction · 0.92
BulkDeleteSetsByDateFunction · 0.85

Calls 2

IfErrorFunction · 0.92
connectFunction · 0.85

Tested by

no test coverage detected