Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upIssues with codegen for PG text[] #291
Comments
This comment has been minimized.
|
Also, this seems related but I'm not sure. When I change the line with use diesel::{ExpressionMethods, FilterDsl, LoadDsl, Queryable, SaveChangesDsl, Table};
#[changeset_for(testing)]I get a different super fun error:
It looks to me like both errors are choking on a |
This comment has been minimized.
It takes a reference because the place where we construct the values is in a method that takes None of this is relevant to the actual bug, just wanted to answer the question. |
This comment has been minimized.
|
Couldn't replicate with our test suite's schema. Noticed that our array column is |
This comment has been minimized.
|
Thanks for the clarification on references. OK, tried a few things with the column still allowing nulls and without, and everything appears to be working for my use case. But I have a question about handling nulls in PG arrays. With http://www.postgresql.org/docs/current/static/arrays.html
How would diesel handle null-in-the-middle arrays when deserializing to |
This comment has been minimized.
|
Currently we don't support arrays containing null or multidimensional arrays. As you mentioned, neither of these changes are necessarily enforced on the backend side, and we're not sure what the best solution is there. |
anp commentedApr 20, 2016
When trying to set up
insertable_intoa table which has atext[]datatype in postgres:Rust version:
Cargo.toml:
up.sql:
main.rs: