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

Introduce a new API to update provided query fields and update query protocol to record originalVersionId #2633

Merged
merged 4 commits into from
Mar 9, 2024

Conversation

YannanGao-gs
Copy link
Contributor

What type of PR is this?

improvement

What does this PR do / why is it needed ?

Introduce a new API to update query version and update query protocol to record originalVersionId

Which issue(s) this PR fixes:

Fixes #

Other notes for reviewers:

Does this PR introduce a user-facing change?

Copy link

github-actions bot commented Feb 15, 2024

Test Results

     746 files  ±0       746 suites  ±0   1h 4m 18s ⏱️ -57s
12 258 tests +1  12 093 ✔️ +1  165 💤 ±0  0 ±0 
15 291 runs  +1  15 116 ✔️ +1  175 💤 ±0  0 ±0 

Results for commit 37d0f9c. ± Comparison against base commit 3037b89.

♻️ This comment has been updated with latest results.

@YannanGao-gs YannanGao-gs force-pushed the updateQueryVersion branch 3 times, most recently from e6a5fa7 to ae6240a Compare February 16, 2024 20:51
@YannanGao-gs YannanGao-gs changed the title Introduce a new API to update query version and update query protocol to record originalVersionId Introduce a new API to update provided query fields and update query protocol to record originalVersionId Feb 16, 2024
{
field.setAccessible(true);
Object updatedValue = field.get(updatedQuery);
if (updatedValue != null)
Copy link
Member

Choose a reason for hiding this comment

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

this might require some rethinking about if we have the api take from Query updatedQuery to something ese
but one use case this current flow does not support is if we want to set a value to null if it has already been set to something.
woud using the mongo set operation help here, and update only those fields?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If the patchQuery function still takes in a parameter of type Query that we are going to update fields upon, to generate the payload of mongo set operation, I think we'll still need to compose a document by iterating the provided parameter to get non-null fields, then call set? 😅😅

Or, could you please be more specific about what the parameter type should be? 👀😅😅
Thanks

@MauricioUyaguari MauricioUyaguari merged commit 5d0e403 into finos:master Mar 9, 2024
4 checks passed
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.

3 participants