Open Cauen opened 1 week ago
There seems to be code in your repo now and this comment doesn't seem to match the readme, e.g. you don't mention the postgres notify setup in the README.
Are the setup instructions still the same as above?
Hello @hongkongkiwi
you don't mention the postgres notify setup in the README.
You dont need to setup this, the extension will perform this :D
Fantastic! I'm very excited about this extension, really great work.
Hello there, although this and https://github.com/prisma/prisma/issues/905 are both very old and popular issues, apparently they won't be in the Prisma team's sights in the near future.
Fortunately, I think it is possible to make a simple yet good solution (at least for Postgres) by combining prisma custom generator + auto generated triggers with pg_notify + prisma extension
I won't be able to implement it at the moment, but I'll drop the idea and I'd be very happy to hear your opinion (I will create a repository and an issue for anyone who wants to discuss without polluting this issue)
The idea
pnpm i prisma-generator-postgres-realtime
CREATE OR REPLACE TRIGGER usertableupdate AFTER INSERT OR UPDATE OR DELETE ON "Document" FOR EACH ROW EXECUTE FUNCTION notify_event_trigger();
So the code under the extension will perform operations like this:
In this way we can:
I would love to hear counterpoints and opinions here.