sortQueryRows function

void sortQueryRows(
  1. List<(String, Map<String, Object?>)> rows,
  2. Iterable<QueryOrder> order
)

Sorts (id, doc) rows in place by order with the id tiebreak.

Implementation

void sortQueryRows(
  List<(String, Map<String, Object?>)> rows,
  Iterable<QueryOrder> order,
) {
  final keys = order.toList();
  rows.sort((a, b) => compareQueryRows(a, b, keys));
}