• LSize
    LSize

    返回指定bucket下指定key列表的size大小

    1. if err := db.Update(
    2. func(tx *nutsdb.Tx) error {
    3. bucket := "bucketForList"
    4. key := []byte("myList")
    5. if size,err := tx.LSize(bucket, key); err != nil {
    6. return err
    7. } else {
    8. fmt.Println("myList size is ",size)
    9. }
    10. return nil
    11. }); err != nil {
    12. log.Fatal(err)
    13. }