orderByKey method

Query orderByKey()

Orders by child key: keys that parse as 32-bit integers (leading zeros allowed) come first, by value, ties going to the shorter string; then all other keys by UTF-16 code units.

Implementation

Query orderByKey() {
  _validateNoPreviousOrderByCall('orderByKey');
  final QueryParams params = spec.params.orderBy(keyIndex);
  _validateQueryEndpoints(params);
  return _with(params, ordered: true);
}