Add support for tagged SQL queries
Tagged SQL queries are queries constructed via ES6 tagged template
strings. For instance, one can do:
```js
var result = sql`SELECT ${1} AS "var"`;
```
The `sql` tag can transform the template string so that it returns
something like:
```js
var result = { query: 'SELECT ? AS "var"', values: [1] };
```
This makes it ideal for writing elegant SQL by passing the tagged query,
containing the `query` and `values` properties to `sequelize.query`.
Showing
with
29 additions
and
1 deletions
-
Please register or sign in to post a comment