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

Make calculate_token_untyped public #975

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions scylla/src/statement/prepared_statement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,12 @@ impl PreparedStatement {
pub fn calculate_token(&self, values: &impl SerializeRow) -> Result<Option<Token>, QueryError> {
self.calculate_token_untyped(&self.serialize_values(values)?)
}

// A version of calculate_token which skips serialization and uses SerializedValues directly.
// Not type-safe, so not exposed to users.
pub(crate) fn calculate_token_untyped(

// A version of calculate_token which skips serialization and uses SerializedValues directly (not type safe).
///
/// Returns the token that would be computed for executing the provided
/// prepared statement with the provided values.
pub fn calculate_token_untyped(
&self,
values: &SerializedValues,
) -> Result<Option<Token>, QueryError> {
Expand Down
Loading