What to use in v5 in place of point.Set method? #1564
-
Hi, I'm migrating to v5: https://github.com/jackc/pgx/blob/master/pgtype/point.go I can see that // legacy
if p.Status != pgtype.Present { }
// v5
if !p.Valid { } But what can I use to set a point from a String? I used to do this: p.Set("(48.006110,0.199556)") Thank you so much. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
There isn't any specific parse string functionality, but I think you could use Also, if this was immediately going to be used as a query argument you could skip the step and use the string directly. |
Beta Was this translation helpful? Give feedback.
There isn't any specific parse string functionality, but I think you could use
Scan
.Also, if this was immediately going to be used as a query argument you could skip the step and use the string directly.