MCPcopy Create free account
hub / github.com/ByteStorage/FlyDB / LLen

Method LLen

structure/list.go:267–275  ·  view source on GitHub ↗

LLen returns the size of a list associated with a key. If the key does not exist, an error is returned.

(key string)

Source from the content-addressed store, hash-verified

265// LLen returns the size of a list associated with a key.
266// If the key does not exist, an error is returned.
267func (l *ListStructure) LLen(key string) (int, error) {
268 // Get the list
269 lst, _, err := l.getListFromDB(key, false)
270 if err != nil {
271 return 0, err
272 }
273
274 return lst.Length, nil
275}
276
277// LRem removes elements from a list associated with a key based on the count and value parameters.
278// The count can have the following values:

Callers 1

SizeMethod · 0.95

Calls 1

getListFromDBMethod · 0.95

Tested by

no test coverage detected