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

Simplify filtering by enum columns #127

Merged
merged 4 commits into from
Dec 17, 2019
Merged

Simplify filtering by enum columns #127

merged 4 commits into from
Dec 17, 2019

Conversation

dmitrykuzmin
Copy link
Contributor

This PR simplifies the process of creation of the enum column filters.

It's currently required for all enum column values to be wrapped as Protobuf EnumValue before being passed to the filter, to enable the correct processing on the server side.

Previously, creating such a filter required verbose and hacky code on the client side.

This PR extends the client API so now such filter can be created as follows:

import {enumValueOf, Filters} from '.../client/actor-request-factory';

const filter = Filters.eq('task_priority', enumValueOf(Task.Priority.HIGH));

Spine version advances to 1.2.10.

@dmitrykuzmin dmitrykuzmin self-assigned this Dec 16, 2019
@dmitrykuzmin dmitrykuzmin requested a review from armiol December 16, 2019 22:13
@dmitrykuzmin
Copy link
Contributor Author

@armiol PTAL.

The build depends on base#501 and core-java#1215.

@dmitrykuzmin
Copy link
Contributor Author

@dmdashenkov PTAL.

Copy link
Contributor

@dmdashenkov dmdashenkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM as soon as the build passes.

@codecov
Copy link

codecov bot commented Dec 17, 2019

Codecov Report

Merging #127 into master will decrease coverage by 0.28%.
The diff coverage is 15.38%.

@@             Coverage Diff              @@
##             master     #127      +/-   ##
============================================
- Coverage     61.11%   60.83%   -0.29%     
  Complexity      172      172              
============================================
  Files            86       86              
  Lines          2083     2096      +13     
  Branches         36       37       +1     
============================================
+ Hits           1273     1275       +2     
- Misses          800      811      +11     
  Partials         10       10

@dmitrykuzmin dmitrykuzmin merged commit 1739332 into master Dec 17, 2019
@dmitrykuzmin dmitrykuzmin deleted the enum-value-of branch December 17, 2019 14:10
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.

2 participants