You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 25, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 25, 2023. It is now read-only.
When querying certain postgres types, quaint throws Error querying the database: error deserializing column N: cannot convert between the Rust type `core::option::Option<alloc::string::String>` and the Postgres type `XXX` , where XXX is one of:
money
date
time
timetz*
timestamptz
interval*
xml*
bytea
bit varying
cidr*
inet*
macaddr
point
box*
circle*
path*
polygon*
tsquery*
tsvector*
*: not fully supported by tokio-postgres
Some of these types are pretty obscure (though I do use them all), but some like "timestamptz" are fairly common. The type json is an odd one, since you've already got a variant for Json in ParameterizedValue, but it doesn't seem to work
It would be fine if values of unsupported types were returned as a string, users can transform them to the proper types in client code
Activity
pimeys commentedon Jan 18, 2020
You can support support JSON by enabling the
json-1type in yourCargo.toml. For other types I'm more than happy to get a pull request. We might not need them in Prisma, but they should be quite easy to add in https://github.com/prisma/quaint/blob/master/src/connector/postgres/conversion.rspimeys commentedon Jan 18, 2020
Wait, actually we miss one thing to make that happen.
pimeys commentedon Jan 18, 2020
This should fix the json deserializing b9d6dcd
In a similar manner we could add support for other types, following the list in the postgres documentation. https://docs.rs/tokio-postgres/0.5.1/tokio_postgres/types/struct.Type.html