Skip to content

Commit 63f3212

Browse files
committed
Add where in example - Fixes porsager#39
1 parent 06f5564 commit 63f3212

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

+13
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,19 @@ const users = await sql`
113113

114114
```
115115

116+
Arrays will be handled by replacement parameters too, so `where in` queries are also simple.
117+
118+
```js
119+
120+
const users = await sql`
121+
select
122+
*
123+
from users
124+
where age in (${ [68, 75, 23] })
125+
`
126+
127+
```
128+
116129
## Stream ```sql` `.stream(fn) -> Promise```
117130

118131
If you want to handle rows returned by a query one by one, you can use `.stream` which returns a promise that resolves once there are no more rows.

0 commit comments

Comments
 (0)