Skip to main content
Scalar functions over DuckDB’s native LIST and MAP types, exposed as free functions in better_duck_diesel::dsl::*. List arguments and results are typed DuckList; map arguments are typed DuckMap.

List functions

Map functions

Functions whose result is DuckList (or DuckUBigInt) cannot be loaded through the typed select builder — the Duck* SQL types have no Queryable blanket impl. To read such a result, route the query through diesel::sql_query(...) with a QueryableByName struct whose field carries #[diesel(sql_type = DuckList)]. Functions that reduce a list to a standard type — array_length, len, array_to_string — load normally. See Type mapping.

See also

Type mapping

DuckList / DuckMap and how to read them.

Aggregates

array_agg builds a DuckList.

JSON functions

The JSON alternative to native collections.

DSL overview

The rest of the DSL.