func (db *DB) RGet(partition uint32, Id int) (r Record, ok bool, err error) {
	var key [4]byte
	r.Id = Id
	p := 0
	put4(key[:], &p, Id)
	var value []byte
	db.rwm.RLock()         // R+
	defer db.rwm.RUnlock() // R-
	if value, ok, err = db.Get(partition, key[:]); err != nil || !ok {
		return
	}

	p = 0
	n := get2(value, &p)
	r.Query = append([]byte{}, value[p:p+n]...)
	p += n
	r.Reply = append([]byte{}, value[p:p+get2(value, &p)]...)
	return
}
// RGet reads the Record associated with partition and Id. It returns the
// data, key exists in ok and an error, if any. Get may return a non nil err
// iff !ok.
RGet reads the Record associated with partition and Id. It returns the
data, key exists in ok and an error, if any. Get may return a non nil err
iff !ok.
// RGet reads the Record associated with partition and Id . It returns the // data key exists in ok and an error if any . Get may return a non nil err // iff !ok .
func (db *DB) RGet(partition uint32, Id int) (r Record, ok bool, err error) {
	var key [4]byte
	r.Id = Id
	p := 0
	put4(key[:], &p, Id)
	var value []byte
	db.rwm.RLock()         
	defer db.rwm.RUnlock() 
	if value, ok, err = db.Get(partition, key[:]); err != nil || !ok {
		return
	}
	p = 0
	n := get2(value, &p)
	r.Query = append([]byte{}, value[p:p+n]...)
	p += n
	r.Reply = append([]byte{}, value[p:p+get2(value, &p)]...)
	return
}
func ( db * DB ) RGet ( partition uint32 , Id int ) ( r Record , ok bool , err error ) { var key [ 4 ] byte r . Id = Id p := 0 put4 ( key [ : ] , & p , Id ) var value [ ] byte db . rwm . RLock ( ) defer db . rwm . RUnlock ( ) if value , ok , err = db . Get ( partition , key [ : ] ) ; err != nil || ! ok { return } p = 0 n := get2 ( value , & p ) r . Query = append ( [ ] byte { } , value [ p : p + n ] ... ) p += n r . Reply = append ( [ ] byte { } , value [ p : p + get2 ( value , & p ) ] ... ) return }
RGet reads the Record associated with partition and Id.
RGet reads the Record associated with partition and Id .
// R+ // R-