{"repo":"scalamolecule/molecule","free":true,"listed":false,"github":"https://github.com/scalamolecule/molecule","clone":"git clone https://github.com/scalamolecule/molecule.git","description":"Scala 3 library to compose domain-tailored data from SQL databases","language":"Scala","stars":20,"topics":["database","jdbc","scala","h2-database","postgresql","mysql-database","mariadb","mariadb-database","mysql"],"license":"Apache-2.0","category":"databases-storage","readme_excerpt":"Molecule is a Scala 3 library that lets you query and mutate SQL databases using type-inferred code written with the words of your domain. Here's a query across two tables: No SQL strings, no join syntax, no mapping boilerplate. Just your domain concepts composed together. The compiler ensures you only write valid queries, and you get back typed data: You express intent; Molecule translates it into optimized SQL queries and handles the execution. See generated SQL Why Molecule? - Type-safe from end to end — no string queries, no surprises - Write in your own domain language — not SQL - Built-in authorization — move the security boundary to the data layer, not scattered across endpoints - Declarative, not imperative — express intent, not mechanics - Composable and immutable — functional by design - Cross-platform — JVM and Scala.js with built-in RPC and serialization - Same behavior across backends — Postgres, MySQL, MariaDB, SQLite, H2 - No macros - No complex type class implicit hierarchies Documentation Full documentation at scalamolecule.org Quick start Clone molecule-samples to get started: Core Concepts Domain Structure First, define the entities and attributes of your domain. This structure allows Molecule to generate a minimal and precise DSL tailored to your domain. Here's an example: Then run sbt moleculeGen - and Molecule generates the necessary DSL code to let you write molecules. Data Model Now you can model data as we saw above. Behind the scenes, for every step ","default_branch":null,"files":null,"tree":[],"storefront":"/r/scalamolecule","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/scalamolecule/molecule/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}