pub fn string_concat<'a, V, L, R>(
left: L,
right: R,
) -> SQLExpr<'a, V, Text, <L::Nullable as NullOr<R::Nullable>>::Output, Scalar>Expand description
Concatenate two string expressions using || operator.
Requires both operands to be Textual (Text or VarChar).
Nullability follows SQL concatenation rules: nullable input -> nullable output.
§Type Safety
ⓘ
// ✅ OK: Both are Text
string_concat(users.first_name, users.last_name);
// ✅ OK: Text with string literal
string_concat(users.first_name, " ");
// ❌ Compile error: Int is not Textual
string_concat(users.id, users.name);§Example
ⓘ
use drizzle_core::expr::string_concat;
// SELECT users.first_name || ' ' || users.last_name
let full_name = string_concat(string_concat(users.first_name, " "), users.last_name);