pub trait ToUpdateValue {
// Required method
fn to_update_value(self) -> Option<String>;
}Expand description
Trait for types that can be converted to an optional string value for SQL updates.
This trait is used by the update method to handle both direct values
(e.g., update("role", "admin")) and NULL values (e.g., update("role", None::<String>)).
Required Methods§
Sourcefn to_update_value(self) -> Option<String>
fn to_update_value(self) -> Option<String>
Converts the value to an Option<String> for SQL binding.
§Returns
Some(String)- String representation for a database valueNone- Represents a SQLNULL