database/sql: document expectations for named parameters

Require parameter names to not begin with a symbol.

Change-Id: I5dfe9d4e181f0daf71dad2f395aca41c68678cbe
Reviewed-on: https://go-review.googlesource.com/33493
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Daniel Theophanes 2016-11-23 09:10:30 -08:00 committed by Brad Fitzpatrick
parent ea1b90f855
commit e5e0562774
5 changed files with 35 additions and 9 deletions

View file

@ -76,6 +76,8 @@ type NamedArg struct {
// Name of the parameter placeholder. If empty the ordinal position in the
// argument list will be used.
//
// Name must omit any symbol prefix.
Name string
// Value of the parameter. It may be assigned the same value types as