Skip to content

Commit

Permalink
Fixed so that blocking and reactive EventStoreQueries really uses `So…
Browse files Browse the repository at this point in the history
…rtBy.unsorted()` by default as was intended in the previous release.
  • Loading branch information
johanhaleby committed Sep 27, 2024
1 parent 16e6436 commit 4a4a561
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### 0.19.5 (2024-09-27)
* Fixed so that blocking and reactive EventStoreQueries really uses `SortBy.unsorted()` by default as was intended in the previous release.

### 0.19.4 (2024-09-27)
* Added better debug logging
* Improved queryOne performance in DomainEventQueries
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import java.util.stream.Stream;

import static java.util.Objects.requireNonNull;
import static org.occurrent.eventstore.api.SortBy.SortDirection.ASCENDING;

/**
* Additional querying capabilities that may be supported by an {@link EventStore} implementation that is not typically part of a
Expand Down Expand Up @@ -72,7 +71,7 @@ default Stream<CloudEvent> query(Filter filter, SortBy sortBy) {
* @return All cloud events matching the specified filter
*/
default Stream<CloudEvent> query(Filter filter, int skip, int limit) {
return query(filter, skip, limit, SortBy.natural(ASCENDING));
return query(filter, skip, limit, SortBy.unsorted());
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import reactor.core.publisher.Mono;

import static java.util.Objects.requireNonNull;
import static org.occurrent.eventstore.api.SortBy.SortDirection.ASCENDING;

/**
* Additional querying capabilities that may be supported by an {@link EventStore} implementation that is not typically part of a
Expand All @@ -33,7 +32,7 @@ public interface EventStoreQueries {

/**
* Note that it's recommended to create an index on the "time" field in the event store in order to make
* {@link SortBy#TIME_ASC} and {@link SortBy#TIME_DESC} efficient.
* {@link SortBy} efficient.
*
* @return All cloud events matching the specified filter, skip, limit and sort by <code>sortBy</code>.
*/
Expand Down Expand Up @@ -73,7 +72,7 @@ default Flux<CloudEvent> query(Filter filter, SortBy sortBy) {
* @return All cloud events matching the specified filter
*/
default Flux<CloudEvent> query(Filter filter, int skip, int limit) {
return query(filter, skip, limit, SortBy.natural(ASCENDING));
return query(filter, skip, limit, SortBy.unsorted());
}

/**
Expand Down

0 comments on commit 4a4a561

Please sign in to comment.