Skip to content

Conversation

@vbabanin
Copy link
Member

@vbabanin vbabanin commented Jan 6, 2025

This PR adds BaseClientUpdateOptions and BaseClientDeleteOptions as shared base interfaces for their respective client option types. While duplication of methods in sub-interfaces is still required, this approach ensures a more error-resistant API evolution.

JAVA-5737

@vbabanin vbabanin requested a review from stIncMale January 7, 2025 00:54
JAVA-5737
@vbabanin vbabanin self-assigned this Jan 7, 2025
@vbabanin vbabanin marked this pull request as ready for review January 7, 2025 06:42
stIncMale added a commit to stIncMale/mongo-java-driver that referenced this pull request Jan 7, 2025
stIncMale added a commit to stIncMale/mongo-java-driver that referenced this pull request Jan 7, 2025
stIncMale added a commit to stIncMale/mongo-java-driver that referenced this pull request Jan 8, 2025
stIncMale added a commit to stIncMale/mongo-java-driver that referenced this pull request Jan 8, 2025
stIncMale added a commit to stIncMale/mongo-java-driver that referenced this pull request Jan 8, 2025
Comment on lines +30 to +34
BaseClientDeleteOptions collation(@Nullable Collation collation);

BaseClientDeleteOptions hint(@Nullable Bson hint);

BaseClientDeleteOptions hintString(@Nullable String hintString);
Copy link
Member

Choose a reason for hiding this comment

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

[optional]

  1. These three methods seem to be shared by all options, including replace options. It seems trivial to add BaseClientWriteModelOptions that declares them, and is a super-interface for BaseClientDeleteOptions, BaseClientUpdateOptions, ClientReplaceOptions.
  2. upsert is shared by BaseClientUpdateOptions and ClientReplaceOptions. Do you think it makes sense to add something like BaseClientUpsertableWriteModelOptions, such that it's a supertype for BaseClientUpdateOptions and ClientReplaceOptions?

@vbabanin vbabanin requested a review from stIncMale January 9, 2025 00:20
vbabanin and others added 4 commits January 8, 2025 18:36
…ncreteClientUpdateOneModel.java

Co-authored-by: Valentin Kovalenko <[email protected]>
…ncreteClientUpdateManyModel.java

Co-authored-by: Valentin Kovalenko <[email protected]>
JAVA-5737
@vbabanin vbabanin requested a review from stIncMale January 9, 2025 02:45
@vbabanin vbabanin merged commit 6c4883b into mongodb:JAVA-4586_bulk-write Jan 9, 2025
60 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.

2 participants