Replies: 2 comments 3 replies
-
The documentation is lacking, I was thinking maybe contributing few wiki pages with basics, do you like the idea or maybe you have some other plans (like |
Beta Was this translation helpful? Give feedback.
0 replies
-
Pointer to pointer just the following: var s *string
conn.QueryRow(...).Scan(&s) If a NULL is scanned then s will be set to nil. If a non-NULL is scanned then a string will be allocated and s will pointer to it. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey,
I am converting our project from database/sql and sqlx to pgx/scany. We use sql.NullXXX for some types and I saw these in pgx tests too, so I assume they will work. But I also saw "NULL mapping to pointer to pointer" in the README. Tho I can't find anything relevant in the codebase
How does this work?
Is it any better than sql.NullXXX types?
Does it work nicely with JSON marshaling?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions