You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I name the type of a field in sqlite as date, and tried to use sqlx::query_as! to parse that field to a struct with chrono::NaiveDate type, I went ok with no problems.
It went wrong when defining the type of a field as time, and tried to parse that to chrono::NaiveTime, the error is that unsupported type TIME of column #2 ("start_time").
Minimal Reproduction
#[derive(Debug)]pubstructTime{pubtime_id:i64,pubstart_time:NaiveTime,pubend_time:NaiveTime,pubpersons:i64,}let times:Vec<Time> = sqlx::query_as!(Time, r#" SELECT time_id, start_time, end_time, persons FROM times "#).fetch_all(&self.pool).await?;
The text was updated successfully, but these errors were encountered:
Bug Description
When I name the type of a field in sqlite as
date
, and tried to usesqlx::query_as!
to parse that field to a struct withchrono::NaiveDate
type, I went ok with no problems.It went wrong when defining the type of a field as
time
, and tried to parse that tochrono::NaiveTime
, the error is thatunsupported type TIME of column #2 ("start_time")
.Minimal Reproduction
The text was updated successfully, but these errors were encountered: