-
-
Notifications
You must be signed in to change notification settings - Fork 233
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 use geometry type in postgis #522
Comments
+1 |
pgtype support some geometric types, e.g. https://pkg.go.dev/github.com/jackc/pgtype#Point |
thank you for your answer :) |
I use point type but that is not working without cast(geometry::point) how to use pgtype.Point type on gemetry type when insert sql? thantk you |
@boojongmin can you try Point pgtype.Point `bun:"type:geometry::point"` If that does not work, please provide a program that reproduces the problem. |
you can use
|
Schema creation ( Example
Error
|
it is not working for me my code and error message is below. type Building struct {
bun.BaseModel `bun:"table:tt,alias:t"`
Id int64 `bun:",pk"`
Point pgtype.Point `bun:"type:geometry::point"`
} err := Db.NewSelect().
Column("*").
Model(r).
Where("id = ?", id).
Scan(ctx)
would you check this? thank you. |
I've been using PostGIS+Bun+Orb for a while and just broke it into a separate project --> https://github.com/tingold/bunpostgis let me know if this helps |
This issue has been automatically marked as stale because it has not had activity in the last 30 days. If there is no update within the next 7 days, this issue will be closed. |
hi, I have a question when using postgis.
how to model mapping
geometry
type?thanks you :)
The text was updated successfully, but these errors were encountered: