pub fn make_timestamp<'a, V, Y, Mo, D, H, Mi, S>(
year: Y,
month: Mo,
day: D,
hour: H,
minute: Mi,
second: S,
) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Timestamp, <<<<Y::Nullable as Nullability>::Or<Mo::Nullable> as Nullability>::Or<D::Nullable> as Nullability>::Or<H::Nullable> as Nullability>::Or<<Mi::Nullable as Nullability>::Or<S::Nullable>>, <<<<Y::Aggregate as AggregateKind>::Or<Mo::Aggregate> as AggregateKind>::Or<D::Aggregate> as AggregateKind>::Or<H::Aggregate> as AggregateKind>::Or<<Mi::Aggregate as AggregateKind>::Or<S::Aggregate>>, (Y::Sources, (Mo::Sources, (D::Sources, (H::Sources, (Mi::Sources, S::Sources)))))>where
V: SQLParam + 'a,
V::DialectMarker: DialectSupports<PostgresDateTime>,
Y: Expr<'a, V>,
Y::SQLType: Numeric,
Mo: Expr<'a, V>,
Mo::SQLType: Numeric,
D: Expr<'a, V>,
D::SQLType: Numeric,
H: Expr<'a, V>,
H::SQLType: Numeric,
Mi: Expr<'a, V>,
Mi::SQLType: Numeric,
S: Expr<'a, V>,
S::SQLType: Numeric,
H::Nullable: Nullability,
D::Nullable: Nullability,
Mo::Nullable: Nullability,
S::Nullable: Nullability,
H::Aggregate: AggregateKind,
D::Aggregate: AggregateKind,
S::Aggregate: AggregateKind,Expand description
Builds a timestamp from its parts (MAKE_TIMESTAMP), on PostgreSQL.
Takes year, month, day, hour, minute and seconds; all must be numeric
(seconds may have a fraction). The result is timestamp, nullable if any
argument is.
ยงExamples
let ts = make_timestamp::<Value, _, _, _, _, _, _>(2024, 1, 15, 10, 30, 0.0);
assert_eq!(ts.sql(), "MAKE_TIMESTAMP ($1, $2, $3, $4, $5, $6)");