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

FindOneAndDelete command implementation #332

Merged
merged 5 commits into from
Apr 3, 2023
Merged

Conversation

maheshrajamani
Copy link
Contributor

@maheshrajamani maheshrajamani commented Apr 3, 2023

What this PR does:
Implement findOneAndDelete command which finds and deletes a document and returns the deleted document in the response
Which issue(s) this PR fixes:
Fixes #319

Checklist

  • Changes manually tested
  • Automated Tests added/updated
  • Documentation added/updated
  • CLA Signed: DataStax CLA

@maheshrajamani maheshrajamani changed the title FindOneAndDelete command implementation [WIP] FindOneAndDelete command implementation Apr 3, 2023
@maheshrajamani maheshrajamani marked this pull request as ready for review April 3, 2023 14:23
@maheshrajamani maheshrajamani requested a review from a team as a code owner April 3, 2023 14:23
@maheshrajamani maheshrajamani changed the title [WIP] FindOneAndDelete command implementation FindOneAndDelete command implementation Apr 3, 2023
@@ -138,7 +172,7 @@ private QueryOuterClass.Query buildDeleteQuery() {
* @return Uni<Boolean> `true` if deleted successfully, else `false` if data changed and no longer
Copy link
Contributor

Choose a reason for hiding this comment

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

Changed to Tuple2, need to update javadoc

return FindOperation.sorted(
commandContext,
filters,
// 24-Mar-2023, tatu: Since we update the document, need to avoid modifications on
Copy link
Contributor

Choose a reason for hiding this comment

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

Can remove these comments where copying old tests (for all test setup same applies)

Copy link
Contributor

@tatu-at-datastax tatu-at-datastax left a comment

Choose a reason for hiding this comment

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

Looks good; had minor suggestions but nothing major.

@maheshrajamani maheshrajamani merged commit 7ace99a into main Apr 3, 2023
@maheshrajamani maheshrajamani deleted the find-one-delete branch April 3, 2023 22:41
Copy link
Collaborator

@vkarpov15 vkarpov15 left a comment

Choose a reason for hiding this comment

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

LGTM 👍

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.

Implement findOneAndDelete command
3 participants