drizzle-orm icon indicating copy to clipboard operation
drizzle-orm copied to clipboard

[FEATURE]: `inArray` with composite keys

Open spiffytech opened this issue 1 year ago • 0 comments

Describe want to want

I have a table with composite primary key (job, key). I'd like to be able to run

query.where(inArray(
  [table.job, table.key],
  values
))

I can't see how to make this work with Drizzle's query builder: passing an array of columns to inArray gives TS error no overload matches this call.

Right now I'm getting this done with raw SQL:

query.where(sql`(job, key) in ${values}`)

I'm using Drizzle with better-sqlite3.

spiffytech avatar Apr 30 '23 15:04 spiffytech