New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Queryable not working with Option<Vec<DateTime>> #691

Closed
Aaronepower opened this Issue Feb 13, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@Aaronepower

Aaronepower commented Feb 13, 2017

Code was the same as the demo from Getting Started except with one being Option<Vec<DateTime>>. This does work for Insertable just not for Queryable.

error[E0277]: the trait bound `std::option::Option<std::vec::Vec<chrono::datetime::DateTime<chrono::offset::utc::UTC>>>: diesel::types::FromSqlRow<diesel::types::Nullable<diesel::types::Array<diesel::types::Timestamptz>>, diesel::pg::Pg>` is not satisfied
  --> src/main.rs:13:10
   |
13 |         .load::<Foo>(&connection)
   |          ^^^^ the trait `diesel::types::FromSqlRow<diesel::types::Nullable<diesel::types::Array<diesel::types::Timestamptz>>, diesel::pg::Pg>` is not implemented for `std::option::Option<std::vec::Vec<chrono::datetime::DateTime<chrono::offset::utc::UTC>>>`
   |
   = help: the following implementations were found:
   = help:   <std::option::Option<bool> as diesel::types::FromSqlRow<diesel::types::Nullable<diesel::types::Bool>, DB>>
   = help:   <std::option::Option<i16> as diesel::types::FromSqlRow<diesel::types::Nullable<diesel::types::SmallInt>, DB>>
   = help:   <std::option::Option<i32> as diesel::types::FromSqlRow<diesel::types::Nullable<diesel::types::Integer>, DB>>
   = help:   <std::option::Option<i64> as diesel::types::FromSqlRow<diesel::types::Nullable<diesel::types::BigInt>, DB>>
   = help: and 33 others
@sgrif

This comment has been minimized.

Member

sgrif commented Feb 15, 2017

This was fixed by #694.

@sgrif sgrif closed this Feb 15, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment