Skip to main content

make_date

Function make_date 

Source
pub fn make_date<'a, V, Y, M, D>(
    year: Y,
    month: M,
    day: D,
) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Date, <<Y::Nullable as Nullability>::Or<M::Nullable> as Nullability>::Or<D::Nullable>, <<Y::Aggregate as AggregateKind>::Or<M::Aggregate> as AggregateKind>::Or<D::Aggregate>, (Y::Sources, (M::Sources, D::Sources))>
Expand description

Builds a date from year, month and day (MAKE_DATE), on PostgreSQL.

All arguments must be numeric. The result is date, nullable if any argument is.

ยงExamples

let d = make_date::<Value, _, _, _>(2024, 1, 15);
assert_eq!(d.sql(), "MAKE_DATE ($1, $2, $3)");