Expand description
This module contains all the built-in sanitizers which can be applied to columns.
Each validation function takes a crate::prelude::Value as input and returns a DbmsResult<crate::prelude::Value> with the sanitized
value or an error if the value could not be sanitized.
This module contains the Sanitize trait which should be implemented by all sanitizers.
Structs§
- Clamp
Sanitizer - Sanitizer that clamps integer values within a specified range.
- Clamp
Unsigned Sanitizer - Sanitizer that clamps unsigned integer values within a specified range.
- Collapse
Whitespace Sanitizer - Sanitizer that collapses multiple whitespace characters into a single space in strings.
- Lower
Case Sanitizer - Sanitizer that converts strings to lowercase.
- Null
IfEmpty Sanitizer - The
NullIfEmptySanitizerstruct is used to sanitize input by converting empty strings to null values. - Round
ToScale Sanitizer - Sanitizer that rounds
rust_decimal::Decimalvalues to a specified scale. - Slug
Sanitizer - Sanitizer sluggifies strings by converting them to lowercase, replacing spaces with hyphens, and removing non-alphanumeric characters.
- Timezone
Sanitizer - Sanitizer that ensures that all
crate::prelude::DateTimevalues are within a specific timezone. - Trim
Sanitizer - Sanitizer that trims leading and trailing whitespace from strings.
- Upper
Case Sanitizer - Sanitizer that converts strings to uppercase.
- UrlEncoding
Sanitizer - Sanitizer URL-encodes strings by converting them to percent-encoded format.
- UtcSanitizer
- Sanitizer that ensures that all
crate::prelude::DateTimevalues are within the UTC timezone.