MCPcopy
hub / github.com/pocketbase/pocketbase / Has

Method Has

tools/store/store.go:82–89  ·  view source on GitHub ↗

Has checks if element with the specified key exist or not.

(key K)

Source from the content-addressed store, hash-verified

80
81// Has checks if element with the specified key exist or not.
82func (s *Store[K, T]) Has(key K) bool {
83 s.mu.RLock()
84 defer s.mu.RUnlock()
85
86 _, ok := s.data[key]
87
88 return ok
89}
90
91// Get returns a single element value from the store.
92//

Callers 15

TestFetchFunction · 0.45
TestNewFunction · 0.45
TestResetFunction · 0.45
TestRemoveAllFunction · 0.45
TestRemoveFunction · 0.45
TestHasFunction · 0.45
TestSetFunction · 0.45
TestSetIfLessThanLimitFunction · 0.45
createNotifyDirWatcherFunction · 0.45
CreateBackupMethod · 0.45
RestoreBackupMethod · 0.45
backupRestoreFunction · 0.45

Calls

no outgoing calls

Tested by 9

TestFetchFunction · 0.36
TestNewFunction · 0.36
TestResetFunction · 0.36
TestRemoveAllFunction · 0.36
TestRemoveFunction · 0.36
TestHasFunction · 0.36
TestSetFunction · 0.36
TestSetIfLessThanLimitFunction · 0.36
TestRecordAuthWithOAuth2Function · 0.36