pub trait StrColExt<T> {
// Required methods
fn lower(&self) -> ColExpr<T>;
fn upper(&self) -> ColExpr<T>;
fn length(&self) -> ColExpr<T>;
fn trim(&self) -> ColExpr<T>;
fn coalesce<V: Into<Value>>(&self, default: V) -> ColExpr<T>;
fn concat<V: Into<Value>>(&self, suffix: V) -> ColExpr<T>;
}Expand description
String-function helpers — lower(), upper(), length(), trim(),
coalesce(), concat(). Implemented for both StrCol<T> and
NullableStrCol<T> so the extension methods work whether the column is
String or Option<String>.
Each returns a ColExpr; chain a comparison (.eq / .ne / .lt
…) to produce a Predicate<T> for filter / exclude. All six render
identically on SQLite and Postgres (TRIM, COALESCE are standard
SQL; || is the standard concatenation operator both backends accept).
Required Methods§
Sourcefn trim(&self) -> ColExpr<T>
fn trim(&self) -> ColExpr<T>
TRIM(col) — strip leading/trailing whitespace before comparing,
so name.trim().eq("ada") matches a stored " ada ".
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".