MCPcopy
hub / github.com/pocketbase/pocketbase / Values

Method Values

tools/store/store.go:126–137  ·  view source on GitHub ↗

Values returns a slice with all of the current store values.

()

Source from the content-addressed store, hash-verified

124
125// Values returns a slice with all of the current store values.
126func (s *Store[K, T]) Values() []T {
127 s.mu.RLock()
128 defer s.mu.RUnlock()
129
130 var values = make([]T, 0, len(s.data))
131
132 for _, v := range s.data {
133 values = append(values, v)
134 }
135
136 return values
137}
138
139// Set sets (or overwrite if already exists) a new value for key.
140func (s *Store[K, T]) Set(key K, value T) {

Callers 3

TestValuesFunction · 0.45
ChunkedClientsMethod · 0.45
RealIPMethod · 0.45

Calls

no outgoing calls

Tested by 1

TestValuesFunction · 0.36