4 ms·
I really wanted to use Planetscale, but there are two blockers: - No foreign key support - No CTE support I tried using Planetscale knowing that there is no
by kbumsik 4y ago
I really wanted to use Planetscale, but there are two blockers:
- No foreign key support
- No CTE support
I tried using Planetscale knowing that there is no foreign key support because it is fine to me. But I had to stop using Planetscale because of the second. My ORM (ent for golang) relies on CTE so I simply cannot run complicated queries.
So if you are considering Planetscale, test it enough especially if you are using an ORM.
- aarondf 4y agoWe do support foreign keys, just not foreign key constraints. There's actually a video in the course that talks about the difference and why you might not need constraints: https://planetscale.com/courses/mysql-for-developers/indexes/foreign-keys https://planetscale.com/courses/mysql-for-developers/indexes.... Correct that we don't yet support CTEs. I'm surprised to hear of an ORM that relies on them! That's pretty cool, never heard of that.
- tbarn 4y agoI'd need to dig into the code, but it looks like someone has used PlanetScale with ent before: https://betterprogramming.pub/how-to-connect-ent-to-planetscale-in-a-go-application-c1337a54d2aa https://betterprogramming.pub/how-to-connect-ent-to-planetsc... Did you follow that blog post already?
- kbumsik 4y agoI just read this post, it looks like a demo for basic operations. When I tried it at the end of the last year, ent works fine with Planetscale for basic reads. However, it fails to read when I use complex queries with Ent GraphQL integration. ent added quite a lot of features last year so things might changed from the time when the blog post was written.