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

statement: unpub StatementConfig #772

Merged
merged 3 commits into from
Jul 31, 2023

Conversation

wprzytula
Copy link
Collaborator

@wprzytula wprzytula commented Jul 28, 2023

StatementConfig is only used internally and does not appear in any public API.

  • It is made pub(crate) together with its fields so that we have more flexibility in changing it without introducing a breaking change.
  • After that, retry_policy field is moved from Query, PreparedStatement and Batch into StatementConfig, as it suits there best.

Refs: #660
Fixes: #701

Pre-review checklist

  • I have split my patch into logically separate commits.
  • All commit messages clearly explain what they change and why.
  • [ ] I added relevant tests for new features and bug fixes.
  • All commits compile, pass static checks and pass test.
  • PR description sums up the changes and reasons why they should be introduced.
  • [ ] I have provided docstrings for the public items that I want to introduce.
  • [ ] I have adjusted the documentation in ./docs/source/.
  • I added appropriate Fixes: annotations to PR description.

@wprzytula wprzytula requested review from cvybhu and piodul July 28, 2023 16:34
@wprzytula wprzytula added this to the 0.10.0 milestone Jul 28, 2023
`StatementConfig` is only used internally and does not appear in any
public API. It is made pub(crate) together with its fields so that
we have more flexibility in changing it without introducing
a breaking change.
As StatementConfig is no longer `pub`, we can move retry_policy field
there, instead of having it directly on Query, PreparedStatement and
Batch.
@wprzytula wprzytula force-pushed the unpub-statement-config branch from 16ad324 to 66b06ab Compare July 30, 2023 07:32
@wprzytula wprzytula added API-stability Part of the effort to stabilize the API API-breaking This might introduce incompatible API changes labels Jul 30, 2023
Passing it separately is no longer needed after retry policy is put
inside `StatementConfig`.
Copy link
Collaborator

@piodul piodul left a comment

Choose a reason for hiding this comment

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

A small, but nice cleanup. Thanks.

@piodul piodul merged commit e3e20f6 into scylladb:main Jul 31, 2023
@wprzytula wprzytula deleted the unpub-statement-config branch July 31, 2023 09:25
wprzytula added a commit to wprzytula/scylla-rust-driver that referenced this pull request Aug 28, 2023
Even though scylladb#701 was fixed with scylladb#772, a TODO was left. Now it
misleadingly points to `contents`. It is thus removed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API-breaking This might introduce incompatible API changes API-stability Part of the effort to stabilize the API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Un-pub StatementConfig
2 participants