Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Total Count in Queries #2832

Merged
merged 3 commits into from
Jan 27, 2020
Merged

Conversation

lorthirk
Copy link

@lorthirk lorthirk commented Jan 22, 2020

Introducing Total Count in queries. Now an askTotalCount flag can be set on a Query object so that the result also returns the total count of the objects that matched the query, in addition to the list of the objects that remains tied to the limit and offset parameters.

As a side effect, all the queries from the Console have been migrated from the "query() + count()" approach to single queries with askTotalCount set to true.

The flag is also available in REST APIs.

Related Issue
No related issues

@lorthirk lorthirk added Enhancement This PR/Issue improves an part of Kapua Console GWT This issue/PR is related to Admin Web Console REST API We hope to REST everyday labels Jan 22, 2020
@lorthirk lorthirk requested a review from Coduz January 22, 2020 08:18
@lorthirk lorthirk force-pushed the feature-restApiTotalCount branch from 36fd1b6 to 0e1be8e Compare January 22, 2020 09:31
@codecov
Copy link

codecov bot commented Jan 22, 2020

Codecov Report

Merging #2832 into develop will increase coverage by 0.65%.
The diff coverage is 12.5%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #2832      +/-   ##
=============================================
+ Coverage      54.66%   55.31%   +0.65%     
- Complexity      2298     2353      +55     
=============================================
  Files           1008     1008              
  Lines          21769    21777       +8     
  Branches        1972     1973       +1     
=============================================
+ Hits           11899    12047     +148     
+ Misses          8961     8817     -144     
- Partials         909      913       +4
Impacted Files Coverage Δ Complexity Δ
...kapua/commons/model/query/KapuaListResultImpl.java 83.33% <0%> (-2.39%) 0 <0> (ø)
...pse/kapua/commons/service/internal/ServiceDAO.java 77.16% <0%> (+2.24%) 0 <0> (ø) ⬇️
.../kapua/commons/model/query/AbstractKapuaQuery.java 73.33% <33.33%> (-2.86%) 0 <0> (ø)
...ce/management/commons/call/DeviceCallExecutor.java 62.79% <0%> (-4.66%) 0% <0%> (ø)
.../DeviceManagementOperationRegistryServiceImpl.java 68% <0%> (-4%) 12% <0%> (-2%)
...a/job/engine/jbatch/listener/KapuaJobListener.java 90.27% <0%> (-1.39%) 28% <0%> (-1%)
...onfiguration/AbstractKapuaConfigurableService.java 80% <0%> (+3.63%) 0% <0%> (ø) ⬇️
...e/kapua/service/job/step/internal/JobStepImpl.java 70.37% <0%> (+3.7%) 11% <0%> (+1%) ⬆️
...rvice/job/execution/internal/JobExecutionImpl.java 77.14% <0%> (+5.71%) 15% <0%> (+2%) ⬆️
... and 17 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 26222b6...b3bf5aa. Read the comment docs.

Claudio Mezzasalma added 3 commits January 23, 2020 17:04
Signed-off-by: Claudio Mezzasalma <claudio.mezzasalma@eurotech.com>
Signed-off-by: Claudio Mezzasalma <claudio.mezzasalma@eurotech.com>
Signed-off-by: Claudio Mezzasalma <claudio.mezzasalma@eurotech.com>
@lorthirk lorthirk force-pushed the feature-restApiTotalCount branch from 0e1be8e to b3bf5aa Compare January 23, 2020 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Console GWT This issue/PR is related to Admin Web Console Enhancement This PR/Issue improves an part of Kapua REST API We hope to REST everyday
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants