Prisma w/pgvector
Hey, we got this t3 app, but Prisma does not support vectors when trying to query the column that's set to vector type (with pgvector database extension enabled). When trying to raw query instead it say's it's not able to serialize.
So therefore I tried to extend the prisma client with the custom query but there is absolutely no intellisense or types following my change, and I believe it must be because I'm not doing it correctly. Below in the comments I've attached the relevant files..
Please tell me if I'm missing a change somewhere.
2 Replies
prisma.schema
user router
:
I ended up using queryRaw and casting the response as text, so sort of a hack so I really hope Prisma starts to support a better way to handle unsupported types.
For anyone who is (probably) going to have the same problem as me, this is how I handle it: