Info
This post is auto-generated from RSS feed The Rust Programming Language Forum - Latest topics. Source: Sqlx, what is the correct decoder to use for a timestamp?
What's the correct decoder to use for a column type postgresql "TIMESTAMP"?
i'm trying to follow the types from sqlx::postgres::types - Rust
using chrono feature
row.get::<chrono::DateTime<chrono::Utc>>("created_at");
// E0277: the trait bound `chrono::DateTime<Utc>: Type<Postgres>` is not satisfied
same for .
Using the "time" feature types, it complains that i need more generics but the manual doesn't mention that signatures:
get::<sqlx::types::time::OffsetDateTime>.get("created_at");
// E0107: supplied 1 generic (expects 2?)
same for primitiveDateTime, etc.
2 posts - 1 participant
🏷️ rust_feed