stalniy / ucast

Conditions query translator for everything
Apache License 2.0
194 stars 19 forks source link

Feature Request: Prisma interpreter #16

Closed cyrus-za closed 3 years ago

cyrus-za commented 3 years ago

prisma.io is a next-gen ORM which talks to various SQL DBs. I am currently using CASL with Prisma and would love to replace my current manual code with ucast.

stalniy commented 3 years ago

Thanks for the issue.

Frankly speaking, I don't plan to support prisma in the foreseen future. But you can implement your own interpreter, this is not so hard. Take a look at how ucast/js or ucast/sql is written and make similar one for prisma.

I think that the best way to handle this is to use a custom class (the same way as in ucast/sql) which aggregates single query from different operators and expose the aggregated result at the end.

cyrus-za commented 3 years ago

Thanks, I will take a look