iked...@gmail.com
unread,Jan 15, 2022, 5:19:44 PM1/15/22Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to awpri...@gmail.com, golan...@googlegroups.com, brad...@golang.org, r...@golang.org, rogp...@gmail.com, re...@codereview-hr.appspotmail.com
Hi,
I believe this feature works perfect (and really useful! Thanks!).
https://go.dev/play/p/oN8MLbd_T_L
But somehow it doesn't look documented anywhere.
I plan to add following descriptions to
https://github.com/golang/go/wiki/SQLInterface ("Dealing with NULL"
section):
----
You can also pass pointer types. Be careful for performance issues as it
requires extra memory allocations.
```go
var name *string
err := db.QueryRowContext(ctx, "SELECT name FROM names WHERE id = $1",
id).Scan(&name)
```
----
That's a Wiki and provides no reviewing system, and I want this reviewed
before publish.
Let me know if this feature should not be documented for some reason.
https://codereview.appspot.com/5630052/