MCPcopy Create free account
hub / github.com/euanwm/OpenWeightlifting / QueryStatus

Method QueryStatus

backend/dbtools/cache_handler.go:38–50  ·  view source on GitHub ↗
(query structs.LeaderboardPayload)

Source from the content-addressed store, hash-verified

36}
37
38func (q *QueryCache) QueryStatus(query structs.LeaderboardPayload) QueryState {
39 query.Start, query.Stop = 0, 0
40 queryStuff, ok := q.HashStore.Load(query)
41 if !ok {
42 return None
43 } else {
44 query, ok := queryStuff.(Query)
45 if !ok {
46 panic("how the fuck did you fuck this up?")
47 }
48 return query.Status
49 }
50}
51
52// CheckQuery - Checks if the query has been run before, if so, return the query state and data positions if they exist
53func (q *QueryCache) CheckQuery(query structs.LeaderboardPayload) (state QueryState, positions []int) {

Callers 3

FilterLiftsFunction · 0.80
PreCacheFilterFunction · 0.80
LeaderboardPositionFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected