Selaa lähdekoodia

Fix sentence in interpolateParams document.

INADA Naoki 11 vuotta sitten
vanhempi
commit
2a634df783
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      README.md

+ 1 - 1
README.md

@@ -190,7 +190,7 @@ Valid Values:   true, false
 Default:        false
 ```
 
-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.
+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`.
 
 NOTE: *This may introduce a SQL injection vulnerability when connection encoding is multibyte encoding except for UTF-8 (e.g. CP932)!*
 (See http://stackoverflow.com/a/12118602/3430118)