Replies: 1 comment
-
Thanks for writing this post. Such feedback is always valuable.
I'm aware of that and I'm working on several levels to improve these messages, but that's nothing that moves fast (especially for the language level changes.). If you use a nightly compile you should get at least some improvements if you enable the
It's hard to reason about that due to the existence of default values at database level. It might be something to keep in mind for the next major release although. (We cannot change that before as it would likely break existing code).
The next release will contain #3359 which should make it much easier to debug such issues.
In the end the underlying problem here is quite similar to what iterators do. Having these complex types allow to reason about the query at compile time and gives maximum performance. In most cases you can shrink the types by boxing (via
Both CTE's and window functions are something that we want to support some day. At least I personally did not have the time yet to implement that. If someone is interesting in one or the other I would be open to guide such an implementation.
Can you provide an example where the usage of
This restriction is there to improve error messages. Without that it would be even harder to read an error that is generated by an mismatch between these clauses. This error would just point to load and call out that some overly generic trait is not implemented for your query type (which will be really large). While the current situation is not optimal, it keeps at least the error messages relatively small.
Can you provide an example for this case? That sounds strange for me. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I've been working with Diesel for almost one year now and overall, it's been a great experience. While using it I kept a small list of frustrations I encountered and thought about sharing them.
It's not a list of feature requests, I just feel like it would be nice to get feedback from some real-world apps. Also, after re-reading this list, I found that many of these bullets are about error messages.
Insertable
, because Diesel doesn't detect when a non nullable field is missing in the struct.Selectable
type and the database schema, it’s not obvious to find the mismatching field (eg: ai64
instead of ai32
).sql
.left_join
may be improved, particularly, the need to useassume_not_null
in theleft_join
andnullable
in theselect
.select
needs to be at the end the query, after joins andgroup_by
, and got cryptic, difficult to find errors.impl Queryable <Nullable<...>>
is not working and I’ve met this problem a few times. Forcing me to have aOption<SimpleArray<...>
instead of justSimpleArray<...>
, or an domain enum whereNullable
was just one of the different variants.Beta Was this translation helpful? Give feedback.
All reactions