Skip to content

Commit

Permalink
Merge pull request #4014 from dseurotech/new-ask_total_count_on_accou…
Browse files Browse the repository at this point in the history
…nt_query

✨ added askTotalCount parameter to accounts query
  • Loading branch information
Coduz authored Apr 12, 2024
2 parents bf9e9ce + 684cd55 commit 27a4ee6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ public AccountListResult simpleQuery(
@QueryParam("recursive") boolean recursive, //
@QueryParam("sortParam") String sortParam,
@QueryParam("sortDir") @DefaultValue("ASCENDING") SortOrder sortDir,
@QueryParam("askTotalCount") boolean askTotalCount,
@QueryParam("offset") @DefaultValue("0") int offset, //
@QueryParam("limit") @DefaultValue("50") int limit) throws KapuaException {

Expand All @@ -93,6 +94,7 @@ public AccountListResult simpleQuery(
}

AccountQuery query = accountFactory.newQuery(scopeId);
query.setAskTotalCount(askTotalCount);

AndPredicate andPredicate = query.andPredicate();
if (!Strings.isNullOrEmpty(name)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ paths:
type: boolean
- $ref: '../openapi.yaml#/components/parameters/sortParam'
- $ref: '../openapi.yaml#/components/parameters/sortDir'
- $ref: '../openapi.yaml#/components/parameters/askTotalCount'
- $ref: '../openapi.yaml#/components/parameters/limit'
- $ref: '../openapi.yaml#/components/parameters/offset'
- name: matchTerm
Expand Down

0 comments on commit 27a4ee6

Please sign in to comment.