how to do ANY

need to do where 'myvariable' = ANY(mycolumn)
.where(sql`'myvariable' = ANY(${mycolumn})`)
ASAndrii Sherman4/14/2023
I guess myvariable also should be in ${}
.where(sql`${myvariable} = ANY(${mycolumn})`)
yeah that's what I did but was wondering if there was a more native way got it
you can make a helper function
oh true

Looking for more? Join the community!

Want results from more Discord servers?
Add your server
Recommended Posts
[BUG?] Postgres transactions throwing connection timeouts after a lot of queriesI think there's a syntax error in Postgres transactions ----> see screenshot cc: @bloberenoberUnique Key SchemaI am trying to create an unique key on a table using a custom schema, the generated sql migration fisqliteTable wrapper which modifies fields, with proper typesMore of a TypeScript question, but I'm trying to create a wrapper for sqliteTable to add a set of stHow to count joined table?I'm trying to count rows returned by join for a query, basically the same as this: https://dba.stackConfig in Typescript?Hello, after upgrading drizzle-kit to 0.17.4 my `drizzle.config.ts` file stopped working. Is it now Problem running a migrationHello there, I'm currently facing an issue with a database migration. I have two simple tables definHow do I connect to sqlite on followed the instructions on on how to setup a project using sqlite. I believe I did it allEnumsCan pgEnum be converted to zod enums?Typescript build fails with large number of columnsI have a table with ~460 columns, and on trying to run typescript on my app, I'm getting "error TS25many-to-one transactionHello, I want to create transaction involving arbitrary number of inserts. For example, Artist (one[BUG] drizzle-kit doesn't like imports outside of a module`npx drizzle-kit generate:pg drizzle-kit: v0.17.4 drizzle-orm: v0.23.10 C:\Users\Abdul\Documents\Gidrizzle-kit throwing await is not available in the configured target environmentHi, when using the generate:pg command i am getting this error: **'Top-level await is not available [Bug] Postgres migrations are broken on 0.23.10Re-running the same postgres migration twice just throws an error that a particular table already exdrizzle-kit doesn't pull foreign keys from supabase/postgres?It's hard to really turn this into a proper bug report because, honestly, with Supabase there could Why does drizzle-zod create ZodString's instead of z.ZodStrings for mySQL?I was testing out drizzle-zod for mySQL, and I know it's still actively being worked on. It seems liQuery for Prisma like insert in multiple joined tablesIs there a way to achieve insert in multiple tables joined by foreign keys in one query like Prisma?