func (r *Reader) Read(p []byte) (n int, err error) {
	if len(p) == 0 {
		return 0, nil
	}

	ok := r.rows.Next()
	if !ok {
		if r.rows.Err() == nil {
			return 0, io.EOF
		}
		return 0, r.rows.Err()
	}
	err = r.rows.StructScan(r.dest)
	if err != nil {
		return 0, err
	}
	s := r.dest.Qname + "\t" +
		strconv.Itoa(r.dest.Flag) + "\t" +
		r.dest.Rname + "\t" +
		strconv.Itoa(r.dest.Pos) + "\t" +
		strconv.Itoa(r.dest.Mapq) + "\t" +
		r.dest.Cigar + "\t" +
		r.dest.Rnext + "\t" +
		strconv.Itoa(r.dest.Pnext) + "\t" +
		strconv.Itoa(r.dest.Tlen) + "\t" +
		r.dest.Seq + "\t" +
		r.dest.Qual + "\t" +
		r.dest.Tags + "\n"

	n = copy(p, s[0:])

	return
}
// Read reads the next record from r into p. It returns the number of bytes
// read (0 <= n <= len(p)) and any error encountered. Even if Read returns n <
// len(p), it may use all of p as scratch space during the call. If some data
// is available but not len(p) bytes, Read conventionally returns what is
// available instead of waiting for more. It will return n = 0 and io.EOF when
// r is exhausted. It will return n = 0 and an error if it encounters one.
Read reads the next record from r into p. It returns the number of bytes
read (0 <= n <= len(p)) and any error encountered. Even if Read returns n <
len(p), it may use all of p as scratch space during the call. If some data
is available but not len(p) bytes, Read conventionally returns what is
available instead of waiting for more. It will return n = 0 and io.EOF when
r is exhausted. It will return n = 0 and an error if it encounters one.
// Read reads the next record from r into p . It returns the number of bytes // read ( 0 < = n < = len ( p )) and any error encountered . Even if Read returns n < // len ( p ) it may use all of p as scratch space during the call . If some data // is available but not len ( p ) bytes Read conventionally returns what is // available instead of waiting for more . It will return n = 0 and io . EOF when // r is exhausted . It will return n = 0 and an error if it encounters one .
func (r *Reader) Read(p []byte) (n int, err error) {
	if len(p) == 0 {
		return 0, nil
	}
	ok := r.rows.Next()
	if !ok {
		if r.rows.Err() == nil {
			return 0, io.EOF
		}
		return 0, r.rows.Err()
	}
	err = r.rows.StructScan(r.dest)
	if err != nil {
		return 0, err
	}
	s := r.dest.Qname + "\t" +
		strconv.Itoa(r.dest.Flag) + "\t" +
		r.dest.Rname + "\t" +
		strconv.Itoa(r.dest.Pos) + "\t" +
		strconv.Itoa(r.dest.Mapq) + "\t" +
		r.dest.Cigar + "\t" +
		r.dest.Rnext + "\t" +
		strconv.Itoa(r.dest.Pnext) + "\t" +
		strconv.Itoa(r.dest.Tlen) + "\t" +
		r.dest.Seq + "\t" +
		r.dest.Qual + "\t" +
		r.dest.Tags + "\n"
	n = copy(p, s[0:])
	return
}
func ( r * Reader ) Read ( p [ ] byte ) ( n int , err error ) { if len ( p ) == 0 { return 0 , nil } ok := r . rows . Next ( ) if ! ok { if r . rows . Err ( ) == nil { return 0 , io . EOF } return 0 , r . rows . Err ( ) } err = r . rows . StructScan ( r . dest ) if err != nil { return 0 , err } s := r . dest . Qname + " \t " + strconv . Itoa ( r . dest . Flag ) + " \t " + r . dest . Rname + " \t " + strconv . Itoa ( r . dest . Pos ) + " \t " + strconv . Itoa ( r . dest . Mapq ) + " \t " + r . dest . Cigar + " \t " + r . dest . Rnext + " \t " + strconv . Itoa ( r . dest . Pnext ) + " \t " + strconv . Itoa ( r . dest . Tlen ) + " \t " + r . dest . Seq + " \t " + r . dest . Qual + " \t " + r . dest . Tags + " \n " n = copy ( p , s [ 0 : ] ) return }
Read reads the next record from r into p. It returns the number of bytes
read (0 <= n <= len(p)) and any error encountered.
Read reads the next record from r into p . It returns the number of bytes read ( 0 < = n < = len ( p )) and any error encountered .