{"id":15019624,"url":"https://github.com/jooq/jooq","last_synced_at":"2026-01-19T21:01:21.219Z","repository":{"id":37405481,"uuid":"1625986","full_name":"jOOQ/jOOQ","owner":"jOOQ","description":"jOOQ is the best way to write SQL in Java","archived":false,"fork":false,"pushed_at":"2026-01-10T10:42:21.000Z","size":282136,"stargazers_count":6617,"open_issues_count":2158,"forks_count":1225,"subscribers_count":151,"default_branch":"main","last_synced_at":"2026-01-11T03:26:32.292Z","etag":null,"topics":["code-generator","database","db2","hibernate","java","jdbc","jdbc-utilities","jooq","jpa","mysql","oracle","orm","postgresql","sql","sql-builder","sql-formatter","sql-query","sql-query-builder","sql-query-formatter","sqlserver"],"latest_commit_sha":null,"homepage":"https://www.jooq.org","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jOOQ.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","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":"2011-04-17T10:43:33.000Z","updated_at":"2026-01-10T20:10:13.000Z","dependencies_parsed_at":"2024-04-02T10:26:52.728Z","dependency_job_id":"24a88433-33b0-454b-a765-d06490e6deb6","html_url":"https://github.com/jOOQ/jOOQ","commit_stats":{"total_commits":13335,"total_committers":110,"mean_commits":"121.22727272727273","dds":0.05174353205849269,"last_synced_commit":"662243d51bf1726f727cf39c6cc9ffb3bb043f03"},"previous_names":[],"tags_count":296,"template":false,"template_full_name":null,"purl":"pkg:github/jOOQ/jOOQ","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jOOQ%2FjOOQ","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jOOQ%2FjOOQ/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jOOQ%2FjOOQ/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jOOQ%2FjOOQ/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jOOQ","download_url":"https://codeload.github.com/jOOQ/jOOQ/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jOOQ%2FjOOQ/sbom","scorecard":{"id":500066,"data":{"date":"2025-08-11","repo":{"name":"github.com/jOOQ/jOOQ","commit":"fb8b7b2e0cee3f7f21a3d1bfc23f3d074e052378"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":6,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":10,"reason":"30 commit(s) and 28 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: SECURITY.md:1","Info: Found linked content: SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1","Info: Found text in security policy: SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Fuzzing","score":10,"reason":"project is fuzzed","details":["Info: OSSFuzz integration found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T21:36:18.713Z","repository_id":37405481,"created_at":"2025-08-19T21:36:18.713Z","updated_at":"2025-08-19T21:36:18.713Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28585195,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T20:45:59.482Z","status":"ssl_error","status_checked_at":"2026-01-19T20:45:41.500Z","response_time":67,"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":["code-generator","database","db2","hibernate","java","jdbc","jdbc-utilities","jooq","jpa","mysql","oracle","orm","postgresql","sql","sql-builder","sql-formatter","sql-query","sql-query-builder","sql-query-formatter","sqlserver"],"created_at":"2024-09-24T19:53:47.953Z","updated_at":"2026-01-19T21:01:21.208Z","avatar_url":"https://github.com/jOOQ.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"jOOQ\n====\n\njOOQ is an internal DSL and source code generator, modelling the SQL language as a type safe Java API to help you write better SQL. \n\nIts main features include:\n\n- [The source code generator](https://blog.jooq.org/why-you-should-use-jooq-with-code-generation/)\n- The [DSL API for type safe query construction](https://www.jooq.org/doc/latest/manual/sql-building/dsl-api/) and [dynamic SQL](https://www.jooq.org/doc/latest/manual/sql-building/dynamic-sql/)\n\nSecondary features include:\n\n- [DAOs](https://www.jooq.org/doc/latest/manual/sql-execution/daos/)\n- [Data export](https://www.jooq.org/doc/latest/manual/sql-execution/exporting/) and [import](https://www.jooq.org/doc/latest/manual/sql-execution/importing/)\n- [Data type conversion](https://www.jooq.org/doc/latest/manual/sql-execution/fetching/data-type-conversion/)\n- [DDL statement support](https://www.jooq.org/doc/latest/manual/sql-building/ddl-statements/)\n- [DML statement support](https://www.jooq.org/doc/latest/manual/sql-building/sql-statements/)\n- [Diagnostics](https://www.jooq.org/doc/latest/manual/sql-execution/diagnostics/)\n- [Dialect agnosticism for 30+ RDBMS](https://www.jooq.org/download/#databases)\n- [Embedded types](https://www.jooq.org/doc/latest/manual/code-generation/codegen-embeddable-types/)\n- [Formatting and pretty printing](https://www.jooq.org/doc/latest/manual/sql-building/queryparts/pretty-printing/)\n- [Implicit joins](https://www.jooq.org/doc/latest/manual/sql-building/sql-statements/select-statement/implicit-join/)\n- [Kotlin support](https://www.jooq.org/doc/latest/manual/sql-building/kotlin-sql-building/)\n- [Mapping](https://www.jooq.org/doc/latest/manual/sql-execution/fetching/recordmapper/)\n- [Meta data API](https://www.jooq.org/doc/latest/manual/sql-execution/meta-data/)\n- [Mocking API for JDBC](https://www.jooq.org/doc/latest/manual/sql-execution/mocking-connection/)\n- [Model API for use in traversal and replacement](https://www.jooq.org/doc/latest/manual/sql-building/model-api/)\n- [`MULTISET` and `ROW` nested collections and records](https://blog.jooq.org/jooq-3-15s-new-multiset-operator-will-change-how-you-think-about-sql/)\n- [Multitenancy](https://www.jooq.org/doc/latest/manual/sql-building/dsl-context/custom-settings/settings-render-mapping/)\n- [Parser (and translator)](https://www.jooq.org/doc/latest/manual/sql-building/sql-parser/)\n- [Pattern based transformation](https://www.jooq.org/doc/latest/manual/sql-building/queryparts/sql-transformation/transform-patterns/)\n- [Plain SQL templating](https://www.jooq.org/doc/latest/manual/sql-building/plain-sql-templating/)\n- [Policies](https://www.jooq.org/doc/latest/manual/sql-building/queryparts/policies/)\n- [Procedural logic API](https://blog.jooq.org/vendor-agnostic-dynamic-procedural-logic-with-jooq/)\n- [Reactive support via R2DBC](https://www.jooq.org/doc/latest/manual/sql-execution/fetching/reactive-fetching/)\n- [Readonly columns](https://www.jooq.org/doc/latest/manual/code-generation/codegen-advanced/codegen-config-database/codegen-database-readonly-columns/)\n- [Scala support](https://www.jooq.org/doc/latest/manual/sql-building/scala-sql-building/)\n- [Schema diff](https://www.jooq.org/doc/latest/manual/sql-building/schema-diff/)\n- [SQL transformation](https://www.jooq.org/doc/latest/manual/sql-building/queryparts/sql-transformation/)\n- [SQL translation](https://www.jooq.org/translate/)\n- [Stored procedure support](https://blog.jooq.org/the-best-way-to-call-stored-procedures-from-java-with-jooq/)\n- [Transaction API](https://www.jooq.org/doc/latest/manual/sql-execution/transaction-management/)\n- [UpdatableRecords for simplified CRUD, with opt-in optimistic locking](https://www.jooq.org/doc/latest/manual/sql-execution/crud-with-updatablerecords/simple-crud/)\n- And much more\n\nExamples\n========\n\nTypesafe, embedded SQL\n----------------------\n\njOOQ's main feature is typesafe, embedded SQL, allowing for IDE auto completion of SQL syntax...\n\n![image](https://github.com/jOOQ/jOOQ/assets/734593/a62305d7-c8a7-4a32-aa32-30708f70337d)\n\n... as well as of schema meta data:\n\n![image](https://github.com/jOOQ/jOOQ/assets/734593/a8e23067-254c-4a03-89b2-82985325ee69)\n\nThis allows for preventing errors of various types, including typos of identifiers:\n\n![image](https://github.com/jOOQ/jOOQ/assets/734593/d2659a0c-7d45-4851-9455-81ac4bc18485)\n\nOr data type mismatches:\n\n![image](https://github.com/jOOQ/jOOQ/assets/734593/8d230f16-ce82-4de8-88b2-64997451ebfe)\n\n[The examples are from the code generation blog post](https://blog.jooq.org/why-you-should-use-jooq-with-code-generation/).\n\nA more powerful example using nested collections\n------------------------------------------------\n\nFor many more examples, [please have a look at the demo](https://github.com/jOOQ/demo). A key example showing jOOQ's various strengths is from the [`MULTISET` operator announcement blog post](https://blog.jooq.org/jooq-3-15s-new-multiset-operator-will-change-how-you-think-about-sql/):\n\nGiven these target DTOs:\n\n```java\nrecord Actor(String firstName, String lastName) {}\nrecord Film(\n  String title,\n  List\u003cActor\u003e actors,\n  List\u003cString\u003e categories\n) {}\n```\n\nYou can now write the following query to fetch films, their nested actors and their nested categorise in a single, type safe query:\n\n```java\nList\u003cFilm\u003e result =\ndsl.select(\n      FILM.TITLE,\n      multiset(\n        select(\n          FILM.actor().FIRST_NAME, \n          FILM.actor().LAST_NAME)\n        .from(FILM.actor())\n      ).as(\"actors\").convertFrom(r -\u003e r.map(mapping(Actor::new))),\n      multiset(\n        select(FILM.category().NAME)\n        .from(FILM.category())\n      ).as(\"categories\").convertFrom(r -\u003e r.map(Record1::value1))\n   )\n   .from(FILM)\n   .orderBy(FILM.TITLE)\n   .fetch(mapping(Film::new));\n```\n\nThe query is completely type safe. Change a column type, name, or the target DTO, and it will stop compiling! Trust only your own eyes:\n\n![multiset](https://github.com/jOOQ/jOOQ/assets/734593/948f8e62-2a93-4152-86d6-42a6eceb7133)\n\nAnd here you see the nested result in action from the logs:\n\n![execute](https://github.com/jOOQ/jOOQ/assets/734593/ba2f2a9f-218c-4ec9-8fb2-c2b8b7df2f4d)\n\nHow does it work? Look at this annotated example:\n\n\n```java\nList\u003cFilm\u003e result =\ndsl.select(\n      FILM.TITLE,\n\n      // MULTISET is a standard SQL operator that allows for nesting collections\n      // directly in SQL. It is either\n      // - supported natively\n      // - emulated using SQL/JSON or SQL/XML\n      multiset(\n\n        // Implicit path based joins allow for simpler navigation of foreign\n        // key relationships.\n        select(\n          FILM.actor().FIRST_NAME, \n          FILM.actor().LAST_NAME)\n\n        // Implicit correlation to outer queries allows for avoiding repetitive\n        // writing of predicates.\n        .from(FILM.actor())\n\n      // Ad-hoc conversion allows for mapping structural Record2\u003cString, String\u003e\n      // types to your custom DTO using constructor references\n      ).as(\"actors\").convertFrom(r -\u003e r.map(mapping(Actor::new))),\n      multiset(\n        select(FILM.category().NAME)\n        .from(FILM.category())\n      ).as(\"categories\").convertFrom(r -\u003e r.map(Record1::value1))\n   )\n   .from(FILM)\n   .orderBy(FILM.TITLE)\n   .fetch(mapping(Film::new));\n```\n\nThe generated SQL query might look like this, in PostgreSQL:\n\n```sql\nselect\n  film.title,\n  (\n    select coalesce(\n      jsonb_agg(jsonb_build_object(\n        'first_name', t.first_name,\n        'last_name', t.last_name\n      )),\n      jsonb_build_array()\n    )\n    from (\n      select\n        alias_78509018.first_name, \n        alias_78509018.last_name\n      from (\n        film_actor\n          join actor as alias_78509018\n            on film_actor.actor_id = alias_78509018.actor_id\n        )\n      where film_actor.film_id = film.film_id\n    ) as t\n  ) as actors,\n  (\n    select coalesce(\n      jsonb_agg(jsonb_build_object('name', t.name)),\n      jsonb_build_array()\n    )\n    from (\n      select alias_130639425.name\n      from (\n        film_category\n          join category as alias_130639425\n            on film_category.category_id = alias_130639425.category_id\n        )\n      where film_category.film_id = film.film_id\n    ) as t\n  ) as categories\nfrom film\norder by film.title\n```\n\nThis particular example is explained more in detail in the [`MULTISET` operator announcement blog post](https://blog.jooq.org/jooq-3-15s-new-multiset-operator-will-change-how-you-think-about-sql/). For many more examples, [please have a look at the demo](https://github.com/jOOQ/demo).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjooq%2Fjooq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjooq%2Fjooq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjooq%2Fjooq/lists"}