code: protected Stream<DTO> streamQueryWithSort(DBQuery.Query query, DBSort.SortBuilder sort) {
          final DBCursor<DTO> cursor = db.find(query).sort(sort);
          return Streams.stream((Iterable<DTO>) cursor).onClose(cursor::close);
      }
docs: Returns a stream of database entries for the given {@link DBQuery.Query} sorted by the give {@link DBSort.SortBuilder}.
  <p>
  The returned stream needs to be closed to free the underlying database resources.
  
  @param query the query to execute
  @param sort the sort order for the query
  @return stream of database entries that match the query