aboutsummaryrefslogtreecommitdiff
path: root/src/database/sql/sql.go
diff options
context:
space:
mode:
authorDaniel Theophanes <kardianos@gmail.com>2016-11-23 09:10:30 -0800
committerBrad Fitzpatrick <bradfitz@golang.org>2016-12-01 16:52:12 +0000
commite5e05627745764fb9989bf3966919d6715f21abc (patch)
treea504ad49f44371aab7d2b62eeb92108e6470df5d /src/database/sql/sql.go
parentea1b90f855fe2891ff0f39d3a3f4b0a5f72a04ed (diff)
downloadgo-e5e05627745764fb9989bf3966919d6715f21abc.tar.xz
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>
Diffstat (limited to 'src/database/sql/sql.go')
-rw-r--r--src/database/sql/sql.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/database/sql/sql.go b/src/database/sql/sql.go
index a620707b2d..e11a9dadd0 100644
--- a/src/database/sql/sql.go
+++ b/src/database/sql/sql.go
@@ -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