-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Cassandra/ScyllaDB #2879
Comments
I am working on a large enterprise-embeddd application where Scylla already has a presence. This feature would really help promote Prisma in that application. |
Is there any comment on this from the Prisma team? For our project, we've had to move from Postgres to Cassandra, and would like to continue using Prisma. |
I would really appreciate some initial documentation on how to contribute to add support to other databases, I'm specially interested on Cassandra support and I would like to start this. Is there a documentation on how to start a new data provider? |
Same here, if this needs to be in the community, would be great to have some documentation on how it could be provided by the community. |
Chiming in my support for this from the ScyllaDB community. I've shared with our Pythonistas. The Rustaceans are already ahead in this race. q.v., Catalytic, the Rust ORM for Cassandra/ScyllaDB: https://www.scylladb.com/2022/02/15/introducing-catalytic-an-orm-designed-for-scylladb-and-cassandra-written-in-rust/ |
That there already is a working Rust driver for Cassandra/ScyllaDB is of course great - as that is what we would need in Prisma to be able to create a connector. |
Bump!! Hope this issue is still alive! Really need Prisma to support Cassandra. |
Bump |
Cassandra PLEASE! |
@timsuchanek Please add this for TS and JS too, Cassandra is just too good to not use! |
Let's see what we can do about it. :p |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as abuse.
This comment was marked as abuse.
This comment was marked as off-topic.
This comment was marked as off-topic.
Can we expect to see this anytime soon? This would be an excellent feature. |
Would love to see this happen soon, Cassandras performance makes the world go round. |
Currently, we have no plans to add support for Cassandra to Prisma ORM. What could generally be useful here, is your idea how Prisma would work with Cassandra. I only know that CQL is close-ish to SQL, but still very different.
|
you can see express-cassandra for prisma requirement
find query
select coll
|
@janpio How would one go about implementing this from the open-source side of things? |
Hey guys! Dev Advocate from ScyllaDB here! CQL is suppose to have an easier implementation comparing to SQL since you don't have "Join" statements. It doesn't change so much from SQL schema tbh. There's a few keywords and properties that will need to work on related to grammar, like:
I can help with that if possible! I've been studying this type of implementation in a different project (PHP Eloquent with CQL). |
@danielhe4rt Great to hear your experience on implementing things like this. |
We at Prisma are currently not that interested in adding support for Cassandra/ScyllaDB in our codebase, as we are super busy with our existing bugs and feature requests for existing databases. We just can't further increase our surface area. Hence the best approach would be to fork our You will probably have to touch roughly all the components of our engines to add support for a new provider, its types, the validations, migrations, introspection - and most importantly of course the generation of queries and handling of the requests to the database and the data returned. (You could skip migrations and introspection technically if you are ok with managing the actual database by hand, and making sure the Prisma schema matches the database schema as well.) |
@janpio I would like to ask where Cassandra comes in to play now that you guys are working on Neon and Planetscale database drivers. This is a different direction than the sentiment that you explain above (no more databases) and would like to better understand where Prisma's mind is about supporting this technology. Thanks! |
Neon and PlanetScale use PostgreSQL and MySQL dialects, and are already supported by Prisma via direct TCP connections. This new release adds support for their serverless drivers, which communicate via HTTP and Websockets. Technically, we could now also build a driver adapter that talks to a Node Cassandra client/library - but we could only send it SQL queries we generate for one of our supported database SQL dialects (PostgreSQL, MySQL, SQL Server, SQLite). As far as I know, that is unfortunately not an option that would work for Cassandra. Correct? |
@janpio Not total true but ultimately joins specifically will be the issue as cassandra does not support them. Other then that CQL and SQL are very similar as CQL is a superset of SLQ. The biggest difference is in creating the database and joins as mentioned above. I would love to see this technology supported as would all of these people in the Cassandra community. The modern development landscape is rapidly evolving, yet the support for Cassandra hasn't kept pace, creating a significant gap in the ecosystem. Currently, developers are cornered into using Stargate and Mongoose, which although functional, is a very cumbersome workflow especially when compared with the experience offered by Prisma. This unfortunately makes it a non-option for many founders and developers. I firmly believe that with Prisma's support, Cassandra's adoption would become a viable option amongst developers, leading to a bettor, more robust ecosystem. I would at least like to request that it be considered for future developments. |
We hear you. But adding another dialect of SQL (for relational databases) or commands (for MongoDB) is a significant investment from our side. It touches all areas of our tooling, so also requires people from all teams to get involved - hence currently it is not a priority for us. We have too much work in making our existing users, or potential users, for our existing databases happy - see all the other issues around here. (We're continuing to invest in approaches like Client Extensions or Driver Adapters that potentially will open the route for user contributions to add support for databases in the future, in a simpler way than it is already possible via |
That being said: https://www.webcomand.com/docs/language/cql/cql_vs_sql/index.html is indeed a super interesting link. One could imagine a driver adapter that gets the normal SQL, and then has a light translation layer to adopt to cQL, and then uses a native driver to execute these cQL queries. I am unclear after reading the limitations on https://www.scylladb.com/glossary/cassandra-query-language-cql/ though if that is actually possible. |
@janpio Thank you for at least listening and letting us know that you hear us. I could also see doing a light transitions layer that would convert SQL to CQL, but it would be a "hack" around fully supporting it. |
This feature request serves as a central place to discuss development and progress for Cassandra support.
The text was updated successfully, but these errors were encountered: