Replies: 1 comment
-
I am having this same issue. This is a pretty common pattern and it would be a really nice feature. I'd be happy to help work on it but I'm not sure where to begin. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there,
I am using sqlx v0.5.13 via Rocket v0.5.0-rc.2 / rocket_db_pools 0.1.0-rc.2 and asked this question there, but I was instructed to reach out here since it may be sqlx related and not Rocker related.
It seems I can't derive
FromRow
for my struct because of aVec<>
field. My struct looks like this:I get the following compiler error at the
App::from_row(row)
call site, see below. I thought the#[sqlx(default)]
attribute would initialized the field to an empty vector. What am I missing?Compiler error:
Note that I am able to manually implement
FromRow
and it works (I'm using sqlx only with an Sqlite database), but I'd rather derive if possible:Thanks.
Beta Was this translation helpful? Give feedback.
All reactions