code: func (db *DB) SetNX(key []byte, value []byte) (int64, error) {
  	if err := checkKeySize(key); err != nil {
  		return 0, err
  	} else if err := checkValueSize(value); err != nil {
  		return 0, err
  	}
  
  	var err error
  	key = db.encodeKVKey(key)
  
  	var n int64 = 1
  
  	t := db.kvBatch
  
  	t.Lock()
  	defer t.Unlock()
  
  	if v, err := db.bucket.Get(key); err != nil {
  		return 0, err
  	} else if v != nil {
  		n = 0
  	} else {
  		t.Put(key, value)
  
  		err = t.Commit()
  	}
  
  	return n, err
  }
docs: // SetNX sets the data if not existed.