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
Column | Type | Collation | Nullable | Default
-----------------+--------------------------+-----------+----------+---------
id | uuid | | not null |
geo_location | geography | | |
But when I try to map in a sqlx query like this
let assets = query
.map(|row: PgRow| {
let id = row.get("id");
let geo_location = row.get("geo_location");
Place {
id,
geo_location,
}
})
.fetch_all(&self.pool)
.await
It fails compilation
383 | let geo_location = row.get("geo_location");
| ^^^ the trait `sqlx::Decode<'_, Postgres>` is not implemented for `Geometry`
...
383 | let geo_location = row.get("geo_location");
| ^^^ the trait `sqlx::Type<Postgres>` is not implemented for `Geometry`
Any ideas on what I could be doing wrong?
The text was updated successfully, but these errors were encountered:
My Cargo.toml look like this
And I have a struct like this
the column type is
But when I try to map in a sqlx query like this
It fails compilation
Any ideas on what I could be doing wrong?
The text was updated successfully, but these errors were encountered: