MCPcopy
hub / github.com/go-gorm/gorm / Contains

Method Contains

internal/lru/lru.go:164–169  ·  view source on GitHub ↗

Contains checks if a key is in the cache, without updating the recent-ness or deleting it for being stale.

(key K)

Source from the content-addressed store, hash-verified

162// Contains checks if a key is in the cache, without updating the recent-ness
163// or deleting it for being stale.
164func (c *LRU[K, V]) Contains(key K) (ok bool) {
165 c.mu.RLock()
166 defer c.mu.RUnlock()
167 _, ok = c.items[key]
168 return ok
169}
170
171// Peek returns the key value (or undefined if not found) without updating
172// the "recently used"-ness of the key.

Callers 15

TableMethod · 0.80
RawMethod · 0.80
AddVarMethod · 0.80
BuildConditionMethod · 0.80
ExecMethod · 0.80
BuildMethod · 0.80
TestSlogLoggerFunction · 0.80
buildExprsFunction · 0.80
BuildMethod · 0.80
CreateTableMethod · 0.80
TestTiDBMigrateColumnsFunction · 0.80
TestMigrateColumnsFunction · 0.80

Calls

no outgoing calls

Tested by 8

TestSlogLoggerFunction · 0.64
TestTiDBMigrateColumnsFunction · 0.64
TestMigrateColumnsFunction · 0.64
TestLRUNoPurgeFunction · 0.64
TestFindFunction · 0.64
TestFromWithJoinsFunction · 0.64