Browse Source

Fix sentence in interpolateParams document.

INADA Naoki 11 năm trước cách đây
mục cha
commit
2a634df783
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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)