Skip to content

Commit 2a634df

Browse files
committed
Fix sentence in interpolateParams document.
1 parent 52a5860 commit 2a634df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ Valid Values: true, false
190190
Default: false
191191
```
192192

193-
When `interpolateParams` is true, calls to `sql.Db.Query()` and `sql.Db.Exec()` with params interpolates placeholders (`?`) with given params. This reduces roundtrips to database compared with `interpolateParams=false` since it uses prepare, exec and close to support parameters.
193+
If `interpolateParams` is true, placeholders (`?`) in calls to `db.Query()` and `db.Exec()` are interpolated into a single query string with given parameters. This reduces the number of roundtrips, since the driver has to prepare a statement, execute it with given parameters and close the statement again with `interpolateParams=false`.
194194

195195
NOTE: *This may introduce a SQL injection vulnerability when connection encoding is multibyte encoding except for UTF-8 (e.g. CP932)!*
196196
(See http://stackoverflow.com/a/12118602/3430118)

0 commit comments

Comments
 (0)