Live data from Hacker News

A Principled Approach to Querying Data – A Type-Safe Search DSL

claudiu-ivan.com

11–20 of 22 posts

Re: A Principled Approach to Querying Data – A Type-Safe Search DSL

#13
post #10

Earlier quoted context omitted.

I am using both prisma and kysely in the same codebase with a great success. The db schema is driven by SQL, not prisma. It is then introspected by both kysely and prisma, prisma is used in 95% of the places while kysely is used whenever performance is critical or when prisma doesn't support the SQL features we need.

any underlying negative consequences on letting prisma schema handle the underlynig model/migrations I found out about stackzen yesterday, really like the RBAC/ABAC backed up into the models/codegen stuff, been thinking about just using that for our custom logic and maybe add RLS pg a la supabase but also codegen from the same .zmodel from zenstack model that generates prisma models/migrations have it generate RLS sq…

what is stackzen? I googled it and found nothing

Re: A Principled Approach to Querying Data – A Type-Safe Search DSL

#14
post #10

Earlier quoted context omitted.

any underlying negative consequences on letting prisma schema handle the underlynig model/migrations I found out about stackzen yesterday, really like the RBAC/ABAC backed up into the models/codegen stuff, been thinking about just using that for our custom logic and maybe add RLS pg a la supabase but also codegen from the same .zmodel from zenstack model that generates prisma models/migrations have it generate RLS sq…

what is stackzen? I googled it and found nothing

is it this? https://github.com/stacksjs/stacks

Re: A Principled Approach to Querying Data – A Type-Safe Search DSL

#15
post #10

Earlier quoted context omitted.

any underlying negative consequences on letting prisma schema handle the underlynig model/migrations I found out about stackzen yesterday, really like the RBAC/ABAC backed up into the models/codegen stuff, been thinking about just using that for our custom logic and maybe add RLS pg a la supabase but also codegen from the same .zmodel from zenstack model that generates prisma models/migrations have it generate RLS sq…

what is stackzen? I googled it and found nothing

It's most probably ZenStack given the description: https://zenstack.dev/

Re: A Principled Approach to Querying Data – A Type-Safe Search DSL

#16
I've got a similar project that includes a React component for the search input. The React component is actually a Monaco text editor so you get syntax highlighting, error highlighting, tab completion and more.

Check it out here: https://github.com/williamcotton/search-input-query

There's an animated GIF of the demo so you can get a very quick idea of how it works!

Re: A Principled Approach to Querying Data – A Type-Safe Search DSL

#17
post #10

Earlier quoted context omitted.

I am using both prisma and kysely in the same codebase with a great success. The db schema is driven by SQL, not prisma. It is then introspected by both kysely and prisma, prisma is used in 95% of the places while kysely is used whenever performance is critical or when prisma doesn't support the SQL features we need.

any underlying negative consequences on letting prisma schema handle the underlynig model/migrations I found out about stackzen yesterday, really like the RBAC/ABAC backed up into the models/codegen stuff, been thinking about just using that for our custom logic and maybe add RLS pg a la supabase but also codegen from the same .zmodel from zenstack model that generates prisma models/migrations have it generate RLS sq…

Prisma doesn't cover plenty of SQL features. custom types, more complex indexes (like where clause). It is also a VC backed biznes, need to be ready to drop it at almost any time, SQL/postgres on the other hand is here to stay.

RLS is hard to work with, hard to debug, hard to reason about, cumbersome. It is however powerful.

Post reply on HN