-
Notifications
You must be signed in to change notification settings - Fork 862
CockroachDB connector #1705
Comments
This would be great! CockroachDB implements the PostgreSQL wire protocol, almost all of its syntax, and the majority of its data types like jsonb and arrays. As such, as long as no particularly obscure features are used, this should come for free with https://github.com/graphcool/prisma/issues/1641. |
Cockroachdb's underlying architecture is a k/v store which leads to poor join performance in the current release. Therefore I'd recommend to currently not invest into this. |
@jensneuse may be referring to https://www.cockroachlabs.com/blog/cockroachdbs-first-join/, which discusses the performance of CockroachDB's join implementation while it was in beta, about a year and a half ago. A lot has changed since then, and CockroachDB now has fully-distributed hash join, merge join, and lookup join implementations. |
@nvanbenschoten tried running Prisma 1.7.1 connecting to Cockroach as if it was Postgres and ran into the following issues:
|
Prisma is a dream to work with. The prospect of pairing it with an infinitely scalable DB like Coackroach and AWS Lamba / Zeit now / Apex Up seems like a dream come true from a developers perspective. Would love to see this implemented! |
We could probably work around the user-defined function if need be. We are using it to trigger an exception to roll back transactions. Is there another way to get this effect in CRDB? In MySql we started off with just using a hack (returning several values from a select when only one is allowed) to cause a rollback. select case
when exists( some query )
then 1
else (select COLUMN_NAME
from information_schema.columns
where table_schema = project)
end Maybe you have an idea what we could use to get the same effect in CRDB. We basically need the ability to cause a rollback based on the result of a query. |
Any updates on this, @nvanbenschoten @vilterp ? I'm about to launch my app in production and would love to do so with Cockroach. |
@do4gr CockroachDB has a function called @obibring unfortunately I don't know of any updates on our end. |
Thanks for the answer @nvanbenschoten , as soon as we start looking at a CockroachDB connector I'll see whether that is already enough to make it work. |
Hey folks i got prisma to run on cockroach with some simple changes today. I am not sure what works yet (needs some testing). If someone is interested i can push my fork do Dockerhub.
|
@flexzuu Nice! I'd definitely be interested in seeing this. Were all your changes on the Prisma side? |
@vilterp yep all changes where made in the postgresql connector for prisma. I have not looked into make production mode of cockroach work with prisma though (only |
Hey @flexzuu, that sounds awesome! If you want you can make a PR against our alpha branch. This will trigger our CI and if you rewrote the Postgres Connector we can tell you which tests still fail and maybe help you out with the ones that are broken. |
Is there any high-level timeline for when work will begin on this? I'd really love to see it land especially since its low hanging fruit! |
@flexzuu knock knock :)I can help if needed for cockroachdb. |
Cockroach currently does not support the |
All I want for Christmas is this :( |
Has anyone tried using |
Any progress or perspective for future? |
This would be a truly amazing integration, CRDB+Prisma would be a distributed dream. |
Any progress or news for this amazing feature? |
I think it might be a giveaway if the frigging founder of cockroachdb is speaking on prisma day :] |
@flexzuu could you please share the changes you made to get this going? |
Hey all, I work at Cockroach Labs - we're definitely interested in helping get this work going! Who should I talk to about this? Maybe @mavilein? |
Hey @jordanlewis 👋 , |
@mavilein It does not, as we use schemas and CockroachDB does not support creating schemas, it just has the default schema 'public' already available. This happens for both Prisma 1 and Prisma 2.
|
@steebchen : If Cockroach does not support it you shoud also not try to create the schema. It would try to do this:
|
I implemented your suggestions but it still fails with the same error: datasource db {
provider = "postgres"
url = "postgresql://root@localhost:26257/postgres?sslmode=disable&schema=public"
}
since this is prisma 2, tracking is continued in https://github.com/prisma/prisma2/issues/1353 |
This feature requests serves as a central place to discuss development and progress for the CockroachDB connector.
The text was updated successfully, but these errors were encountered: