]> Cypherpunks repositories - gostls13.git/commitdiff
database/sql: force users of NamedParam to name struct literals fields
authorBrad Fitzpatrick <bradfitz@golang.org>
Thu, 24 Nov 2016 02:21:20 +0000 (02:21 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 24 Nov 2016 23:32:46 +0000 (23:32 +0000)
Or they can use sql.Param instead.

Change-Id: Icf21dbcc87170635c3f5d3f49736429a37abe9da
Reviewed-on: https://go-review.googlesource.com/33576
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Daniel Theophanes <kardianos@gmail.com>
Reviewed-by: Minux Ma <minux@golang.org>
src/database/sql/sql.go

index a02aa35b7be8508ec22a7043f557b552f43dbbe7..2a9ae0b95ae3e338b520d26832662079e4a9f1ad 100644 (file)
@@ -72,6 +72,8 @@ func Drivers() []string {
 // NamedParam may be passed into query parameter arguments to associate
 // a named placeholder with a value.
 type NamedParam struct {
+       _Named_Fields_Required struct{}
+
        // Name of the parameter placeholder. If empty the ordinal position in the
        // argument list will be used.
        Name string