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

Sorting in Devices REST simpleQuery #2891

Merged

Conversation

lorthirk
Copy link

@lorthirk lorthirk commented Mar 13, 2020

This PR introduces sorting in Devices REST Simple Query.

Two new query parameters are introduced:

  • sortParam: the name of the parameters that should be used to sort the results
  • sortDir: ASCENDING (default) or DESCENDING. Case-insensitive.

Related Issue
No related issues

Any side note on the changes made
The default sorting in ServiceDAO is now in ASCENDING order. The previous default was DESCENDING.

@lorthirk lorthirk added the REST API We hope to REST everyday label Mar 13, 2020
@lorthirk lorthirk requested a review from Coduz March 13, 2020 09:41
Claudio Mezzasalma added 2 commits March 13, 2020 10:52
Signed-off-by: Claudio Mezzasalma <claudio.mezzasalma@eurotech.com>
Signed-off-by: Claudio Mezzasalma <claudio.mezzasalma@eurotech.com>
@lorthirk lorthirk force-pushed the feature-deviceRestSimpleQuerySort branch from c907449 to 0bcf6aa Compare March 13, 2020 09:52
@Coduz Coduz added the Enhancement This PR/Issue improves an part of Kapua label Mar 13, 2020
@codecov
Copy link

codecov bot commented Mar 13, 2020

Codecov Report

Merging #2891 into develop will increase coverage by 2.01%.
The diff coverage is 33.33%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #2891      +/-   ##
=============================================
+ Coverage      53.38%   55.39%   +2.01%     
- Complexity      2367     2375       +8     
=============================================
  Files           1021     1021              
  Lines          21871    21875       +4     
  Branches        1977     1977              
=============================================
+ Hits           11676    12118     +442     
+ Misses          9320     8854     -466     
- Partials         875      903      +28     
Impacted Files Coverage Δ Complexity Δ
.../java/org/eclipse/kapua/model/query/SortOrder.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...pse/kapua/commons/service/internal/ServiceDAO.java 77.50% <100.00%> (ø) 0.00 <0.00> (ø)
...rtz/persistence/KapuaQuartzConnectionProvider.java 87.50% <0.00%> (-12.50%) 4.00% <0.00%> (-1.00%)
...lugin/authentication/AdminAuthenticationLogic.java 69.23% <0.00%> (-7.70%) 0.00% <0.00%> (ø%)
.../DeviceManagementOperationRegistryServiceImpl.java 66.07% <0.00%> (-7.15%) 12.00% <0.00%> (-4.00%)
...ce/management/commons/call/DeviceCallExecutor.java 62.79% <0.00%> (-4.66%) 0.00% <0.00%> (ø%)
.../service/device/call/message/kura/KuraPayload.java 53.64% <0.00%> (+0.66%) 29.00% <0.00%> (+1.00%)
...onfiguration/AbstractKapuaConfigurableService.java 80.90% <0.00%> (+0.90%) 0.00% <0.00%> (ø%)
...ce/datastore/internal/mediator/DatastoreUtils.java 70.93% <0.00%> (+1.16%) 66.00% <0.00%> (ø%)
...e/datastore/internal/ClientInfoRegistryFacade.java 82.71% <0.00%> (+1.23%) 10.00% <0.00%> (ø%)
... and 42 more

@Coduz Coduz merged commit ed12200 into eclipse-kapua:develop Mar 13, 2020
@lorthirk lorthirk deleted the feature-deviceRestSimpleQuerySort branch March 13, 2020 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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