Search
Setup for Free
DT
Drizzle Team
•
3y ago
kornel
inArray() using sql`` operator in JS and Postgres
Hey
, how do I use sql operator with arrays in JS
?
const array = [1,2,3]; const sqlQuery = sql`${users.id} IN ???`;
const array = [1,2,3]; const sqlQuery = sql`${users.id} IN ???`;
Drizzle Team
Join
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,794
Members
View on Discord
Similar Threads
Was this page helpful?
Yes
No
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
const
array
=
[
1
,
2
,
3
];
const
sqlQuery
=
sql
`${
users
.
id
} IN ???`
;
const
array
=
[
1
,
2
,
3
];
const
sqlQuery
=
sql
`${
users
.
id
} IN ???`
;
Similar Threads
Cannot use inArray in postgres.
DT
Drizzle Team / help
13mo ago
Using magic SQL operator with 2 SQL dbs
DT
Drizzle Team / help
11mo ago
Map casing when using sql`` operator
DT
Drizzle Team / help
3y ago
[Postgres] prepared with inArray & placeholder
DT
Drizzle Team / help
3y ago