Skip to main content

jsonb_agg

Function jsonb_agg 

Source
pub fn jsonb_agg<'a, V, E>(
    expr: E,
) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Jsonb, Null, Agg, E::Sources>
Expand description

Collects values into a JSONB array (JSONB_AGG), on PostgreSQL.

Accepts any expression. The result is jsonb, nullable, and an aggregate.

ยงExamples

assert_eq!(jsonb_agg(users.name).sql(), r#"JSONB_AGG ("users"."name")"#);