Skip to content
/ ldbc Public

ldbc is Pure functional JDBC layer with Cats Effect 3 and Scala 3.

License

Notifications You must be signed in to change notification settings

takapi327/ldbc

Repository files navigation

LDBC

LDBC

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.

Modules availability

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

Documentation

Features/Roadmap

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.

Implementation of Authentication Function

  • 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

Sending SQL statements to a database

  • Statement
  • PreparedStatement
  • CallableStatement
  • ResultSet Insert/Update/Delete

Transaction function implementation

  • Read Only setting function
  • Auto Commit setting function
  • Transaction isolation level setting function
  • Commit function
  • Rollback function
  • Savepoint function

Utility Commands

Connection pooling implementation

  • Failover Countermeasures

Performance Verification

  • Comparison with JDBC
  • Comparison with other MySQL Scala libraries
  • Verification of operation in AWS and other infrastructure environments

Other

  • Integration into existing functions
  • Additional streaming implementation
  • Support for other effects systems
  • Integration with java.sql API
  • etc...

Contributing

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.

Testing locally

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.