-
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
How to query Postgres TimestampTZ[], Enum and TSVector datatypes? #729
Comments
Have figured this out now, one has to use sqlx::types::BigDecimal instead of bigdecimal::BigDecimal, it would be great if there can be a note for the same in the documentation or an example. Any help with the other data types Text[], TSVector and Enum would be greatly appreciated. Thanks |
Have figured it out for arrays now, you need to use
This however does not work for TimestampTZ[] for the following code, it returns an error;
thanks |
@elasmojs if you get an error about The issue with Support for |
@abonander thank you for the response. It really helps. I am closing this now. |
@abonander Any idea when TSVector will be implemented for Postgres |
Feel free to open a PR. |
Hi it would be great to have an example of which Rust data type is compatible with Postgres Numeric, Text[] and TSVector datatypes.
edit: I want to use "row.try_get" to retrieve the value of the column
let res:Result<BigDecimal, Error> = row.try_get(col.name.as_str());
throws compile error
the trait 'sqlx_core::decode::Decode<'_, sqlx_core::postgres::database::Postgres>' is not implemented for 'bigdecimal::BigDecimal'
thanks
The text was updated successfully, but these errors were encountered: