-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
unimplemented! in typeinfo blocks to get any detail about error #1408
Comments
So were you trying to call As the comment on the macro says, the The issue here is that the sqlx/sqlx-core/src/any/type_info.rs Lines 21 to 33 in b6e1275
However, It's poor API design on our part, but I don't know how we can fix this easily. |
It was called by the engine is some error reporting function. Once I get back to a computer I'll add the backtrace, but to reproduce the query_as function should be called where the db type does not match to the rust type sg like:
|
code:
error:
|
For
any
db inimpl_any_type
macro, thetype_info
is unimplemented. It makes it really hard to get real errors with type issues.It'd be good to have at least some temp solution, some placeholder, that won't panic but returns 'this part of error report will be improved later`. Now I have to go into sqlx source and guess what could be the isssue instead of just reading the error message.
Some more context:
With postgersl backend the table used SERIAL as an id (i32) but I tried to read it back as an i64. After altering the type to BigSerial all was working fine, but it took me a while to realize SERIAL is using a smaller integer type.
The text was updated successfully, but these errors were encountered: