Skip to content

Commit

Permalink
docs: generate docs
Browse files Browse the repository at this point in the history
  • Loading branch information
gajus committed Feb 28, 2019
1 parent 0e2c475 commit 32bfe82
Showing 1 changed file with 33 additions and 1 deletion.
34 changes: 33 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1229,7 +1229,39 @@ Produces:
```js
{
sql: 'SELECT 1 FROM "bar"."bar", "qux"."quux"',
sql: 'SELECT 1 FROM "bar"."baz", "qux"."quux"',
values: []
}

```
<a name="slonik-value-placeholders-sql-identifierlist-identifier-aliases"></a>
#### Identifier aliases
A member of the identifier list can be aliased:
```js
sql`
SELECT 1
FROM ${sql.identifierList([
{
alias: 'qux',
identifier: ['bar', 'baz']
},
{
alias: 'corge',
identifier: ['quux', 'quuz']
}
])}
`;

```
Produces:
```js
{
sql: 'SELECT 1 FROM "bar"."baz" "qux", "quux"."quuz" "corge"',
values: []
}

Expand Down

0 comments on commit 32bfe82

Please sign in to comment.