Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielFGray committed Jun 27, 2024
1 parent c3ea620 commit 78b54e6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -347,9 +347,11 @@ Multiple fragments can be joined together with `sql.join` to create more complex

```js
// this could be built dynamically
const expressions = [sql`name is not null`, sql`age > 50`]
let expressions = [sql`name is not null`, sql`age > 50`]
const separator = and ? sql` and ` : sql` or `
sql`select * from from users where ${sql.join(separator, expressions)}`
sql`select * from from users where ${
sql.join(separator, expressions)
}`
```

### SQL functions
Expand Down

0 comments on commit 78b54e6

Please sign in to comment.