is there a way to use custom functions without raw sql?

i'm using functions from a postgres extension. is there a way to use them in queries without baking in raw sql?
2 Replies
dot
dotOP3w ago
db.insert(schema).values({name, structure: sql`custom_func(${structure}::cstring)`});
db.insert(schema).values({name, structure: sql`custom_func(${structure}::cstring)`});
oke
oke3w ago
I don't think you can. Drizzle ORM does not have knowledge of this function and wouldn't be able to infer types or give you a JavaScript-equivalent function for it. Custom sql is not that bad tbh
Want results from more Discord servers?
Add your server