Looks great! Typelevel is really missing out on some quickstart ORM-like libs.
I tried to write something slightly similar some time ago and ended up with skunk-tables, which I don’t have time to maintain right now.
I think LDBC can borrow at least the syntax for default tables - in skunk-tables you don’t have to always describe the precise DB types and constraints, but it infers the some sensible ones.
Hi!
LDBC now supports Scala.js and Scala Native, not just JVM!
To connect to a MySQL database in Scala, you need to use JDBC, which is a standard Java API that can also be used in Scala.
Since JDBC is implemented in Java, it can only be used in the JVM environment when used in Scala.
Therefore, connecting to MySQL using JDBC is not available in Scala.js and Scala Native.
LDBC has developed a new connector that connects to the MySQL server in pure Scala3 so that it can work with Scala.js, Scala Native.
This is still an experimental feature and an alpha release, but it is available in the following versions.
The LDBC connector is the lowest layer API.
We plan to use this connector to provide higher-layer APIs in the future. We also plan to make it compatible with existing higher-layer APIs.
LDBC used the Skunk project as a reference in creating its own MySQL connector.
We would like to thank the team for creating this wonderful project called Skunk!
I can’t speak authoritatively, but glancing around the code it appears to be written in good, effect-neutral style – pretty much orthodox cats-effect. So I would give decent odds that it works with ZIO if you have the right abstractions available.
Hm… could this also work with ZIO? Or its cats baked into the core od the library?
Currently it is only available in Cats Effect.
I would like to be able to work with ZIO.
However, I have never touched ZIO myself, and there are still many things to be developed regarding the MySQL connector, so I have not yet started.
Once we have created some MySQL connector functionality, we will begin to consider support for ZIO.
Must mention, as an existing Skunk user, Skunk Tables looks nice, if a bit early for non-experimental use
I encourage you to keep it aligned with Skunk as it evolves towards 1.x (seems you are).
Postgres is where it’s at for me (well, perhaps CockroachDB but same difference from Skunk’s POV). MySQL I’d use when someone is paying me to.
I always had a soft spot for Hibernate ORM. Seems to have a terrible reputation, but I must have had the rare luck to work in a team that understood how to use it correctly. We didn’t spend all day fighting it…