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

Add query/insert level settings override #123

Merged
merged 12 commits into from
Aug 7, 2024
Merged

Conversation

slvrtrn
Copy link
Contributor

@slvrtrn slvrtrn commented Aug 2, 2024

This PR adds:

  • Query::with_option(...)
  • Insert::with_option(...)
  • Inserter::with_option(...)

These methods behave similarly to the Client::with_option but allow overriding settings for a particular query/statement only.

For Insert, some internal refactoring was required to postpone creating the outgoing request.

Additionally, fixed some stale links in the code comments.

src/insert.rs Outdated Show resolved Hide resolved
@slvrtrn slvrtrn marked this pull request as ready for review August 2, 2024 18:25
docker-compose.yml Outdated Show resolved Hide resolved
tests/it/query.rs Show resolved Hide resolved
src/insert.rs Outdated Show resolved Hide resolved
src/insert.rs Show resolved Hide resolved
src/insert.rs Show resolved Hide resolved
src/insert.rs Show resolved Hide resolved
src/insert.rs Outdated Show resolved Hide resolved
src/insert.rs Outdated Show resolved Hide resolved
src/insert.rs Show resolved Hide resolved
@slvrtrn slvrtrn changed the title Add query/insert level settings override, CH in Docker Add query/insert level settings override Aug 5, 2024
Cargo.toml Show resolved Hide resolved
@slvrtrn slvrtrn requested a review from loyd August 7, 2024 11:47
@slvrtrn slvrtrn mentioned this pull request Aug 7, 2024
@slvrtrn slvrtrn mentioned this pull request Aug 7, 2024
Err(Error::TimedOut)
}
};
self.state = InsertState::Completed;
Copy link
Collaborator

Choose a reason for hiding this comment

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

If panic happens, this isn't executed. In general, it should never happen, although.

@loyd loyd merged commit c47ca82 into master Aug 7, 2024
6 checks passed
@loyd loyd deleted the query-level-settings-override branch August 7, 2024 16:38
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