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

Default sorting for Datastore REST API simple queries #2666

Merged

Conversation

lorthirk
Copy link

@lorthirk lorthirk commented Jul 25, 2019

This PR adds default sorting for the Datastore queries:

  • MessageQueryImpl: sort by timestamp DESC
  • MetricInfoQueryImpl: sort by name ASC
  • ChannelInfoQueryImpl: sort by channel ASC
  • ClientInfoQueryImpl: sort by client_id ASC

Related Issue
This PR closes #2665

@lorthirk lorthirk requested a review from Coduz July 25, 2019 14:58
@lorthirk lorthirk force-pushed the feature-defaultSortMessageRest branch from a79f428 to fc9abd1 Compare July 25, 2019 18:14
@codecov
Copy link

codecov bot commented Jul 25, 2019

Codecov Report

Merging #2666 into develop will decrease coverage by 6.44%.
The diff coverage is 100%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #2666      +/-   ##
=============================================
- Coverage      53.06%   46.62%   -6.45%     
+ Complexity      2831     2426     -405     
=============================================
  Files           1024     1024              
  Lines          28815    28817       +2     
  Branches        2331     2331              
=============================================
- Hits           15292    13436    -1856     
- Misses         12477    14369    +1892     
+ Partials        1046     1012      -34
Impacted Files Coverage Δ Complexity Δ
...datastore/internal/mediator/DatastoreMediator.java 83.33% <ø> (-4.51%) 14 <0> (-2)
...tore/internal/model/query/ClientInfoQueryImpl.java 55.55% <100%> (+5.55%) 3 <0> (ø) ⬇️
...ore/internal/model/query/ChannelInfoQueryImpl.java 50% <100%> (+5.55%) 3 <0> (ø) ⬇️
...tastore/internal/model/query/MessageQueryImpl.java 76.92% <100%> (+0.92%) 6 <0> (ø) ⬇️
...tore/internal/model/query/MetricInfoQueryImpl.java 41.66% <100%> (+5.3%) 3 <0> (ø) ⬇️
.../kapua/service/datastore/steps/DatastoreSteps.java 25.82% <0%> (-63.08%) 53% <0%> (-176%)
...nternal/model/query/ChannelMatchPredicateImpl.java 0% <0%> (-61.54%) 0% <0%> (-2%)
...authorization/steps/AuthorizationServiceSteps.java 30.8% <0%> (-57.35%) 54% <0%> (-83%)
...store/internal/MetricInfoRegistryServiceProxy.java 42.85% <0%> (-57.15%) 2% <0%> (-2%)
...tore/internal/ChannelInfoRegistryServiceProxy.java 42.85% <0%> (-57.15%) 2% <0%> (-2%)
... and 44 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 2c0c2fa...b86c545. Read the comment docs.

@lorthirk lorthirk force-pushed the feature-defaultSortMessageRest branch from fc9abd1 to c148a1c Compare July 29, 2019 12:41
@lorthirk lorthirk force-pushed the feature-defaultSortMessageRest branch 2 times, most recently from 8e760ef to 0b3cf2b Compare July 30, 2019 15:16
Signed-off-by: Claudio Mezzasalma <claudio.mezzasalma@eurotech.com>
@lorthirk lorthirk force-pushed the feature-defaultSortMessageRest branch from 0b3cf2b to b86c545 Compare July 30, 2019 15:21
@Coduz Coduz merged commit 7aa225b into eclipse-kapua:develop Jul 31, 2019
@lorthirk lorthirk deleted the feature-defaultSortMessageRest branch September 16, 2019 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inconsistent sorting of result set of messages when sort is not given
2 participants