We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9c88ed5 commit 222c873Copy full SHA for 222c873
1 file changed
README.md
@@ -181,6 +181,16 @@ You also have the option (but are not required) to pass in `stringifyObject` and
181
allowing you provide a custom means of turning objects into strings, as well as a
182
location-specific/timezone-aware `Date`.
183
184
+This can be further combined with the `SqlString.raw()` helper to generate SQL
185
+that includes MySQL functions as dynamic vales:
186
+
187
+```js
188
+var userId = 1;
189
+var data = { email: 'foobar@example.com', modified: SqlString.raw('NOW()') };
190
+var sql = SqlString.format('UPDATE ?? SET ? WHERE `id` = ?', ['users', data, userId]);
191
+console.log(sql); // UPDATE `users` SET `email` = 'foobar@example.com', `modified` = NOW() WHERE `id` = 1
192
+```
193
194
## License
195
196
[MIT](LICENSE)
0 commit comments