destream static method
Takes a _ResultsImpl and destreams it. That is, it listens to the stream, collecting all the rows into a list until the stream has finished. It then returns a new _ResultsImpl which wraps that list of rows.
Implementation
static Future<ResultsStream> destream(ResultsStream results) async {
var rows = await results.toList();
var newStream = Stream<ResultRow>.fromIterable(rows);
return ResultsStream._fromStream(
results.insertId, results.affectedRows, results.fields, newStream);
}