// ReadAll reads all points from all iterators. func (itrs Iterators) ReadAll() [][]influxql.Point { var a [][]influxql.Point // Read from every iterator until a nil is encountered. for { points := itrs.Next() if points == nil { break } a = append(a, influxql.Points(points).Clone()) } // Close all iterators. influxql.Iterators(itrs).Close() return a }
// ReadAll reads all points from all iterators. func (itrs Iterators) ReadAll() ([][]influxql.Point, error) { var a [][]influxql.Point // Read from every iterator until a nil is encountered. for { points, err := itrs.Next() if err != nil { return nil, err } else if points == nil { break } a = append(a, influxql.Points(points).Clone()) } // Close all iterators. influxql.Iterators(itrs).Close() return a, nil }