ldbc (Lepus Database Connectivity) is Pure functional JDBC layer with Cats Effect 3 and Scala 3.
ldbc is Created under the influence of tapir, a declarative, type-safe web endpoint library. Using tapir, you can build type-safe endpoints and also generate OpenAPI documentation from the endpoints you build.
ldbc allows the same type-safe construction with Scala at the database layer and document generation using the constructed one.
Note
ldbc is pre-1.0 software and is still undergoing active development. New versions are not binary compatible with prior versions, although in most cases user code will be source compatible.
Please drop a ⭐ if this project interests you. I need encouragement.
Module / Platform | JVM | Scala Native | Scala.js |
---|---|---|---|
ldbc-core |
✅ | ✅ | ✅ |
ldbc-sql |
✅ | ✅ | ✅ |
ldbc-query-builder |
✅ | ✅ | ✅ |
ldbc-dsl |
✅ | ❌ | ❌ |
ldbc-schemaSpy |
✅ | ❌ | ❌ |
ldbc-codegen |
✅ | ✅ | ✅ |
ldbc-hikari |
✅ | ❌ | ❌ |
ldbc-plugin |
✅ | ❌ | ❌ |
ldbc-connector |
✅ | ✅ | ✅ |
Creating a MySQL connector project written in pure Scala3.
JVM, JS and Native platforms are all supported.
Important
ldbc is currently focused on developing connectors written in pure Scala3 to work with JVM, JS and Native. In the future, we also plan to rewrite existing functions based on a pure Scala3 connector.
- Support for mysql_native_password plugin
- Support for sha256_password plugin
- Support for caching_sha2_password plugin
- SSL/TLS support
- RSA authentication method support
- Establish connection specifying database
- Statement
- PreparedStatement
- CallableStatement
- ResultSet Insert/Update/Delete
- Read Only setting function
- Auto Commit setting function
- Transaction isolation level setting function
- Commit function
- Rollback function
- Savepoint function
- Failover Countermeasures
- Comparison with JDBC
- Comparison with other MySQL Scala libraries
- Verification of operation in AWS and other infrastructure environments
- Integration into existing functions
- Additional streaming implementation
- Support for other effects systems
- Integration with java.sql API
- etc...
All suggestions welcome :)!
If you’d like to contribute, see the list of issues and pick one! Or report your own. If you have an idea you’d like to discuss, that’s always a good option.
If you have any questions about why or how it works, feel free to ask on github. This probably means that the documentation, scaladocs, and code are unclear and can be improved for the benefit of all.
If you want to build and run the tests for yourself, you'll need a local MySQL database. The easiest way to do this is to run docker-compose up
from the project root.