MCPcopy Create free account
hub / github.com/nutsdb/nutsdb / GetListTTL

Method GetListTTL

tx_list.go:514–532  ·  view source on GitHub ↗
(bucket string, key []byte)

Source from the content-addressed store, hash-verified

512}
513
514func (tx *Tx) GetListTTL(bucket string, key []byte) (uint32, error) {
515 if err := tx.checkTxIsClosed(); err != nil {
516 return 0, err
517 }
518 b, err := tx.db.bucketMgr.GetBucket(DataStructureList, bucket)
519 if err != nil {
520 return 0, err
521 }
522
523 var (
524 bucketId = b.Id
525 l *data.List
526 exist bool
527 )
528 if l, exist = tx.db.Index.List.exist(bucketId); !exist {
529 return 0, ErrBucket
530 }
531 return l.GetListTTL(string(key))
532}

Callers 1

txGetListTTLFunction · 0.45

Calls 3

checkTxIsClosedMethod · 0.95
GetBucketMethod · 0.80
existMethod · 0.80

Tested by 1

txGetListTTLFunction · 0.36