pub fn concat<'a, V, E1, E2>(
expr1: E1,
expr2: E2,
) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Text, <E1::Nullable as NullOr<E2::Nullable>>::Output, <E1::Aggregate as AggOr<E2::Aggregate>>::Output>Expand description
Concatenate two string expressions using || operator.
Nullability follows SQL concatenation rules: if either input is nullable,
the result is nullable. string_concat is a compatibility alias.
§Type Safety
// ✅ OK: Both are Text
concat(users.first_name, users.last_name);
// ✅ OK: Text with string literal
concat(users.first_name, " ");
// ❌ Compile error: Int is not Textual
concat(users.id, users.name);§Example
use drizzle_core::expr::concat;
// SELECT users.first_name || ' ' || users.last_name
let full_name = concat(concat(users.first_name, " "), users.last_name);