Skip to content

Commit

Permalink
Make calculate_token_untyped public
Browse files Browse the repository at this point in the history
Fixes: #974
  • Loading branch information
lvboudre committed Apr 3, 2024
1 parent 1fcadc9 commit 91d2b56
Showing 1 changed file with 6 additions and 4 deletions.
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

0 comments on commit 91d2b56

Please sign in to comment.