Plans to add array related support for Postgres?
+ features to append an object to an array field in postgres?
4 Replies
Yeah, we have just added arrays as datatypes to schemas. No array specific functionality in queries for now but it is in our backlog
FWIW, you can specify any SQL for WHERE conditions with the
sql
tag. The only thing that cannot be achieved right now is partial updates on the array column - like updating a value for a certain index inside the array. Other than that, the array type is implemented and available.
So the queries from the screenshot can already be built with Drizzle. Is there anything specific you have troubles with?Yeah I was able to achieve it with custom
sql
@rushil1o1 Could you provide an example of how you were able to resolve this with a custom
sql
? All of my attempts have been met with PostgresError: malformed array literal
. I am able to successfully achieve this in Postgres directly, but there seem to be issues with Drizzle ORM converting the TS array into a string and escaping the quotations.
Being able to query by array comparison is essential for my use case, and if I cannot get it to work with Drizzle, I'll have to visit other options.