func (rs *ResultSet) Len() int {
	return len(rs.items)
}
Len returns the number of items in the result set.
package redis
import (
	"fmt"
	"strings"
	"github.com/tideland/golib/errors"
)
type ResultSet struct {
	parent *ResultSet
	items  []interface{}
	length int
}
func newResultSet() *ResultSet {
	return &ResultSet{nil, []interface{}{}, 1}
}
func (rs *ResultSet) append(item interface{}) {
	switch i := item.(type) {
	case Value, *ResultSet:
		rs.items = append(rs.items, i)
	case []byte:
		rs.items = append(rs.items, Value(i))
	case ResultSet:
		rs.items = append(rs.items, &i)
	default:
		panic("illegal result set item type")
	}
}
func (rs *ResultSet) allReceived() bool {
	return len(rs.items) >= rs.length
}
func (rs *ResultSet) nextResultSet() *ResultSet {
	if !rs.allReceived() {
		return rs
	}
	if rs.parent == nil {
		return nil
	}
	return rs.parent.nextResultSet()
}