Browse files

Add note about handling of non-string data values used in prepared qu…

…eries
  • Loading branch information...
1 parent 536b7c4 commit 186a8d0ee661141c4ee32033eda3139698760d98 @mscdex committed Sep 13, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 README.md
View
2 README.md
@@ -301,7 +301,7 @@ Client methods
* **query**(<_string_>query[, <_mixed_>values[, <_boolean_>useArray=false]]) - <_Results_> - Enqueues the given `query` and returns a _Results_ object. `values` can be an object or array containing values to be used when replacing placeholders in `query` (see prepare()). If `useArray` is set to true, then an array of field values are returned instead of an object of fieldName=>fieldValue pairs. (Note: using arrays performs much faster)
-* **prepare**(<_string_>query) - <_function_> - Generates a re-usable function for `query` when it contains placeholders (can be simple `?` position-based or named `:foo_bar1` placeholders or any combination of the two). In the case that the function does contain placeholders, the generated function is cached per-connection if it is not already in the cache (currently the cache will hold at most **30** prepared queries). The returned function takes an object or array and returns the query with the placeholders replaced by the values in the object or array.
+* **prepare**(<_string_>query) - <_function_> - Generates a re-usable function for `query` when it contains placeholders (can be simple `?` position-based or named `:foo_bar1` placeholders or any combination of the two). In the case that the function does contain placeholders, the generated function is cached per-connection if it is not already in the cache (currently the cache will hold at most **30** prepared queries). The returned function takes an object or array and returns the query with the placeholders replaced by the values in the object or array. **Note:** Every value is converted to a (utf8) string when filling the placeholders.
* **escape**(<_string_>value) - <_string_> - Escapes `value` for use in queries. **_This method requires a live connection_**.

0 comments on commit 186a8d0

Please sign in to comment.