Skip to content
This repository has been archived by the owner on Mar 6, 2020. It is now read-only.

Commit

Permalink
added forgotten sort method to query builder
Browse files Browse the repository at this point in the history
cosmetic
  • Loading branch information
musketyr committed Jan 11, 2019
1 parent 077c777 commit b3afaea
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ private HashAndRange findHashAndRange(Argument[] arguments) {
}

if (!names.isValid()) {
throw new UnsupportedOperationException("Method needs to have at least one argument annotated with @DynamoDBHashKey or with called 'hash'");
throw new UnsupportedOperationException("Method needs to have at least one argument annotated with @HashKey or with called 'hash'");
}

return names;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@
*/
public interface QueryBuilder<T> extends DetachedQuery<T> {

/**
* Sort the results by the range index
* @param sort the sort keyword
* @return self
*/
QueryBuilder<T> sort(Builders.Sort sort);

/**
* Demand consistent reads.
* @param read the read keyword
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ public enum EmailDeliveryStatus {

STATUS_DELIVERED,
STATUS_BLACKLISTED,
STATUS_NOT_DELIVERED
STATUS_NOT_DELIVERED;

public final boolean asBoolean() {
return STATUS_DELIVERED.equals(this);
}
}

0 comments on commit b3afaea

Please sign in to comment.