MCPcopy Index your code
hub / github.com/ByteStorage/FlyDB / exists

Method exists

structure/set.go:430–442  ·  view source on GitHub ↗
(key string, member ...string)

Source from the content-addressed store, hash-verified

428}
429
430func (s *SetStructure) exists(key string, member ...string) bool {
431 if err := checkKey(key); err != nil {
432 return false
433 }
434 keyBytes := stringToBytesWithKey(key)
435
436 zSet, _, err := s.getSetFromDB(keyBytes, false)
437
438 if err != nil {
439 return false
440 }
441 return zSet.exists(member...)
442}
443func (s *FSets) exists(member ...string) bool {
444 for _, s2 := range member {
445 if _, ok := (*s)[s2]; !ok {

Callers 1

KeysMethod · 0.95

Calls 4

getSetFromDBMethod · 0.95
checkKeyFunction · 0.85
stringToBytesWithKeyFunction · 0.85
existsMethod · 0.45

Tested by

no test coverage detected