{"id":22919358,"url":"https://github.com/takapi327/ldbc","last_synced_at":"2026-05-23T12:01:40.977Z","repository":{"id":208455706,"uuid":"598084692","full_name":"takapi327/ldbc","owner":"takapi327","description":"ldbc is Pure functional JDBC layer with Cats Effect 3 and Scala 3.","archived":false,"fork":false,"pushed_at":"2026-05-20T14:43:45.000Z","size":13514,"stargazers_count":95,"open_issues_count":13,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-05-20T19:16:38.061Z","etag":null,"topics":["cats-effect","cats-effect-3","database","dotty","functional-programming","jdbc","mysql","sbt","sbt-plugin","scala","scala3","typelevel"],"latest_commit_sha":null,"homepage":"https://takapi327.github.io/ldbc/","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/takapi327.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-02-06T11:15:08.000Z","updated_at":"2026-05-20T14:39:53.000Z","dependencies_parsed_at":"2025-05-31T13:33:04.339Z","dependency_job_id":"89b8810d-600e-4225-b509-423a2e7e538a","html_url":"https://github.com/takapi327/ldbc","commit_stats":null,"previous_names":["takapi327/ldbc"],"tags_count":39,"template":false,"template_full_name":null,"purl":"pkg:github/takapi327/ldbc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takapi327%2Fldbc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takapi327%2Fldbc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takapi327%2Fldbc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takapi327%2Fldbc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/takapi327","download_url":"https://codeload.github.com/takapi327/ldbc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takapi327%2Fldbc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33394672,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-23T04:15:53.637Z","status":"ssl_error","status_checked_at":"2026-05-23T04:15:53.242Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cats-effect","cats-effect-3","database","dotty","functional-programming","jdbc","mysql","sbt","sbt-plugin","scala","scala3","typelevel"],"created_at":"2024-12-14T07:11:49.792Z","updated_at":"2026-05-23T12:01:40.970Z","avatar_url":"https://github.com/takapi327.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ldbc (Lepus Database Connectivity)\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg alt=\"ldbc\" src=\"./lepus_logo.png\"\u003e\n\u003c/div\u003e\n\n[![Continuous Integration](https://github.com/takapi327/ldbc/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/takapi327/ldbc/actions/workflows/ci.yml)\n[![codecov](https://codecov.io/gh/takapi327/ldbc/graph/badge.svg?token=GFI6HQ98QO)](https://codecov.io/gh/takapi327/ldbc)\n[![MIT License](https://img.shields.io/badge/license-MIT-green)](https://en.wikipedia.org/wiki/MIT_License)\n[![Scala Version](https://img.shields.io/badge/scala-v3.3.x-red)](https://github.com/lampepfl/dotty)\n[![Typelevel Affiliate Project](https://img.shields.io/badge/typelevel-affiliate%20project-FF6169.svg)](https://typelevel.org/projects/affiliate/)\n[![javadoc](https://img.shields.io/badge/javadoc-0.6.0-brightgreen.svg?label=Scaladoc)](https://javadoc.io/doc/io.github.takapi327/ldbc-dsl_3)\n[![Maven Central Version](https://img.shields.io/maven-central/v/io.github.takapi327/ldbc-dsl_3?color=blue)](https://central.sonatype.com/artifact/io.github.takapi327/ldbc-dsl_3)\n[![scaladex](https://index.scala-lang.org/takapi327/ldbc/ldbc-dsl/latest-by-scala-version.svg?color=blue)](https://index.scala-lang.org/takapi327/ldbc)\n[![scaladex](https://index.scala-lang.org/takapi327/ldbc/ldbc-dsl/latest-by-scala-version.svg?color=blue\u0026targetType=js)](https://index.scala-lang.org/takapi327/ldbc)\n[![scaladex](https://index.scala-lang.org/takapi327/ldbc/ldbc-dsl/latest-by-scala-version.svg?color=blue\u0026targetType=native)](https://index.scala-lang.org/takapi327/ldbc)\n\nldbc (Lepus Database Connectivity) is Pure functional JDBC layer with Cats Effect 3 and Scala 3.\n\nldbc is a [Typelevel](http://typelevel.org/) project. This means we embrace pure, typeful, functional programming, and provide a safe and friendly environment for teaching, learning, and contributing as described in the Scala [Code of Conduct](http://scala-lang.org/conduct.html).\n\n\u003e [!NOTE]\n\u003e **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.\n\nPlease drop a :star: if this project interests you. I need encouragement.\n\n## Modules availability\n\nldbc is available on the JVM, Scala.js, and ScalaNative\n\n| Module / Platform                | JVM | Scala Native | Scala.js | Scaladoc                                                                                                                                                              |\n|----------------------------------|:---:|:------------:|:--------:|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `ldbc-sql`                       |  ✅  |      ✅       |    ✅     | [![Scaladoc](https://img.shields.io/badge/javadoc-0.6.0-brightgreen.svg?label=Scaladoc)](https://javadoc.io/doc/io.github.takapi327/ldbc-sql_3)                       |\n| `ldbc-core`                      |  ✅  |      ✅       |    ✅     | [![Scaladoc](https://img.shields.io/badge/javadoc-0.6.0-brightgreen.svg?label=Scaladoc)](https://javadoc.io/doc/io.github.takapi327/ldbc-core_3)                      |\n| `ldbc-connector`                 |  ✅  |      ✅       |    ✅     | [![Scaladoc](https://img.shields.io/badge/javadoc-0.6.0-brightgreen.svg?label=Scaladoc)](https://javadoc.io/doc/io.github.takapi327/ldbc-connector_3)                 |\n| `jdbc-connector`                 |  ✅  |      ❌       |    ❌     | [![Scaladoc](https://img.shields.io/badge/javadoc-0.6.0-brightgreen.svg?label=Scaladoc)](https://javadoc.io/doc/io.github.takapi327/jdbc-connector_3)                 |\n| `ldbc-dsl`                       |  ✅  |      ✅       |    ✅     | [![Scaladoc](https://img.shields.io/badge/javadoc-0.6.0-brightgreen.svg?label=Scaladoc)](https://javadoc.io/doc/io.github.takapi327/ldbc-dsl_3)                       |\n| `ldbc-statement`                 |  ✅  |      ✅       |    ✅     | [![Scaladoc](https://img.shields.io/badge/javadoc-0.6.0-brightgreen.svg?label=Scaladoc)](https://javadoc.io/doc/io.github.takapi327/ldbc-statement_3)                 |\n| `ldbc-query-builder`             |  ✅  |      ✅       |    ✅     | [![Scaladoc](https://img.shields.io/badge/javadoc-0.6.0-brightgreen.svg?label=Scaladoc)](https://javadoc.io/doc/io.github.takapi327/ldbc-query-builder_3)             |\n| `ldbc-schema`                    |  ✅  |      ✅       |    ✅     | [![Scaladoc](https://img.shields.io/badge/javadoc-0.6.0-brightgreen.svg?label=Scaladoc)](https://javadoc.io/doc/io.github.takapi327/ldbc-schema_3)                    |\n| `ldbc-codegen`                   |  ✅  |      ✅       |    ✅     | [![Scaladoc](https://img.shields.io/badge/javadoc-0.6.0-brightgreen.svg?label=Scaladoc)](https://javadoc.io/doc/io.github.takapi327/ldbc-codegen_3)                   |\n| `ldbc-plugin`                    |  ✅  |      ❌       |    ❌     | [![Scaladoc](https://img.shields.io/badge/javadoc-0.6.0-brightgreen.svg?label=Scaladoc)](https://javadoc.io/doc/io.github.takapi327/ldbc-plugin_2.12_1.0)             |\n| `ldbc-zio-interop`               |  ✅  |      ❌       |    ✅     | [![Scaladoc](https://img.shields.io/badge/javadoc-0.6.0-brightgreen.svg?label=Scaladoc)](https://javadoc.io/doc/io.github.takapi327/ldbc-zio-interop_3)               |\n| `ldbc-authentication-plugin`     |  ✅  |      ✅       |    ✅     | [![Scaladoc](https://img.shields.io/badge/javadoc-0.6.0-brightgreen.svg?label=Scaladoc)](https://javadoc.io/doc/io.github.takapi327/ldbc-authentication-plugin_3)     |\n| `ldbc-aws-authentication-plugin` |  ✅  |      ✅       |    ✅     | [![Scaladoc](https://img.shields.io/badge/javadoc-0.6.0-brightgreen.svg?label=Scaladoc)](https://javadoc.io/doc/io.github.takapi327/ldbc-aws-authentication-plugin_3) |\n\n## Performance\n\nldbc is designed to be fast and efficient. It uses the latest features of Scala 3 and Cats Effect 3 to provide a high-performance database connectivity layer.\n\n| Reading                                                                | Writing                                                                |\n|------------------------------------------------------------------------|------------------------------------------------------------------------|\n| \u003cimg alt=\"ldbc\" src=\"./docs/src/main/mdoc/img/connector/Select21.svg\"\u003e | \u003cimg alt=\"ldbc\" src=\"./docs/src/main/mdoc/img/connector/Insert21.svg\"\u003e |\n\n## Quick Start\n\nFor people that want to skip the explanations and see it action, this is the place to start!\n\n### Dependency Configuration\n\n```scala\nlibraryDependencies += \"io.github.takapi327\" %% \"ldbc-dsl\" % \"latest\"\n```\n\nFor Cross-Platform projects (JVM, JS, and/or Native):\n\n```scala\nlibraryDependencies += \"io.github.takapi327\" %%% \"ldbc-dsl\" % \"latest\"\n```\n\nThe dependency package used depends on whether the database connection is made via a connector using the Java API or a connector provided by ldbc.\n\n**Use jdbc connector**\n\n```scala\nlibraryDependencies += \"io.github.takapi327\" %% \"jdbc-connector\" % \"latest\"\n```\n\n**Use ldbc connector**\n\n```scala\nlibraryDependencies += \"io.github.takapi327\" %% \"ldbc-connector\" % \"latest\"\n```\n\nFor Cross-Platform projects (JVM, JS, and/or Native)\n\n```scala\nlibraryDependencies += \"io.github.takapi327\" %%% \"ldbc-connector\" % \"latest\"\n```\n\n### Usage\n\nThe difference in usage is that there are differences in the way connections are built between jdbc and ldbc.\n\n\u003e [!CAUTION]\n\u003e **ldbc** is currently under active development. Please note that current functionality may therefore be deprecated or changed in the future.\n\n**jdbc connector**\n\n```scala\nimport jdbc.connector.*\n\nval ds = new com.mysql.cj.jdbc.MysqlDataSource()\nds.setServerName(\"127.0.0.1\")\nds.setPortNumber(13306)\nds.setDatabaseName(\"world\")\nds.setUser(\"ldbc\")\nds.setPassword(\"password\")\n\nval connector = Connector.fromDataSource[IO](ds, ExecutionContexts.synchronous)\n```\n\n**ldbc connector**\n\n```scala\nimport ldbc.connector.*\n\nval datasource = MySQLDataSource\n  .build[IO](\"127.0.0.1\", 3306, \"ldbc\")\n  .setPassword(\"password\")\n  .setDatabase(\"world\")\n  .setSSL(SSL.Trusted)\n\nval connector = Connector.fromDataSource(datasource)\n```\n\nThe connection process to the database can be carried out using the provider established by each of these methods.\n\n```scala 3\nval result: IO[(List[Int], Option[Int], Int)] = (for\n  result1 \u003c- sql\"SELECT 1\".query[Int].to[List]\n  result2 \u003c- sql\"SELECT 2\".query[Int].to[Option]\n  result3 \u003c- sql\"SELECT 3\".query[Int].unsafe\nyield (result1, result2, result3)).readOnly(connector)\n```\n\n#### Using the query builder\n\nldbc provides not only plain queries but also type-safe database connections using the query builder.\n\nThe first step is to set up dependencies.\n\n```scala\nlibraryDependencies += \"io.github.takapi327\" %% \"ldbc-query-builder\" % \"latest\"\n```\n\nFor Cross-Platform projects (JVM, JS, and/or Native):\n\n```scala\nlibraryDependencies += \"io.github.takapi327\" %%% \"ldbc-query-builder\" % \"latest\"\n```\n\nldbc uses classes to construct queries.\n\n```scala 3\nimport ldbc.dsl.codec.*\nimport ldbc.query.builder.Table\n\ncase class User(\n  id: Long,\n  name: String,\n  age: Option[Int],\n) derives Table\n\nobject User:\n  given Codec[User] = Codec.derived[User]\n```\n\nThe next step is to create a Table using the classes you have created.\n\n```scala\nimport ldbc.query.builder.TableQuery\n\nval userTable = TableQuery[User]\n```\n\nFinally, you can use the query builder to create a query.\n\n```scala\nval result: IO[List[User]] =\n  userTable.selectAll.query.to[List].readOnly(connector)\n  // \"SELECT `id`, `name`, `age` FROM user\"\n```\n\n#### Using the schema\n\nldbc also allows type-safe construction of schema information for tables.\n\nThe first step is to set up dependencies.\n\n```scala\nlibraryDependencies += \"io.github.takapi327\" %% \"ldbc-schema\" % \"latest\"\n```\n\nFor Cross-Platform projects (JVM, JS, and/or Native):\n\n```scala\nlibraryDependencies += \"io.github.takapi327\" %%% \"ldbc-schema\" % \"latest\"\n```\n\nThe next step is to create a schema for use by the query builder.\n\nldbc maintains a one-to-one mapping between Scala models and database table definitions.\nImplementers simply define columns and write mappings to the model, similar to Slick.\n\n```scala 3\nimport ldbc.schema.*\n\ncase class User(\n  id: Long,\n  name: String,\n  age: Option[Int],\n)\n\nclass UserTable extends Table[User](\"user\"):\n  def id: Column[Long] = column[Long](\"id\")\n  def name: Column[String] = column[String](\"name\")\n  def age: Column[Option[Int]] = column[Option[Int]](\"age\")\n\n  override def * : Column[User] = (id *: name *: age).to[User]\n```\n\nFinally, you can use the query builder to create a query.\n\n```scala\nval userTable: TableQuery[UserTable] = TableQuery[UserTable]\nval result: IO[List[User]] =\n  userTable.selectAll.query.to[List].readOnly(connector)\n  // \"SELECT `id`, `name`, `age` FROM user\"\n```\n\n## How to use with ZIO\n\nAlthough ldbc was created to run on the Cats Effect, can also be used in conjunction with ZIO by using `ldbc-zio-interop`.\n\n\u003e [!CAUTION]\n\u003e Although ldbc supports three platforms, Note that ZIO Interop Cats does not currently support Scala Native.\n\n```scala\nlibraryDependencies += \"io.github.takapi327\" %% \"ldbc-zio-interop\" % \"latest\"\n```\n\nThe following is sample code for using ldbc with ZIO.\n\n```scala 3\nimport zio.*\n\nimport ldbc.zio.interop.*\nimport ldbc.connector.*\nimport ldbc.dsl.*\n\nobject Main extends ZIOAppDefault:\n\n  private val datasource =\n    MySQLDataSource\n      .build[Task](\"127.0.0.1\", 3306, \"ldbc\")\n      .setPassword(\"password\")\n      .setDatabase(\"world\")\n      .setSSL(SSL.Trusted)\n\n  private val connector = Connector.fromDataSource(datasource)\n\n  override def run =\n    sql\"SELECT Name FROM city\"\n      .query[String]\n      .to[List]\n      .readOnly(connector)\n      .flatMap { cities =\u003e\n        Console.printLine(cities)\n      }\n```\n\n### パフォーマンス\n\nPerformance results from the Cats Effect to ZIO conversion are shown below.\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg alt=\"ldbc\" src=\"./docs/src/main/mdoc/img/connector/Select_effect.svg\"\u003e\n\u003c/div\u003e\n\n## Documentation\n\nFull documentation can be found at Currently available in English and Japanese.\n\n- [English](https://takapi327.github.io/ldbc/latest/en/)\n- [Japanese](https://takapi327.github.io/ldbc/latest/ja/)\n\n## Documentation for LLMs\n\nIf you’re an artificial intelligence, or trying to teach one how to use ldbc, we offer the documentation in plaintext format. Beep boop.\n\nWe support the [llms.txt](https://llmstxt.org/) convention for making documentation available to large language models and the applications that make use of them.\n\nCurrently, we have the following root-level files...\n\n- [/llms.txt](https://takapi327.github.io/ldbc/llms.txt) — a listing of the available files\n- [/llms-full.txt](https://takapi327.github.io/ldbc/llms-full.txt) — complete documentation for ldbc\n- [/llms-small.txt](https://takapi327.github.io/ldbc/llms-small.txt) — compressed documentation for use with smaller context windows\n\n## Documentation for MCP\n\n[![npm version](https://badge.fury.io/js/@ldbc%2Fmcp-document-server.svg)](https://badge.fury.io/js/@ldbc%2Fmcp-document-server)\n\nDocument MCP server for ldbc for use with Agent is now available.\n\nYou can use the documentation server to ask questions about ldbc, run tutorials, etc.\nIt can be used with Visual Studio Code, Claude Desktop, etc.\n\n\u003e [!NOTE]\n\u003e This server is an experimental feature, but should help you. This server is developed using tools made in Scala. It is still under development and therefore contains many missing features. Please report feature requests or problems [here](https://github.com/takapi327/mcp-scala/issues).\n\n```json\n{\n  \"mcp\": {\n    \"servers\": {\n      \"mcp-ldbc-document-server\": {\n        \"command\": \"npx\",\n        \"args\": [\n          \"@ldbc/mcp-document-server\"\n        ]\n      }\n    }\n  }\n}\n```\n\n\u003e [!NOTE]\n\u003e The video is processed in Japanese, but it works fine in English.\n\u003e 「ldbcのチュートリアルを始めたい」is I'd like to start a tutorial on ldbc.”\n\nhttps://github.com/user-attachments/assets/a0c2a7a4-d5e7-4f91-bf69-833716d3efe5\n\nPlease refer to the [README](https://github.com/takapi327/ldbc/blob/master/mcp/document-server/.js/README.md) for usage instructions.\n\n## Features/Roadmap\n\nCreating a MySQL connector project written in pure Scala3.\n\nJVM, JS and Native platforms are all supported.\n\n\u003e [!IMPORTANT]\n\u003e **ldbc** is currently focused on developing connectors written in pure Scala3 to work with JVM, JS and Native.\n\u003e In the future, we also plan to rewrite existing functions based on a pure Scala3 connector.\n\n### Enhanced functionality and improved stability of the MySQL connector written in pure Scala3\n\nMost of the jdbc functionality used in other packages of ldbc at the moment could be implemented.\n\nHowever, not all jdbc APIs could be supported. Nor can we guarantee that it is proven and stable enough to operate in a production environment.\n\nWe will continue to develop features and improve the stability of the ldbc connector to achieve the same level of stability and reliability as the jdbc connector.\n\n## Contributing\n\nAll suggestions welcome :)!\n\nIf you’d like to contribute, see the list of [issues](https://github.com/takapi327/ldbc/issues) and pick one! Or report your own. If you have an idea you’d like to discuss, that’s always a good option.\n\nIf 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.\n\n### Testing locally\n\nIf 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.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftakapi327%2Fldbc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftakapi327%2Fldbc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftakapi327%2Fldbc/lists"}